企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` procedure SetJob(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); var NewJob: Byte; begin NewJob := Args.Int[0]; //调用此函数时传入了新职业参数,如转职到法师:@SetJob(1) if (NewJob>=0) and (NewJob<=4) then //如果职业编码介于战士和弓箭手之间则是被允许的 begin if Player.Job <> NewJob then //新的职业编码和当前职业不同 begin Player.Job := NewJob; //设置新的职业编码 Player.ClearSkill; //清除已学习的技能 Player.Messagebox('恭喜你,职业转换成功!!!'); //发送消息到客户表示职业转换完成 end; end; end; ```