用于战神引擎测试区转正式区带开关Npc脚本,脚本非常的方便,不要做任何设置,也不要改任何文件,直接用GM角色点开NPC,点击测试或者正式区就行,简单好用,单文件,非常方便。
部分脚本
begin This_Player.FlyTo('3',330+random(5),345); WriteIniSectionStr('测试记录.txt','人物PID', This_Player.Name,ptid ); end else begin This_Player.FlyTo('3',330+random(5),345); WriteIniSectionStr('测试记录.txt','人物PID', This_Player.Name,ptid ); end end end; procedure _chuans1; begin This_Player.Flyto('3',330, 345); end; procedure domain; var tt,s1,s2: String; name_save: String; name_go: String; sql,sqln:string; idx,chrname,ptid :string; begin if getg(188,1) = 1then begin s1:= ''; s2:= ''; tt:= '开区传送'; name_go:='开启状态'; end else begin tt:= ''; name_go:='关闭状态'; end; if getg(188,2) < 1 then begin name_save:= '正式模式'; end else begin name_save:= '测试模式'; end sql := 'select idx,ptid,ChrName from mir3.user_index where ChrName = "' + This_Player.Name + '" ;'; if This_DB.ExecuteQuery(sql) > 0 then begin ptid := This_DB.PsFieldByName('ptid'); ChrName:= This_DB.PsFieldByName('ChrName'); idx:= This_DB.PsFieldByName('idx'); end if This_Player.gmlevel > 0 then begin This_NPC.NpcDialog(This_Player, '尊敬的管理员<'+This_Player.name+'/fcolor=70>欢迎来到<'+name+'> \' +'|新区开区时间为<'+inttostr(a)+'>年<'+inttostr(b)+'>月<'+inttostr(c)+'>号<'+inttostr(d)+'时'+inttostr(e)+'分>\' +'|当前模式<【'+name_save+'】/fcolor=250>等待房<【'+name_go+'】/fcolor=253>\' +'|如测试区请开启测试模式<【测试模式会保留数据】>,如正式区请调整<正式模式>\' +'|{cmd}<关闭传送/@tiyan><开启传送/@tiyan1>\' +'|{cmd}<当前 '+name_save+'/@neic> \'+ +'|{cmd}<'+tt+'/@chuans>\' ); end else This_NPC.NpcDialog(This_Player, '尊敬的玩家<'+This_Player.name+'/fcolor=70>欢迎来到<'+name+'> \' +'|新区开区时间为<'+inttostr(a)+'>年<'+inttostr(b)+'>月<'+inttostr(c)+'>号<'+inttostr(d)+'时'+inttostr(e)+'分>|请耐心等待片刻\' +'|{cmd}<'+tt+'/@chuans1> \' ); end; procedure _tiyan; begin setg(188,1,0) domain; end; procedure _tiyan1; begin setg(188,1,1) domain; end; procedure _neic; begin if getg(188,2) < 1 then begin setg(188,2,1) domain; end else setg(188,2,0) domain; end; begin domain; end.