Page 2 of 5
Re: Миниг и рекол.
Posted: 2012-11-28 22:02:12
by Incorrect User
Теперь ходилка, в пилоте строка проверки координат для того чтобы знать куда делать шаги выглядела так
Code: Select all
if ((charposx = 378) and (charposy = 1428)) or ((charposx = 358) and (charposy = 1443)) or ((charposx = 358) and (charposy = 1452)) or ((charposx = 4038) and (charposy = 455))
Как это будет выглядеть в инжекте?
Re: Миниг и рекол.
Posted: 2012-11-28 22:16:15
by Incorrect User
На 27 линии
wait(100) парсер, проблема я так понимаю в том что неправильно условия в 26 записал, в чем ошибка?
Code: Select all
var pause
pause = 0
sub Mining()
var coordx, coordy, coordz, tilex, tiley, circle
circle = 0
coordx = uo.getx('self')
coordy = uo.gety('self')
coordz = uo.getz('self')
for tilex = coordx - 2 to coordx + 2
for tiley = coordy - 2 to coordy + 2
mine:
uo.deletejournal()
uo.waittargettile('1339', str(tilex), str(tiley), str(coordz))
uo.usetype(0x0E85, 0x0000)
wait(500)
if not uo.LastGump('replyed') then
if uo.LastGump('text', 0) == 'Antimacros System' then
while not uo.injournal('success')
AntiMacros()
wait(1000)
wend
endif
goto mine
endif
while not uo.injournal('put'|'fail'|'far away'|'loosen'|'no ore'|'no line'|'try mining')
wait(100)
wend
if uo.injournal(put) and uo.injournal('iron'|'marble') then
circle = circle + 1
else
if uo.injournal('put')then
circle = 2
endif
endif
if not uo.injournal('no ore'|'far away'|'no line'|'try mining') or circle > 1
goto mine
endif
next
next
uo.msg('Закончил!')
end sub
Re: Миниг и рекол.
Posted: 2012-11-28 23:00:53
by Incorrect User
Переделал, теперь если вводит антимакрос то не копает, просто стоит и дергается мышка, если остановить и снова запустить когда антимакрос не нужно вводить больше то начинает копать нормально. В чем ошибка?
Code: Select all
var pause
pause = 0
sub Mining()
var coordx, coordy, coordz, tilex, tiley, circle
circle = 0
coordx = uo.getx('self')
coordy = uo.gety('self')
coordz = uo.getz('self')
for tilex = coordx - 2 to coordx + 2
for tiley = coordy - 2 to coordy + 2
mine:
uo.deletejournal()
uo.waittargettile('1339', str(tilex), str(tiley), str(coordz))
uo.usetype(0x0E85, 0x0000)
wait(500)
if not uo.LastGump('replyed') then
if uo.LastGump('text', 0) == 'Antimacros System' then
while not uo.injournal('success')
AntiMacros()
wait(500)
wend
endif
endif
while not uo.injournal('put') and not uo.injournal('fail') and not uo.injournal('far away') and not uo.injournal('loosen') and not uo.injournal('no ore') and not uo.injournal('no line') and not uo.injournal('try mining')
wait(100)
wend
if uo.injournal('put') and (uo.injournal('iron') or uo.injournal('marble')) then
circle = circle + 1
else
if uo.injournal('put') then
circle = 2
endif
endif
if not uo.injournal('far away') and not uo.injournal('loosen') and not uo.injournal('no ore') and not uo.injournal('no line') and not uo.injournal('try mining') and not circle > 1 then
goto mine
endif
next
next
uo.msg('Çàêîí÷èë!')
end sub
sub AntiMacros()
dim reindex[8]
reindex[0] = 11
reindex[1] = 12
reindex[2] = 13
reindex[3] = 10
reindex[4] = 16
reindex[5] = 14
reindex[6] = 17
reindex[7] = 15
var GumpID = 0
var ButtonID = 0
var ButtonText
var i = 18
if uo.LastGump('text', 4) <> "0" then
i = 19
end if
GumpID = val(Mid(uo.LastGump('command', i), 16, 4))
ButtonID = reindex[GumpID-2225]
ButtonText = uo.LastGump('command', ButtonID)
uo.LClick(Val(Mid(ButtonText, 7, 3)), Val(Mid(ButtonText, 11, 3)))
while not uo.LastGump('replyed')
wait(100)
wend
end sub
Re: Миниг и рекол.
Posted: 2012-11-28 23:17:25
by Incorrect User
Заработало. Забыл что сообщения чувствительны к регистру.
Re: Миниг и рекол.
Posted: 2012-11-28 23:33:31
by Incorrect User
Проблема, не копает руду по 2 раза как мне нужно, что не так?
Code: Select all
var pause
pause = 0
sub Mining()
var coordx, coordy, coordz, tilex, tiley, circle
circle = 0
coordx = uo.getx('self')
coordy = uo.gety('self')
coordz = uo.getz('self')
for tilex = coordx - 2 to coordx + 2
for tiley = coordy - 2 to coordy + 2
mine:
uo.deletejournal()
uo.waittargettile('1339', str(tilex), str(tiley), str(coordz))
uo.usetype(0x0E85, 0x0000)
wait(500)
if not uo.LastGump('replyed') then
if uo.LastGump('text', 0) == 'Antimacros System' then
while not uo.injournal('Success')
AntiMacros()
wait(500)
wend
goto mine
endif
endif
while not uo.injournal('put') and not uo.injournal('fail') and not uo.injournal('far away') and not uo.injournal('loosen') and not uo.injournal('no ore') and not uo.injournal('no line') and not uo.injournal('mining in rock')
wait(100)
wend
if uo.injournal('put') and ((uo.injournal('iron')) or (uo.injournal('Marble'))) then
circle = circle + 1
else
if uo.injournal('put') then
circle = 2
endif
endif
if not uo.injournal('far away') and not uo.injournal('loosen') and not uo.injournal('no ore') and not uo.injournal('no line') and not uo.injournal('mining in rock') and not circle > 1 then
goto mine
endif
next
next
end sub
Если выкопали айрон или марбл то ставим circle 1 и скрипт дожлен копать в том же тайле еще раз, но этого не происходит. Кусок который за это отвечает
Code: Select all
if uo.injournal('put') and ((uo.injournal('iron')) or (uo.injournal('Marble'))) then
circle = circle + 1
else
if uo.injournal('put') then
circle = 2
endif
endif
Re: Миниг и рекол.
Posted: 2012-11-28 23:40:53
by Incorrect User
Попробовал так, тоже не работает.
Code: Select all
if uo.injournal('put the iron') or uo.injournal('put the Marble') then
Re: Миниг и рекол.
Posted: 2012-11-29 01:32:06
by Incorrect User
Никак не выходит...
Re: Миниг и рекол.
Posted: 2012-11-29 10:12:58
by Juicy Fruit
Code: Select all
while not uo.injournal('put|fail|far away|loosen|no ore|no line|try mining')
В одном из твоих вариантов.
Только мессаги побольше сделай, ато так может быть больше совпадений, чем нужно.
Re: Миниг и рекол.
Posted: 2012-11-29 11:14:44
by ZeroDX
Re: Миниг и рекол.
Posted: 2012-11-29 17:05:23
by Incorrect User
Мне нужно делать не circle = 1 а circle = его текущее значение + 1 В уо пилоте так и пишется circle = circle(текущее его значение) + 1, как это написать?
Re: Миниг и рекол.
Posted: 2012-11-29 17:09:11
by Incorrect User
Может просто circle + 1?
Re: Миниг и рекол.
Posted: 2012-11-29 17:30:18
by Juicy Fruit
Re: Миниг и рекол.
Posted: 2012-11-29 17:38:17
by ZeroDX
начинаю понимать логику

