用于战神引擎的转生NPC脚本,脚本采用了自定义NPC对话框,默认八转功能,在NPC上添加了转生材料购买的功能,非常的方便,帮主把脚本和NPC自定义素材都提取出来了,但你们在添加的时候,需要单独提取对应的素材文件,不能覆盖整个素材文件夹。
部分脚本
procedure _2z; begin if This_Player.GetV(43,1) < 2 then begin if (This_Player.GetBagItemCount ('转生碎片') >= 20) and (This_Player.YBNum >= 3500) then begin This_Player.Take('转生碎片',20); This_Player.ScriptRequestSubYBNum(3500); This_Player.SetV(43,1,2); //设置转生等级 This_Player.SetV(69,7,41); //设置转生封号 This_Player.SetV(41,2,(This_Player.GetV(41,2)+10)); //设置转生攻击 This_Player.SetV(53,2,(This_Player.GetV(53,2)+10)); //设置转生魔法 This_Player.SetV(63,2,(This_Player.GetV(63,2)+10)); //设置转生道术 This_Player.SetV(40,1,(This_Player.GetV(40,1)+2)); //设置转生倍攻 ServerSay('恭喜玩家'+This_Player.Name+'完成了二转转生!', 2); domain; gjity; givefenghao; end else This_NPC.NpcDialog(This_Player, '你材料不足,或元宝不够!'); end else This_NPC.NpcDialog(This_Player, '你已经晋升过!'); end; procedure _3z; begin if This_Player.GetV(43,1) < 3 then begin if (This_Player.GetBagItemCount ('转生碎片') >= 35) and (This_Player.YBNum >= 3800) then begin This_Player.Take('转生碎片',35); This_Player.ScriptRequestSubYBNum(3800); This_Player.SetV(43,1,3); //设置转生等级 This_Player.SetV(69,7,42); //设置转生封号 This_Player.SetV(41,2,(This_Player.GetV(41,2)+15)); //设置转生攻击 This_Player.SetV(53,2,(This_Player.GetV(53,2)+15)); //设置转生魔法 This_Player.SetV(63,2,(This_Player.GetV(63,2)+15)); //设置转生道术 This_Player.SetV(40,1,(This_Player.GetV(40,1)+3)); //设置转生倍攻 ServerSay('恭喜玩家'+This_Player.Name+'完成了三转转生!', 2); domain; gjity; givefenghao; end else This_NPC.NpcDialog(This_Player, '你材料不足,或元宝不够!'); end else This_NPC.NpcDialog(This_Player, '你已经晋升过!'); end; procedure _4z; begin if This_Player.GetV(43,1) < 4 then begin if (This_Player.GetBagItemCount ('转生碎片') >= 35) and (This_Player.YBNum >= 4200) then begin This_Player.Take('转生碎片',35); This_Player.ScriptRequestSubYBNum(4200); This_Player.SetV(43,1,4); //设置转生等级 This_Player.SetV(69,7,42); //设置转生封号 This_Player.SetV(41,2,(This_Player.GetV(41,2)+20)); //设置转生攻击 This_Player.SetV(53,2,(This_Player.GetV(53,2)+20)); //设置转生魔法 This_Player.SetV(63,2,(This_Player.GetV(63,2)+20)); //设置转生道术 This_Player.SetV(40,1,(This_Player.GetV(40,1)+4)); //设置转生倍攻 ServerSay('恭喜玩家'+This_Player.Name+'完成了四转转生!', 2); domain; gjity; givefenghao; end else This_NPC.NpcDialog(This_Player, '你材料不足,或元宝不够!'); end else This_NPC.NpcDialog(This_Player, '你已经晋升过!'); end; procedure _5z; begin if This_Player.GetV(43,1) < 5 then begin if (This_Player.GetBagItemCount ('转生碎片') >= 48) and (This_Player.YBNum >= 4600) then begin This_Player.Take('四转玉佩',1); This_Player.ScriptRequestSubYBNum(4600); This_Player.SetV(43,1,5); //设置转生等级 This_Player.SetV(69,7,43); //设置转生封号 This_Player.SetV(41,2,(This_Player.GetV(41,2)+25)); //设置转生攻击 This_Player.SetV(53,2,(This_Player.GetV(53,2)+25)); //设置转生魔法 This_Player.SetV(63,2,(This_Player.GetV(63,2)+25)); //设置转生道术 This_Player.SetV(40,1,(This_Player.GetV(40,1)+5)); //设置转生倍攻 ServerSay('恭喜玩家'+This_Player.Name+'完成了五转转生!', 2); domain; gjity; givefenghao; end else This_NPC.NpcDialog(This_Player, '你材料不足,或元宝不够!'); end else This_NPC.NpcDialog(This_Player, '你已经晋升过!'); end; procedure _6z; begin if This_Player.GetV(43,1) < 6 then begin if (This_Player.GetBagItemCount ('转生碎片') >= 53) and (This_Player.YBNum >= 5000) then begin This_Player.Take('转生碎片',53); This_Player.ScriptRequestSubYBNum(5000); This_Player.SetV(43,1,6); //设置转生等级 This_Player.SetV(69,7,43); //设置转生封号 This_Player.SetV(41,2,(This_Player.GetV(41,2)+30)); //设置转生攻击 This_Player.SetV(53,2,(This_Player.GetV(53,2)+30)); //设置转生魔法 This_Player.SetV(63,2,(This_Player.GetV(63,2)+30)); //设置转生道术 This_Player.SetV(40,1,(This_Player.GetV(40,1)+6)); //设置转生倍攻 ServerSay('恭喜玩家'+This_Player.Name+'完成了六转转生!', 2); domain; gjity; givefenghao; end else This_NPC.NpcDialog(This_Player, '你材料不足,或元宝不够!'); end else This_NPC.NpcDialog(This_Player, '你已经晋升过!'); end;