用于战神引擎金刚石兑换金币+经验和提取Npc脚本,脚本经过绑在亲自测试,功能没有任何问题,脚本支持使用金刚石兑换经验、金币和提取身上金刚石的功能。脚本牵扯到了另外2份记录文件,需要单独提取和增加,不能直接覆盖。
部分脚本
begin This_Npc.CloseDialog(This_Player); end; procedure domain; var jinnum : integer; begin jinnum := This_Player.GetV(12,1); if jinnum < 0 then jinnum := 0; This_Npc.NpcDialog(This_Player, +'|我这里用金刚石可以兑换经验或者金币!\'+ +'|你当前金刚石数量:<'+ inttostr(jinnum)+'/FCOLOR=249> \'+ +'|<1个金刚石可以兑换2万经验>\'+ +'|<1个金刚石可以兑换3万金币>\'+ // '|{cmd}<装备回收/@ZhuangBack>'+ // '|{cmd}^<回收声望/@sw>\'+ '|{cmd}^<金刚石兑换经验/@dhjy>\'+ '|{cmd}^<金刚石兑换金币/@dhjb>\'+ '|{cmd}^<提取金刚石/@tq>\'+ '|{cmd}<退出/@doexit>'); end; procedure _dhjb; var jinnum : integer; begin jinnum := This_Player.GetV(12,1); if jinnum < 0 then jinnum := 0; This_Npc.NpcDialog(This_Player, '|{cmd}^<兑换1个金刚石/@dh1> {cmd}^<兑换5个金刚石/@dh5> \'+ '|{cmd}^<兑换10个金刚石/@dh10> {cmd}^<兑换50个金刚石/@dh50> \'+ '|{cmd}^<兑换100个金刚石/@dh100> {cmd}^<兑换300个金刚石/@dh300> \'+ +'|{cmd}<返回/@main>' ); end; procedure _dh300; var jinnum : integer; begin jinnum := This_Player.GetV(12,1); if jinnum < 0 then jinnum := 0; begin if jinnum >= 300 then begin This_Player.SetV(12,1,jinnum - 300); This_Player.Addgold(9000000); ServerSay('玩家<' + This_Player.Name + '>,成功兑换了900万金币!', 246); This_NPC.NpcDialog(This_Player, +'|恭喜你,成功兑换了900万金币!\'+ +'|{cmd}<返回/@dhjb>' ); end else This_NPC.NpcDialog(This_Player, +'|你的金刚石不足!\' +'|{cmd}<返回/@dhjb>' ); end; end; procedure _dh100; var jinnum : integer; begin jinnum := This_Player.GetV(12,1); if jinnum < 0 then jinnum := 0; begin if jinnum >= 100 then begin This_Player.SetV(12,1,jinnum - 100); This_Player.Addgold(3000000); ServerSay('玩家<' + This_Player.Name + '>,成功兑换了300万金币!', 246); This_NPC.NpcDialog(This_Player, +'|恭喜你,成功兑换了300万金币!\'+ +'|{cmd}<返回/@dhjb>' ); end else This_NPC.NpcDialog(This_Player, +'|你的金刚石不足!\' +'|{cmd}<返回/@dhjb>' ); end; end; procedure _dh50;