Re: Миниг и рекол.
Posted: 2012-11-29 17:43:26
by Incorrect User
Значит я правильно написал про circle, запутываете ребяты

Вот эта строка правильная?
Code: Select all
if not uo.injournal('far away|loosen|no ore|no line|try mining') or not circle > 1 then
Re: Миниг и рекол.
Posted: 2012-11-29 18:06:01
by ZeroDX
ни чё я не начал понимать
Вот что сделал.
Code: Select all
Sub MiningAround()
var x, y, more, timer, msg = "in rock|far away|no line|no ore|try mining|put|fail|loosen"
for x = -2 to 2
for y = -2 to 2
repeat
more = 0
timer = uo.timer()
deljournal(msg + "|iron ore|Marble")
uo.waittargettile(1339, uo.getx() + x, uo.gety + y, uo.getx())
uo.usetype("0x0E85")
repeat
wait(100)
if not uo.lastgump("replyed") and uo.lastgump("text", 0) == "Antimacros System" then
antimacros()
uo.usetype("0xE85")
end if
until uo.injournal(msg) ot timer + 50 <= uo.timer()
if uo.injournal("iron ore|Marble|loosen") then
more = 1
end if
until not more
next
next
end sub
Sub deljournal(msg)
while uo.injournal(msg)
uo.setjournalline(uo.injournal(msg) - 1, "")
wend
end sub
Re: Миниг и рекол.
Posted: 2012-11-29 18:09:35
by ZeroDX
Incorrect User wrote:Значит я правильно написал про circle, запутываете ребяты

