战神引擎玩家通过元宝升级项链脚本,但战神引擎有一个BUG,就是升级以后的项链会自动绑定,无法交易,甚至无法修复,升级的越高,绑定的限制也就越多。是引擎自带的BUG,目前还没有完美的解决方法。这个问题在武器和衣服上面也会出现。但折中的解决方法就是控制升级的次数,不要超过3次,这样就不会出现绑死的情况。
部分升级幸运脚本
program mir2; {$I TaoZhuang.pas} procedure _DoExit; begin This_Npc.CloseDialog(This_Player); end; procedure _Exit; begin This_Npc.CloseDialog(This_Player); end; var ck_name : array[1..300 ]of string; ck_value : array[1..300] of integer; procedure OnInitialize; begin ck_name[1] :='绿色项链'; ck_name[2] :='灵魂项链'; ck_name[3] :='恶魔铃铛'; ck_name[4] :='法神项链'; ck_name[5] :='天尊项链'; ck_name[6] :='圣战项链'; ck_name[7] :='白色虎齿项链'; ck_name[8] :='灯笼项链'; ck_name[9] :='记忆项链'; ck_name[10] :='圣战项链'; ck_name[11] :='雷霆项链'; ck_name[12] :='烈焰项链'; ck_name[13] :='光芒项链'; ck_name[14] :='圣魔项链'; ck_name[15] :='战神项链'; ck_name[16] :='真魂项链'; ck_value[1] :=888; ck_value[2] :=888; ck_value[3] :=888; ck_value[4] :=888; ck_value[5] :=888; ck_value[6] :=888; ck_value[7] :=888; ck_value[8] :=888; ck_value[9] :=888; ck_value[10] :=888; ck_value[11] :=888; ck_value[12] :=888; ck_value[13] :=888; ck_value[14] :=888; ck_value[15] :=888; ck_value[16] :=888; end; procedure _Checkup; begin This_Npc.NpcDialog(This_Player, +'|<幸运最高为2点,不包括装备原有属性。/c=red>\' +'|<待升级装备属性越高,升级消耗的元宝也越多。/c=red>\' +'|<注意:每次升级请间隔5秒,如果多次点击没反应,请关掉NPC重新放入装备升级/c=red>\' +'|{cmd}<开始升级/@Checkup_1> ^<关闭/@doexit>' ); end; procedure _Checkup_1; begin This_NPC.Click_CommitItem(This_Player,1,'待升级装备:'); end; procedure CommitItem(AType:word); var i,ck_num,ck_kind,ck_gold,ck_rand:integer; ck_str,ck_red:string; begin ck_gold := 0; //初始化 ck_str := ''; //初始化 ck_red := ''; //初始化 for ck_kind := 1 to 300 do begin if ck_name[ck_kind] = This_Item.ItemName then begin ck_num := This_Item.AddPa2; ck_gold := ck_value[ck_kind]; if (ck_num > 0) and (ck_num < 2) then begin for i:= 1 to ck_num do begin ck_gold := ck_gold + 1000; end; end; end; end; if (ck_num >= 2) then begin This_Player.NotifyClientCommitItem(0,'无法鉴定:你的'+This_Item.ItemName+'已激发出所有属性!'); end else if ck_num > 1 then begin This_Player.NotifyClientCommitItem(0,'无法鉴定:你的'+This_Item.ItemName+'已激发出所有属性!'); end else if ck_gold > 0 then begin ck_rand := random(100) if This_Player.YBNum>= ck_gold then case ck_num of 0 : begin if ck_rand < 100 then begin This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+1 This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1); ck_str :='幸运+1'; ck_red :='红字公告'; This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!'); ServerSay('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!',3); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'待升级装备:'); end; end; 1 : begin if ck_rand < 100 then begin This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+1 This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1); ck_str :='幸运+2'; ck_red :='红字公告'; This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!'); ServerSay('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!',3); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'待升级装备:'); end; end; 2:begin ck_rand := random(100); if ck_rand < 100 then begin This_Item.AddPa2 := This_Item.AddPa2 + 1; //幸运+1 This_Player.PsYBConsum(This_NPC,'xin',20153,ck_gold,1); ck_str :='幸运+3'; ck_red :='红字公告'; This_Player.NotifyClientCommitItem(0,'升级成功:你的'+This_Item.ItemName+'提升到了'+ck_str+'!'); ServerSay('恭喜:'+This_Player.Name+'在幸运使者处把'+This_Item.ItemName+'的幸运提升到了'+ck_str+'!',3); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'待升级装备:'); end; end; end else begin This_Player.NotifyClientCommitItem(0,'无法鉴定:你的元宝不足,需要'+inttostr(ck_gold)+'元宝。!'); end; end else begin This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!'); end; end; function xin(price, num: Integer):boolean; begin result := true; end;