Hello Guys, Good Morning!
I need a little help to modify an ancient herding script I have here. he used to harvest and clean reagents.
I will explain to you the changes:
spoon:
- before: in the script, click the character countless times on the plantation to collect all journal and leave 'stopped spoon'
- as it should be: just click on an x planting and wait out the speech in the journal.
clean:
-before: it runs clean every 4000 (2000 and 2000 of sleeep wait)
-as it should be: it will run clear when it appears in journal ('xxxxxx') then it checks for more than 50 reagents for cleaning, if so clean, if not, the macro continues.
the rest of the script, I think everything is ok, but if you guys find something better to add, thank you.
good would like to help me change it there, thank you
Herding - Help For Modification
Moderators: Murderator+, Murderator
Herding - Help For Modification
Last edited by brazil on 2011-01-07 15:48:13, edited 1 time in total.
Re: Herding - Help For Modification
I recommend you to use this link:
http://coop.myftp.org/utils/codesweeper.htm
to make a correct spaces in script. So you get something like this:
Otherwise it's very difficult to read your code.
http://coop.myftp.org/utils/codesweeper.htm
to make a correct spaces in script. So you get something like this:
Code: Select all
###Colhe somente de norte (começando) a sul (terminando)
########################################################
################## CONFIGURAÇÕES #######################
########################################################
##Entre com o type da planta
##ex: var type_planta="0x0C7D";
var type_planta="0x18E9";
##algodao0x1A9B milho0x0C7D ns0x18E5 gs0x18E9 mr0x18DF ga0x18E1
##Entre com o type do reag sujo (se não usar sete 0 (zero))
##ex: var type_reagsujo="0x0000";
var type_reagsujo=0x18EB;
##gs0x18EB mr0x18DD ga0x18E3
########################################################
sub colher()
if (type_reagsujo) then
UO.Exec("exec limpar")
end if
UO.Set("finddistance","1")
var plantinha;
var direcao="S";
inicio:
UO.IgnoreReset()
refind:
uo.findtype(type_planta,'-1','ground')
If Uo.FindCount() >= 1 then
plantinha=achar_plantinha('finditem',direcao)
if (plantinha == 0) then
uo.ignore('finditem');
goto refind
end if
else
#andar 1 passo para E e procurar plantinha para N/S
Andar(direcao,1)
wait(1000)
Andar("E",1)
if direcao == "S" then
direcao="N";
else
direcao="S";
end if
goto inicio
end if
colher_plantinha(plantinha);
Andar(direcao,1)
EsperarLag()
wait(2000)
goto inicio
end sub
sub colher_plantinha(item)
uo.DeleteJournal("parou de colher")
UO.Print("Colhendo plantinha ("+UO.GetSerial(item)+")")
repeat
uo.useobject(UO.GetSerial(item))
wait(2000)
until uo.injournal("parou de colher")
return 1;
end sub
sub achar_plantinha(item,direcao)
##direção S
if (direcao == "S") then
if UO.GetX(item) == UO.GetX() and UO.GetY(item) == (UO.GetY() + 1) then
UO.Print("Plantinha encontrada ("+UO.GetSerial(item)+")")
return UO.GetSerial(item);
end if
return 0;
end if
##direção N
if (direcao == "N") then
if UO.GetX(item) == UO.GetX() and UO.GetY(item) == (UO.GetY() - 1) then
UO.Print("Plantinha encontrada ("+UO.GetSerial(item)+")")
return UO.GetSerial(item);
end if
return 0;
end if
end sub
sub limpar()
inicio:
while uo.count(type_reagsujo) > 0
uo.usetype(type_reagsujo)
sleep(4000)
wend
sleep(4000)
goto inicio
end sub
sub Andar(direcao,passos)
var x=uo.GetX()
var y=uo.GetY()
var j=1
if direcao == "N" then
while (passos > 0)
uo.press(33)
wait(600)
if j==1 and y == uo.GetY() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "S" then
while (passos > 0)
uo.press(35)
wait(600)
if j==1 and y == uo.GetY() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "W" then
while (passos > 0)
uo.press(36)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "E" then
while (passos > 0)
uo.press(34)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "NW" then
while (passos > 0)
uo.press(38)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "NE" then
while (passos > 0)
uo.press(39)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "SE" then
while (passos > 0)
uo.press(40)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
if direcao == "SW" then
while (passos > 0)
uo.press(37)
wait(600)
if j==1 and x == uo.GetX() then
j=0
passos=passos+1
endif
passos=passos-1
wend
endif
end sub
sub EsperarLag()
UO.DeleteJournal('Mochila')
UO.Click(UO.ObjAtLayer('Bpack'))
repeat
wait(100)
until UO.InJournal('Mochila')
end sub
Otherwise it's very difficult to read your code.
Все мы славные ребята, простые русские парни, железные люди с деревянными головами...
Re: Herding - Help For Modification
Well, I apologize for the delay but was absent this time.
I will explain how the script.
The character will look for crops that are named in the variable in your lap, and began to reap N to S.
When you reach the last row of this plan, he will turn to E, and now begin to reap from S to N, that is, doing it will zig-zag and harvesting the plants and cleaning them.