Вот эта строка правильная?
Code: Select all
if not uo.injournal('far away|loosen|no ore|no line|try mining') or not circle > 1 then
На второй круг пойдёт только если в момент проверки переменная будет иметь значение не больше 1. такое значение она может иметь только 2 раза: в первый прогон, и если выкопается айрон, то и во второй. переменная ставится в ноль только перед началом обкопки
Re: Миниг и рекол.
Posted: 2012-11-29 18:17:57
by Incorrect User
Так это и нужно, в начале каждого тайла ставится значение 0, и если 1 раз выкопал то ставится значение 0 + 1, и если выкопал еще раз то значение 1 + 1, а это > 1 как нам и нужно и скрипт будет переходить на новый круг.
Re: Миниг и рекол.
Posted: 2012-11-29 18:23:21
by Incorrect User
]Sub MiningAround()
var x, y, more, timer, msg = "in rock|far away|no line|no ore|try mining|put|fail|loosen"
for x = -2 to 2
for y = -2 to 2
repeat
more = 0
timer = uo.timer()
deljournal(msg + "|iron ore|Marble")
uo.waittargettile(1339, uo.getx() + x, uo.gety + y, uo.getx())
uo.usetype("0x0E85")
repeat
wait(100)
if not uo.lastgump("replyed") and uo.lastgump("text", 0) == "Antimacros System" then
antimacros()
uo.usetype("0xE85") Антимакрос вводится за 1 раз одно число из двух, после ввода числа гамп исчезает и появляется заново чтобы ввести второе число, юз кирки собьет ввод и просто вызовет новый антимакрос.
end if
until uo.injournal(msg) ot timer + 50 <= uo.timer()
if uo.injournal("iron ore|Marble|loosen") then
more = 1
end if
until not more
next
next
end sub
Sub deljournal(msg)
while uo.injournal(msg)
uo.setjournalline(uo.injournal(msg) - 1, "")
wend
end sub
Re: Миниг и рекол.
Posted: 2012-11-29 18:30:19
by Incorrect User
А так очень хорошо, довольно сжато, хорошо когда знаешь синтаксис
Доделаю его. А вот со скриптом на проверку, я думал сделать про теку итемов как и все, но это не очень гуманно если конечно инжект не находит их в хайде

Я хочу сделать просто по проверке сообщений, когда появляеться сообщение you see то сравнивать его с теми что указаны заранее в условии и если нет совпадения то рекол. Зачем так делать, во первых не будет крашей, во вторый иногда бывает что когда из далека бежит игрок то сначала видно имя а уже потом он появляется на экране, да и срабатывать должно резвее, во всяком случае такая схема на пилоте еще не подводила, чтобы было понятнее что я имею ввиду я покажу скрипт рекола с пилота
Code: Select all
set $se You see:
set $st Stalagmites
set $or Ore Guardian
set $sp Spider
set $ha Harpy
set $fl Floor
set $mo Vortex
set $mo2 Frost Dragon
:tracking
while_not $msg <= $se
set $msg lastmsg
end_while
stop_script 2
goto check
:check
if_not ($msg <= $fl) or ($msg <= $or) or ($msg <= $sp) or ($msg <= $ha) or ($msg <= $st) or ($msg <= $mo) or ($msg <= $mo2)
stop_script 0
goto recall
end_if
if $msg <= $or
pause_script 0
goto targetid
else
set $msg 0
goto tracking
end_if
Re: Миниг и рекол.
Posted: 2012-11-29 18:33:02
by Incorrect User
Только в пилоте у меня были совмещены два скрипта на трекинг игроков и убивание гвардов, а тут я хочу сделать 2 одинаковых, но один реагирует на появление гвардов а второй на людей, чтобы когда скрипт убивает гварла проверка на людей не прерывалась.