fadreus wrote:
Why you wanna use eventMacro when you can use normal macro?

If you really masochist type (

) going da trouble with eventMacro, you can use something like this
Code:
automacro OhShetRedPotGone {
InMap pay_in01
exclusive 1
run-once 1
call CrapBetterBuyPot
}
macro CrapBetterBuyPot {
if (&invamount (Red Potion) <= 0) goto ShetBotDumbCantCalculateWeight
stop
:ShetBotDumbCantCalculateWeight
do autosell; release GotMaPotNowMaNigga
stop
}
automacro GotMaPotNowMaNigga {
inMap payon
run-once 1
exclusive 1
call YeyMaNiggaPotIsHere
}
macro YeyMaNiggaPotIsHere {
if (&invamount (Red Potion) <= 0) goto ShetAintBuyNoPot
if (&invamount (Red Potion) >= 300) goto ThisPotAintGoingNoWhereNow
:ShetAintBuyNoPot
call CrapBetterBuyPot
:ThisPotAintGoingNoWhereNow
release OhShetRedPotGone
log I Got Ma Nigga Pot Now!
}
The use macro.txt "console" function makes the kore a bit slower! (at least is what everyone says)
Your idea would work if the only item the kore will buy is red potion!
But in the scenario where it buys red potion and fly wing... if the fly wing is over but openkore still have some red potion in inventory it will never proc.
When i got home I will test this... but it should work
src\Network\Receive\ServerType0.pm
Lines 1350
Code:
} elsif ($args->{fail} == 1) {
error T("Buy failed (insufficient zeny).\n");
} elsif ($args->{fail} == 2) {
error T("Buy failed (insufficient weight capacity).\n");
Change to:
Code:
} elsif ($args->{fail} == 1) {
error T("Buy failed (insufficient zeny).\n");
use Plugins;
Plugins::callHook("Buy_failed");
} elsif ($args->{fail} == 2) {
error T("Buy failed (insufficient weight capacity).\n");
use Plugins;
Plugins::callHook("Buy_failed");
And in eventMacros.txt
Code:
automacro autoSellWhenBuyCrash {
SimpleHookEvent Buy_failed
run-once 1
call {
do autosell
pause 2
release autoSellWhenBuyCrash
}
}