TC发包实例作品(导师作品)620
发表时间:2018-04-08 17:52 function TradeChoice() if(radiogetstate("Training")==1) Training() elseif (radiogetstate("WoodCity")==1) WoodCity() elseif (radiogetstate("Gobi")==1) GobiTrade() elseif (radiogetstate("Island")==1) IslandTrade() elseif (radiogetstate("Swamp")==1) SwampTrade() elseif (radiogetstate("IcePlain")==1) IcePlainTrade() end end function Training() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") // 0 // SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(60000) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 DC 02 87 02 00 00 00 00 DA 07 00 00 A6 26 00 00") sleep(50000) SendMsgtoService(#10,"10 00 EF 07 F6 0A 00 00 00 00 00 00 00 00 00 00") // sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function WoodCity() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) // SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") // 0 SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(60000) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 DC 02 87 02 00 00 00 00 DA 07 00 00 A6 26 00 00") sleep(50000) SendMsgtoService(#10,"10 00 EF 07 F6 0A 00 00 00 00 00 00 00 00 00 00") // sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function SendAutoRun(IntMapID,IntX, IntY) var RunX=W_HighAndLow(IntX , 4) RunX=字节集空格格式化(RunX) var RunY=W_HighAndLow(IntY , 4) RunY=字节集空格格式化(RunY) var RunMapID=W_HighAndLow(IntMapID , 8) RunMapID=字节集空格格式化(RunMapID) // traceprint("1C 00 F2 03 01 00 00 00 01 00 00 00 " & RunX &" "& RunY &" 00 00 00 00" & RunMapID &" A6 26 00 00") //这个是调试的 SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 " & RunX &" "& RunY &" 00 00 00 00 " & RunMapID &" A6 26 00 00") end function IslandTrade() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) // SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") // 0 SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(55000) SendAutoRun(2010,999, 590) sleep(68000) SendAutoRun(5000,550, 427) sleep(65000) // messagebox("sdfsdf") SendMsgtoService(#10,"10 00 EF 07 FA 0A 00 00 00 00 00 00 00 00 00 00") // sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function GobiTrade() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(60000) SendAutoRun(2010,617, 873) sleep(80000) SendAutoRun(3000,519, 861) sleep(73000) SendMsgtoService(#10,"10 00 EF 07 F7 0A 00 00 00 00 00 00 00 00 00 00") // sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function SwampTrade() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(60000) SendAutoRun(2010,617, 873) sleep(100000) SendAutoRun(3000,935, 1288) sleep(200000) SendAutoRun(7000,466, 538) sleep(90000) SendMsgtoService(#10,"10 00 EF 07 F8 0A 00 00 00 00 00 00 00 00 00 00") //卖掉木材 sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function IcePlainTrade() var len=50 for(var i = 0; i < len; i++) SendMsgtoService(#10,"10 00 EF 07 F5 0A 00 00 00 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 03 65 01 00 00 00 00 00 00 00") // 3是选项 sleep(300) SendMsgtoService(#1C,"1C 00 F2 03 01 00 00 00 01 00 00 00 D7 05 1D 04 00 00 00 00 E8 03 00 00 A6 26 00 00") //WoodCity sleep(60000) SendAutoRun(2010,617, 873) sleep(100000) SendAutoRun(3000,935, 1288) sleep(210000) SendAutoRun(7000,740, 1066) sleep(130000) SendAutoRun(4000,407, 376) sleep(60000) SendMsgtoService(#10,"10 00 EF 07 F9 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00") // sleep(200) SendMsgtoService(#11,"11 00 F0 07 00 00 00 00 00 00 00 65 01 00 00 00 00 00 00 00") sleep(200) SendMsgtoService(#0B,"0B 00 F7 03 00 00 00 00 43 01 00 00") //into view sleep(2000) SendMsgtoService(#01C,"1C 00 F2 03 F7 2A 13 00 00 00 00 00 B4 03 7A 03 00 00 00 00 E8 03 00 00 8D 26 00 00") sleep(3000) end end function SendMsgtoService(SizeSend,DataSend) data(0,SendContentAddr,"00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00") 写data(0,SendContentAddr,DataSend)//清零操作 AsmClear() MOV_ECX_Value(g_objNetwork) Push(SizeSend) Push(SendContentAddr) MOV_EDX_Value(SendMsg) Call_EDX() RunAsmCode(0,0) end function 字节集空格格式化(DataString) 变量 Code 遍历( 变量 i = 0; i <字符串长度(DataString); i=i+2) Code=Code &" "& 字符串截取(DataString,i,i+2) 结束 Code=字符串修剪(Code) return Code end function MoveByRide(MyPosX,MyPosY,IntX, IntY) 变量 MyPos_X=W_HighAndLow(MyPosX , 4) MyPos_X=字节集空格格式化(MyPos_X) 变量 MyPos_Y=W_HighAndLow(MyPosY , 4) MyPos_Y=字节集空格格式化(MyPos_Y) 变量 RunX=W_HighAndLow(IntX , 4) RunX=字节集空格格式化(RunX) 变量 RunY=W_HighAndLow(IntY , 4) RunY=字节集空格格式化(RunY) // traceprint("1C 00 F2 03 BF A9 7D 01 F0 E5 30 00 " & MyPos_X &" "& MyPos_Y &" 00 00 00 00 "& RunX &" "& RunY &" 4A 25 00 00") //这个是调试的 SendMsgtoService(#1C,"1C 00 F2 03 BF A9 7D 01 F0 E5 30 00 " & MyPos_X &" "& MyPos_Y &" 00 00 00 00 "& RunX &" "& RunY &" 4A 25 00 00") end |