用于战神引擎的首饰剑甲装备属性Npc脚本,脚本带了几率控制,脚本经过帮主亲自测试,功能正常,脚本是明文版的,可以根据自己的需要,任意修改里面的升级所需要的费用和支持升级的物品名单。在添加的时候,记得把支持升级的物品名单,换成自己版本里面配套的。
部分脚本
if (This_Player.GetBagItemCount('道士之星')>= 10) and (This_Player.GetBagItemCount('天外飞石')>= 10) then begin if This_Player.YBnum >= ck_gold then begin ck_rand := random(100); if ck_rand > ck_jl then begin This_Player.Take('道士之星',10); This_Player.Take('死亡纹章',10); This_Player.NotifyClientCommitItem(0,''); This_Player.PlayerNotice('失败:['+This_Item.ItemName+'] 未发生变化',0); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'提强化道术:'); This_Player.ScriptRequestSubYBNum(ck_gold); end else begin This_Player.Take('道士之星',10); This_Player.Take('死亡纹章',10); This_Item.AddPa3 := This_Item.AddPa3 + 1; //道术+1 This_Player.ScriptRequestSubYBNum(ck_gold); ck_str :='道术'; This_NPC.Click_CommitItem(This_Player,1,'提强化道术:'); This_Player.NotifyClientCommitItem(0,'升级成功:你的['+This_Item.ItemName+']提升到了['+inttostr(ck_num + 1)+']!'); This_NPC.NpcNotice('恭喜:['+This_Player.Name+']升级['+This_Item.ItemName+']['+ck_str+']加['+inttostr(ck_num + 1)+']成功!'); This_NPC.NotifyClientUPdBagItem(This_Player,This_Item); This_NPC.Click_CommitItem(This_Player,1,'提强化道术:'); end; end else begin This_Player.NotifyClientCommitItem(0,''); This_Player.PlayerNotice('提示:元宝不足,无法升级!',3); // 0红 1绿 2蓝 3粉 end; end else begin This_Player.NotifyClientCommitItem(0,''); This_Player.PlayerNotice('提示:道士之星或死亡纹章不足10个,无法升级!',3); // 0红 1绿 2蓝 3粉 end; end else begin This_Player.NotifyClientCommitItem(0,'该物品不可升级,请投入可升级的装备!'); end; end; end; end; end; end; end; end; end; end; procedure _shoushi; begin This_Npc.NpcDialog(This_Player, '|每次升级花费500元宝,最高可升级5点\' +'|第一点成功率50% 第二点成功率40%\' +'|第三点成功率30% 第四点成功率20%\' +'|第五点成功率10% 失败不破碎,不清零\' +'|{cmd}<攻击/@Checkup_1> ^<魔法/@Checkup_2> ^<道术/@Checkup_3>\' ); end; procedure _jianjia; begin This_Npc.NpcDialog(This_Player, '|升级攻击所需材料:武士之星*10天外飞石*10\' +'|升级魔法所需材料:法师之星*10 修炼石*10\' +'|升级道术所需材料:道士之星*10死亡纹章*10\' +'|每次升级花费500元宝,最高可升级7点\' +'|第一点成功率70% 第二点成功率60%\' +'|第三点成功率50% 第四点成功率40%\' +'|第五点成功率30% 第六点成功率20%\' +'|第七点成功率10% 失败不破碎,不清零\' +'|{cmd}<武器攻击/@Checkup_7> ^<武器魔法/@Checkup_8> ^<武器道术/@Checkup_9>\' +'|{cmd}<衣服攻击/@Checkup_4> ^<衣服魔法/@Checkup_5> ^<衣服道术/@Checkup_6>\' ); end; begin This_Player.setv(28,31,0); //首饰攻击 This_Player.setv(28,32,0); //首饰魔法 This_Player.setv(28,33,0); //首饰道术 This_Player.setv(28,34,0); //衣服攻击 This_Player.setv(28,35,0); //衣服魔法 This_Player.setv(28,36,0); //衣服道术 This_Player.setv(28,37,0); //武器攻击 This_Player.setv(28,38,0); //武器魔法 This_Player.setv(28,39,0); //武器道术 This_Npc.NpcDialog(This_Player, '|欢迎来到装备升级系统\' +'|我可以帮你升级你的装备\' +'|升级成功之后可激发更厉害的属性 \' +'|{cmd} <升级首饰/@shoushi> ^ <升级剑甲/@jianjia> \' ); end.