用于战神引擎的自动修理全身装备npc脚本,别人赠送的,帮主尚未测试,所以本脚本没有测试视频和测试截图。脚本是单文件,直接添加到版本里面就行。操作方法:将这个文件扔到Mud2.0\Mir200\Envir\PsNpcscripts里。然后在把NPC信息添加到npc脚本文件里面。
部分脚本
Program Mir2; procedure P100; begin exit; end; procedure _CallMain; var iTime:integer; Switch:string; begin if This_Player.GetS(110,1) < 1 then Switch := '关' else Switch := '开'; if This_Player.GetS(111,1) < 1 then iTime := 0 else iTime := This_Player.GetS(111,1); This_NPC.NpcDialog(This_Player, '设置自动修复时间 <'+ inttostr(iTime) +'/@SetTime>^<['+Switch+']/@SetLoop>|'+ '{cmd}<关闭界面/@exit>'); end; procedure LoopNow_2; var k:integer; begin if This_Player.GetS(110,1) > 0 then begin for k := 0 to 16 do begin This_Player.RepairBodyEquip(k); end; This_Player.PlayerNotice('自动修复成功',1); This_Player.CallOutex(This_Npc, This_Player.GetS(111,1), 'LoopNow_1'); end else This_Player.PlayerNotice('自动修复已关闭',0); exit; end; procedure LoopNow_1; var k:integer; begin if This_Player.GetS(110,1) > 0 then begin for k := 0 to 16 do begin This_Player.RepairBodyEquip(k); end; This_Player.PlayerNotice('自动修复成功',1); This_Player.CallOutex(This_Npc, This_Player.GetS(111,1), 'LoopNow_2'); end else This_Player.PlayerNotice('自动修复已关闭',0); exit; end; procedure _SetLoop; begin if This_Player.GetS(111,1) < 1 then begin This_NPC.InputDialog(This_Player,'请先设置自动修复时间',1,100); exit; end; if This_Player.GetS(110,1) < 1 then begin This_Player.SetS(110,1,1); This_Player.PlayerNotice('自动修复已开启',2); This_Player.CallOutex(This_Npc, This_Player.GetS(111,1), 'LoopNow_1'); _CallMain; end else This_Player.SetS(110,1,0); _CallMain; end;