脚本尚未完全完成,例如在您输入类似传送的输入之后,除了传送它没有做任何事情,我只是从来没有添加任何东西,因为脚本本身不会跑来确认我的工作
所以我的问题 -
它应该做的是
像素搜索您选择的矿石,然后左键单击找到颜色的位置
现在,你所有人都在等待......实际的脚本!
矿石代码
Global $clay = "clay"
PixelSearch(330, 161, 808, 614,0xCCB481, 0, 0x000000000013019E)
Global $copper = "copper"
PixelSearch(330, 161, 808, 614, 0xF58C4C, 0, 0x00000000004D024A)
Global $tin = "tin"
$tin = PixelSearch(330, 161, 808, 614, 0x8A7F7F, 0, 0x00000000004D024A)
Global $iron = "iron"
PixelSearch(330, 161, 808, 614, 0x744230, 0, 0x00000000004D024A)
Global $coal = "coal"
PixelSearch(330, 161, 808, 614, 0x1F1F1D, 0, 0x00000000004D024A)
Global $mithril = "mithril"
PixelSearch(330, 161, 808, 614, 0x66679F, 0, 0x00000000004D024A)
Global $adamantite = "adamantite"
PixelSearch(330, 161, 808, 614, 0x628164, 0, 0x00000000004D024A)
Global $rune = "rune"
PixelSearch(330, 161, 808, 614, 0x74B1BA, 0, 0x000000000013019E)
;teleports
Global $fallador = "fally"
Global $lumbridge = "lumby"
Global $traverly = "trav"
Global $alkharid = "alkh"
Global $portsarim = "port"
Global $draynor
Global $varrock
HotKeySet("ESC", "Terminate")
Func Terminate()
Exit 1
EndFunc
Func teleports()
If $fallador Then
MouseClick("left", 24, 386, 1, 10) ; click loadstone
Sleep(2000)
MouseClick("left", 697, 404, 1, 10) ; click location
sleep(15000)
ElseIf $lumbridge Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("Left", 746, 459, 1, 10)
Sleep(20000)
ElseIf $traverly Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("left", 666, 385, 1, 10)
Sleep(20000)
ElseIf $alkharid Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("left", 785, 452, 1, 10)
sleep(20000)
ElseIf $portsarim Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("left", 696, 447, 1, 10)
Sleep(18000)
ElseIf $draynor Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("Left", 732, 422, 1, 10)
Sleep(19000)
ElseIf $varrock Then
MouseClick("left", 24, 386, 1, 10)
Sleep(2000)
MouseClick("left", 769, 390, 1, 10)
sleep(17000)
EndIf
EndFunc
Func Mine() ; the actual mining function
InputBox("Select ore", "please enter what you want to mine") ; input box so user can decide what they want to mine
InputBox("LOADSTONES REQUIRED!!!", "Please enter the Location you wish to mine") ; input box that will teleport you
If $clay Then
MouseClick("left", 703, 554, 1, 25)
ElseIf $copper Then
MouseClick("left",676, 343 , 1, 25)
ElseIf $tin Then
MouseClick("left", 498, 301, 1, 25)
ElseIf $iron Then
MouseClick("left", 585, 426, 1, 15)
ElseIf $coal Then
MouseClick("left",683, 229 , 1, 28)
ElseIf $mithril Then
MouseClick("left", 508, 280, 1, 18)
ElseIf $adamantite Then
MouseClick("left", 449, 414, 1, 19)
ElseIf $rune Then
MouseClick("left", 1,1, 1, 28)
EndIf
While 1
if mine() = 1 Then
sleep(0)
ElseIf mine() = 0 Then
mine()
EndIf
WEnd
Random(0, 5000,0) ; random movements throughout the mining bot
if Random >=2499 Then
Send("north",0)
ElseIf Random = 2500 Then
Send("west",0)
ElseIf Random <= 2501 Then
Send("east", 0)
ElseIf Random = 5000 Then
Send("south",0)
EndIf
EndFunc
这将是在这里,但我没有耐心也不关心弄清楚弹出窗口有关更改它的内容,所以这里是脚本的键盘的链接。 (使用SciTE编译器进行AUTOIT)
答案 0 :(得分:0)
您只需在脚本中添加如下所示的无限循环。
While 1
Sleep(100)
WEnd
答案 1 :(得分:0)
不确定无限循环如何帮助你。您需要添加更多逻辑。
也许您只需要查看更多甜蜜的宏代码。
这是我为另一款游戏制作的自制宏:
它有一个可能派上用场的消息输入示例。它还能够暂停,显示状态文本,检查精确的像素颜色等。
我认为构建宏的人,就像你自己一样,是那里最聪明的人。