AutoTrade[Made Easy] by Gamenikko

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

dezmay
Noob
Noob
Posts: 19
Joined: 02 Jun 2008, 21:22
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#31 Post by dezmay »

andy12345 wrote:
dezmay wrote:can we add a macro for zeny check here when auto buying? like for example disconnecting when your zeny is below 200K? i've created one but it is not working. can somebody correct mine please?

automacro quitzen {
run-once 1
zeny < 199999
call {
do quit
}
}
Separate the call macro and add a release all in the end.
My new problem is it run automatic when openkore starts. What do i miss to have this auto run when zeny is less than 200k only?

automacro stop {
run-once 1
map izlude
zeny <= 199999
call quit
}

macro quit{
do chat leave
do deal no
pause 1
do quit
release all
}
andy12345
Moderators
Moderators
Posts: 174
Joined: 04 Apr 2008, 10:21
Noob?: No
Location: In your dreams...

Re: AutoTrade[Made Easy] by Gamenikko

#32 Post by andy12345 »

Are you sure you have more then 200k z? Nothing looks wrong in the code though.
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#33 Post by EternalHarvest »

May be the same issue as with amount of an item in inventory. Described in macro plugin manual along with a workaround idea (apply to zeny if possible).
dezmay
Noob
Noob
Posts: 19
Joined: 02 Jun 2008, 21:22
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#34 Post by dezmay »

EternalHarvest wrote:May be the same issue as with amount of an item in inventory. Described in macro plugin manual along with a workaround idea (apply to zeny if possible).
can you show me the way please?

now i did this

automacro lowzen {
map izlude
zeny <= 199999
call quit1
run-once 1
}

macro quit1{
do chat leave
do deal no
pause 1
do quit
release all
}

and is giving me an error:
control\macros.txt: ignoring 'automacro lowzen {' (munch, munch, unknown automacro keyword)

man im praying with openkore god to bestow me this macro knowledge. :)

and yeah i have more than 200K z
dezmay
Noob
Noob
Posts: 19
Joined: 02 Jun 2008, 21:22
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#35 Post by dezmay »

dezmay wrote:
EternalHarvest wrote:May be the same issue as with amount of an item in inventory. Described in macro plugin manual along with a workaround idea (apply to zeny if possible).
can you show me the way please?

now i did this

automacro lowzen {
map izlude
zeny <= 199999
call quit1
run-once 1
}

macro quit1{
do chat leave
do deal no
pause 1
do quit
release all
}

and is giving me an error:
control\macros.txt: ignoring 'automacro lowzen {' (munch, munch, unknown automacro keyword)

man im praying with openkore god to bestow me this macro knowledge. :)

and yeah i have more than 200K z
never mind the error just found out what cause it. so my challenge now is why does it triggers when the bot starts since i do have more than 200k z :(
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#36 Post by EternalHarvest »

dezmay wrote:why does it triggers when the bot starts since i do have more than 200k z :(
May be the same issue as with inventory item amount, described in the manual - when bot starts (or changes maps, or whatever) zeny amount may be not defined or zero.
dezmay
Noob
Noob
Posts: 19
Joined: 02 Jun 2008, 21:22
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#37 Post by dezmay »

EternalHarvest wrote:
dezmay wrote:why does it triggers when the bot starts since i do have more than 200k z :(
May be the same issue as with inventory item amount, described in the manual - when bot starts (or changes maps, or whatever) zeny amount may be not defined or zero.
got you so i need to find a way to define my zeny each time the bot starts so the automacro will look on to it to trigger properly.

can you show me how to do that please?
andy12345
Moderators
Moderators
Posts: 174
Joined: 04 Apr 2008, 10:21
Noob?: No
Location: In your dreams...

Re: AutoTrade[Made Easy] by Gamenikko

#38 Post by andy12345 »

I don't think you can add a pause in the automacro but there might be a workaround to this.
First make a macro for the izlude map condition, then... I'll just put the code instead of explaination

Code: Select all

automacro moveto{
     run-once 1
     map izlude
     location not izlude x y ##here x and y are the coordinate something like 5 steps away from the portal so you get some time
     call moveThere
}
macro moveThere {
     pause 1
     do move x y
     release all
}

##Now that your bot has taken up some time moving around & the zeny amount might get loaded, now your macro
automacro lowzen {
run-once 1
location izlude x y     ##don't forget to change these coordinates.
zeny <= 199999
call quit1
}

macro quit1{
do chat leave
do deal no
pause 1
do quit
release all
}
I haven't tested the above macro, so I'm not sure if it will work, but I think you get the idea and can proceed from here

PS- you can also try the workaround posted in the manual.
Manual wrote:I have an automacro that checks for the amount of an item in my inventory / cart to be less than a given value or equal to zero (e.g. inventory "red potion" <= 30) but that automacro triggers also on map change. Why is that so and what should I do?
When you're changing the map all items vanish from your inventory for a short time. That happens with the official client, too. To avoid this, add an additional check for an item that you always carry with you, like inventory "Jellopy" > 0
PPS- Is this a support thread :?:
dezmay
Noob
Noob
Posts: 19
Joined: 02 Jun 2008, 21:22
Noob?: Yes

Re: AutoTrade[Made Easy] by Gamenikko

#39 Post by dezmay »

i think but i am not sure that the error i am having here is not with the macro but how kore load during startup and providing incorrect character information.

http://forums.openkore.com/viewtopic.php?t=15278&f=56
titsky
Noob
Noob
Posts: 4
Joined: 18 Sep 2010, 04:03
Noob?: No
Location: Philippines

Re: AutoTrade[Made Easy] by Gamenikko

#40 Post by titsky »

Thanks its working but is only limited to buying using the ragnarok currency and does not support trading items. I wish you can also create a macro creator for item trading.

I'll try making my own macro using this example. =)

Finally, proud to present my modification to enable item trading:

#######################################
########AUTO TRADE#####################
#######################################


automacro sit {
console /^Your Coordinates/i
call {
do chat create "T>5pc blahblah with 1 pc blah2x" 20 0
do sit; do conf dealAuto 0
}
}

automacro dersadeal {
console /(.*) \(level (.*)\) Requests a Deal/i
call {
do deal
pause 15
do deal no
}
}

automacro check {
console /(.*) added Item to Deal: (.*) x (\d+)/
call check1
}

macro check1 {
$item = $.lastMatch2
$amount = $.lastMatch3
$item1 = Matchstick
$item2 = None
$item3 = None
$item1price = 3 - amount equivallent of trade item
$item2price = 0
$item3price = 0
$blah = @inventory (your item to trade-exact name from inventory)

if ($item == $item1) goto item1
if ($item == $item2) goto item2
if ($item == $item3) goto item3
do deal no

stop

:item1
$total1 = @eval ($amount*$item1price)
do deal add $blah $total1
pause 2
do deal; do deal
stop
:item2
$total2 = @eval ($amount*$item2price)
do deal add $blah $total2

pause 2
do deal; do deal
stop
:item3
$total3 = @eval ($amount*$item3price)
do deal add $blah $total3

pause 2
do deal; do deal
stop
}

automacro final {
console /(.*) finalized the Deal/i
call {
do deal; do deal
}
}
automacro stop {
run-once 1
inventory "blah" > 1
call {
do quit
}
}

Note:
One minor problem i've notice is that when the item is added in the trade it will cancel after about just a sec the other person should immediately press the ok button after entering the item, if not, the trade will be cancelled. I've already tried putting a higher value for pause but still no luck. Hope someone can fix it. =)