But what happens is that the system of herding changed my shard.
Before, you had to click on the 20x plant to harvest it, we now need only 1x. and the same thing to clear before you would have to clean seed by seed, now you clicking a single seed dirty, he cleaned all of the backpack.
I like to modify this script to the following form.
* What 1X only click on top of the plant and wait in the newspaper ("stopped harvesting") and continue after the macro.
* That when he tells dirty 50 reagents in the backpack he's a stop at the script, and then only in a reagent 1x dirty to clean them and wait appear in the newspaper ("you stopped washing") and after it, keep the macro achar_plantinha and spoon.
* good, I would too, if it was not difficult to include this script to plant some seeds, should not be difficult ...
* Usetype 0x0000 'self'
* Wait journal ('you planted')
* Walk S
loop.
sub plantar
Thank you.
But if it is complicated to make this change could give me a script herding of you here in the forum? is that in Russian for me is very difficult to verify.
Thanks, I hope your help
=============================================================
Ну, я прошу прощения за задержку, но не было на этот раз.
Я объясню, как сценарий.
персонаж будет выглядеть для сельскохозяйственных культур, которые перечислены в переменной у вас на коленях, и начал пожинать N С.
Когда вы дойдете до последней строки этого плана, он намерен обратиться в E, и теперь начинают пожинать от S к N, то есть, делать это будет зиг-заг и сбора растений и их очистки.

Но что происходит, является то, что система выпаса изменил мою осколок.
Раньше нужно было нажать на 20x завода для сбора, мы теперь должны только 1x. и то же, чтобы очистить, прежде чем вы должны были бы чистые семена семенами, теперь вы нажатием одной семян грязный, он очищен все рюкзаке.
Я хотел бы изменить этот сценарий в следующем виде.
* Что 1X только нажать на верхнюю часть растений и ждать в газете ("остановить вырубку ") и продолжить после макроса.
*, что когда он говорит грязные 50 реагентов в рюкзак, он останавливается на сценарий, и то лишь в реагента 1x грязная, чтобы очистить их и ждать, появится в газете ("вы остановили стирка ") и после нее, сохранить макрос achar_plantinha и ложкой.
* хорошо, я бы тоже, если не трудно было включить этот сценарий, чтобы посадить семена, не должно быть трудно ...
* Usetype 0x0000 "я"
* Подождите журнала ("вы посадили")
* Прогулка S
петли.
к югу подошвенной
Спасибо.
Но если это сложно сделать эти изменения могли бы дать мне сценарий выпаса вы здесь на форуме? является то, что в Россию для меня очень трудно проверить.
Спасибо, я надеюсь, что ваша помощь
I will explain how the script.
The character will look for crops that are named in the variable in your lap, and began to reap N to S.
When you reach the last row of this plan, he will turn to E, and now begin to reap from S to N, that is, doing it will zig-zag and harvesting the plants and cleaning them.

But what happens is that the system of herding changed my shard.
Before, you had to click on the 20x plant to harvest it, we now need only 1x. and the same thing to clear before you would have to clean seed by seed, now you clicking a single seed dirty, he cleaned all of the backpack.
I like to modify this script to the following form.
* What 1X only click on top of the plant and wait in the newspaper ("stopped harvesting") and continue after the macro.
* That when he tells dirty 50 reagents in the backpack he's a stop at the script, and then only in a reagent 1x dirty to clean them and wait appear in the newspaper ("you stopped washing") and after it, keep the macro achar_plantinha and spoon.
* good, I would too, if it was not difficult to include this script to plant some seeds, should not be difficult ...
* Usetype 0x0000 'self'
* Wait journal ('you planted')
* Walk S
loop.
sub plantar
Thank you.
But if it is complicated to make this change could give me a script herding of you here in the forum? is that in Russian for me is very difficult to verify.
Thanks, I hope your help
=============================================================
Ну, я прошу прощения за задержку, но не было на этот раз.
Я объясню, как сценарий.
персонаж будет выглядеть для сельскохозяйственных культур, которые перечислены в переменной у вас на коленях, и начал пожинать N С.
Когда вы дойдете до последней строки этого плана, он намерен обратиться в E, и теперь начинают пожинать от S к N, то есть, делать это будет зиг-заг и сбора растений и их очистки.

Но что происходит, является то, что система выпаса изменил мою осколок.
Раньше нужно было нажать на 20x завода для сбора, мы теперь должны только 1x. и то же, чтобы очистить, прежде чем вы должны были бы чистые семена семенами, теперь вы нажатием одной семян грязный, он очищен все рюкзаке.
Я хотел бы изменить этот сценарий в следующем виде.
* Что 1X только нажать на верхнюю часть растений и ждать в газете ("остановить вырубку ") и продолжить после макроса.
*, что когда он говорит грязные 50 реагентов в рюкзак, он останавливается на сценарий, и то лишь в реагента 1x грязная, чтобы очистить их и ждать, появится в газете ("вы остановили стирка ") и после нее, сохранить макрос achar_plantinha и ложкой.
* хорошо, я бы тоже, если не трудно было включить этот сценарий, чтобы посадить семена, не должно быть трудно ...
* Usetype 0x0000 "я"
* Подождите журнала ("вы посадили")
* Прогулка S
петли.
к югу подошвенной
Спасибо.
Но если это сложно сделать эти изменения могли бы дать мне сценарий выпаса вы здесь на форуме? является то, что в Россию для меня очень трудно проверить.
Спасибо, я надеюсь, что ваша помощь
Re: Herding - Help For Modification
brazil I'm too lazy to examine your long script, I can help you with new one for $10