应客户要求。需要再沙巴克整顿买卖物品,存仓库等操作。
然后去蜈蚣洞挂机打金~
以下是完整脚本。
-----------------------------------------------
local g_hpnum=4 --红药数量
local g_hpname="超级金创药"
local g_mpnum=4 --蓝药数量
local g_mpname="超级魔法药"
local g_hcname="行会回城卷"
local g_hcnum=1
function 回城()
设置穿人穿怪(true)
--买回城卷/护身
local hcnum=获取物品数量(g_hcname)
local buyhc=(hcnum<g_hcnum)
if buyhc then
移动到范围2("3",346,334,11)
等待(1500)
坐标对话(346,334)
等待(1500)
选择("@buy")
等待(1500)
买(g_hcname,g_hcnum-hcnum,1500)
end
--存仓
if 是否需要存() then
移动到范围2("0152",7,12,5)
等待(1500)
坐标对话(7,12)
等待(1500)
选择("@storage")
等待(1500)
存()
end
--卖、修理手镯
bsold=是否需要卖(24,26)
local brepair5=是否需要修理(50,5)
local brepair6=是否需要修理(50,6)
if bsold or brepair5 or brepair6 then
移动到范围2("0154",14,7,5)
等待(1500)
if bsold then
坐标对话(14,7)
等待(1500)
选择("@sell")
等待(1500)
卖(24,26)
end
if brepair5 or brepair6 then
坐标对话(14,7)
等待(1500)
选择("@s_repair")
等待(1500)
if brepair5 then
修理(5)
end
if brepair6 then
修理(6)
end
end
end
--卖、修理戒指
bsold=是否需要卖(22,23)
local brepair7=是否需要修理(50,7)
local brepair8=是否需要修理(50,8)
if bsold or brepair7 or brepair8 then
移动到范围2("0154",10,15,5)
等待(1500)
if bsold then
坐标对话(10,15)
等待(1500)
选择("@sell")
等待(1500)
卖(22,23)
end
if brepair7 or brepair8 then
坐标对话(10,15)
等待(1500)
选择("@s_repair")
等待(1500)
if brepair7 then
修理(7)
end
if brepair8 then
修理(8)
end
end
end
--卖、修理项链
bsold=是否需要卖(19,20,21)
local brepair3=是否需要修理(50,3)
if bsold or brepair3 then
移动到范围2("0154",3,18,5)
等待(1500)
if bsold then
坐标对话(3,18)
等待(1500)
选择("@sell")
等待(1500)
卖(19,20,21)
end
if brepair3 then
坐标对话(3,18)
等待(1500)
选择("@s_repair")
等待(1500)
修理(3)
end
end
--卖衣服
bsold=是否需要卖(10,11)
local brepair0=是否需要修理(80,0) --衣服
if bsold or brepair0 then
移动到范围2("0155",13,7,5)
等待(1500)
if bsold then
坐标对话(13,7)
等待(1500)
选择("@sell")
等待(1500)
卖(10,11)
end
if brepair0 then
坐标对话(13,7)
等待(1500)
选择("@s_repair")
等待(1500)
修理(0)
end
end
--头盔
bsold=是否需要卖(15)
local brepair2=是否需要修理(80,2) --头盔
if bsold or brepair2 then
if bsold then
移动到范围2("0155",9,11,5)
等待(1500)
坐标对话(9,11)
等待(1500)
选择("@sell")
等待(1500)
卖(15)
end
if brepair2 then
移动到范围2("0155",9,11,5)
等待(1500)
坐标对话(9,11)
等待(1500)
选择("@s_repair")
等待(1500)
修理(2)
end
end
--卖武器 修武器
local bsold=是否需要卖(5,6)
local brepair1=是否需要修理(80,1)
if bsold or brepair1 then
等待(1500)
if bsold then
移动到范围2("0151",7,14,5)
等待(1500)
坐标对话(7,14)
等待(1500)
选择("@sell")
等待(1500)
卖(5,6)
end
if brepair1 then
移动到范围2("0151",7,14,5)
等待(1500)
坐标对话(7,14)
等待(1500)
选择("@s_repair")
等待(1500)
修理(1)
end
end
--买药
local hpnum=获取物品数量(g_hpname)
local mpnum=获取物品数量(g_mpname)
local buyhp=(hpnum<g_hpnum)
local buymp=(mpnum<g_mpnum)
if buyhp or buymp then
移动到范围2("0153",14,7,5)
等待(1500)
坐标对话(14,7)
等待(1500)
选择("@buy")
等待(1500)
if buyhp then
买(g_hpname,g_hpnum-hpnum,1500)
end
if buymp then
买(g_mpname,g_mpnum-mpnum,1500)
end
end
local hcnum=获取物品数量(g_hcname)
local buyhc=(hcnum<g_hcnum)
if buyhc then
移动到范围2("3",663,304,5)
等待(1500)
坐标对话(663,304)
等待(1500)
选择("@buy")
等待(1500)
买(g_hcname,g_hcnum-hcnum,1500)
end
--去蜈蚣洞
移动到范围2("D601",200,213,6)
等待(1500)
return 挂机()
end
function 挂机()
开始挂机()
使用物品(g_hcname)
等待(1500)
return 回城()
end
do
--添加地图出入口
添加地图出口("3",683,285,"0154",false)
添加地图出口("0154",17,11,"3",false)
添加地图出口("3",672,274,"0155",false)
添加地图出口("0155",18,10,"3",false)
添加地图出口("3",634,312,"0151",false)
添加地图出口("0151",6,23,"3",false)
添加地图出口("3",645,325,"0153",false)
添加地图出口("0153",18,10,"3",false)
添加地图出口("3",637,242,"0152",true)
添加地图出口("0152",10,16,"3",false)
添加地图出口("3",139,85,"D601",false)
添加地图出口("D610",30,30,"D601",false)
添加地图出口("D601",149,55,"D610",false)
添加地图出口("D603",81,81,"D610",false)
添加地图出口("D610",30,15,"D603",false)
添加地图出口("D608",18,22,"D603",false)
添加地图出口("D603",41,194,"D608",false)
添加地图出口("D604",149,132,"D608",false)
添加地图出口("D608",17,33,"D604",false)
添加地图出口("D605",42,19,"D608",false)
添加地图出口("D608",32,32,"D605",false)
添加地图出口("D609",14,34,"D605",false)
添加地图出口("D605",42,124,"D609",false)
添加地图出口("D609",22,13,"D612",false)
添加地图出口("D612",199,51,"D609",false)
添加地图出口("D616",26,16,"D612",false)
添加地图出口("D612",283,232,"D616",false)
添加地图出口("D617",43,42,"D616",false)
添加地图出口("D616",86,17,"D617",false)
添加地图出口("D618",53,21,"D617",false)
添加地图出口("D617",90,11,"D618",false)
添加地图出口("D615",88,75,"D618",false)
添加地图出口("D618",13,83,"D615",false)
添加地图出口("D606",9,25,"D618",false)
添加地图出口("D618",160,170,"D606",false)
添加地图出口("D613",12,13,"D618",false)
添加地图出口("D618",149,65,"D613",false)
添加地图出口("D613",8,50,"D612",false)
添加地图出口("D612",202,187,"D613",false)
添加地图出口("D614",69,65,"D612",false)
添加地图出口("D612",9,182,"D614",false)
添加地图出口("D611",59,70,"D612",false)
添加地图出口("D612",11,15,"D611",false)
添加地图出口("D604",155,36,"D611",false)
添加地图出口("D611",32,71,"D604",false)
添加地图出口("D611",55,37,"D603",false)
添加地图出口("D603",185,82,"D611",false)
添加地图出口("D607",16,29,"D601",false)
添加地图出口("D601",52,14,"D607",false)
添加地图出口("D602",110,86,"D607",false)
添加地图出口("D607",31,8,"D602",false)
添加地图出口("D602",45,22,"D605",false)
添加地图出口("D605",173,60,"D602",false)
添加地图出口("D611",32,40,"D602",false)
添加地图出口("D602",177,33,"D611",false)
设置来回挂机路线()
添加挂机路线点2("D601",200,213,3)
添加挂机路线点2("D601",185,112,3)
添加挂机路线点2("D601",162,66,3)
添加挂机路线点2("D603",166,159,3)
添加挂机路线点2("D603",31,198,3)
添加挂机路线点2("D605",62,26,3)
添加挂机路线点2("D605",46,130,3)
添加挂机路线点2("D612",230,253,5)
添加挂机路线点2("D612",14,205,5)
添加挂机路线点2("D614",72,70,5)
添加挂机路线点2("D614",25,73,5)
添加挂机路线点2("D614",16,23,5)
添加挂机路线点2("D615",57,87,5)
添加挂机路线点2("D615",15,63,5)
添加挂机路线点2("D615",51,56,5)
添加挂机路线点2("D615",61,24,5)
添加挂机路线点2("D615",85,83,5)
添加挂机路线点2("D618",21,96,5)
添加挂机路线点2("D618",76,85,5)
添加挂机路线点2("D618",29,187,5)
添加挂机路线点2("D618",89,175,5)
添加挂机路线点2("D606",20,38,6)
添加挂机路线点2("D606",71,75,6)
添加挂机路线点2("D606",58,164,6)
添加挂机路线点2("D606",95,74,6)
添加挂机路线点2("D606",124,116,6)
添加挂机路线点2("D606",183,103,6)
--开始
local mapid=获取地图id()
if string.sub(mapid,1,2)=="D6" then
挂机()
else
回城()
end
end
|