Help with Vend > Refill > Vend MACRO NOOBIE HERE

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

Moderator: Moderators

vox027
Noob
Noob
Posts: 3
Joined: 22 Jun 2013, 04:29
Noob?: Yes

Help with Vend > Refill > Vend MACRO NOOBIE HERE

#1 Post by vox027 »

i've just learned how to use macro within a couple of weeks. been experimenting here and there using examples for the forums. as of now, im stucked with this macro. i've searched and tried difference vending macros here in OK forums. im stumped

Here's what i really want my bot vendor to do:
-Vend
-close shop when item is sold out
-do to kafra for refill
-then back to my spot to revend

i used this macro for reference, and tweaked it a bit for my advantage
http://forums.openkore.com/viewtopic.ph ... lit=refill

upon tweaking it i was able to make my bot some of the actions i wanted. except for certain scenarios

-i had to place my vendor near kafra to access auto storage
-some errors (red messages) pops up in my kore, every time it refills its items
-it can't refill 2 items if a players buys out 2 items from my shop

Here's my macro...

automacro openshopWOV {
delay 1
console /Not allowed other player view Equipment/
console /All Players ignored/
call {

if (@cartamount (Wind of Verdure) == 0) goto get
pause 3
do move 154 87
pause 3
do openshop
pause 10
do sit
stop
:get
pause 2
do talknpc 146 89 c c r1 n
pause 2
do storage get @storage (Wind of Verdure) @eval (50 - @cartamount (Wind of Verdure))
pause 3
do cart add @inventory (Wind of Verdure) @invamount (Wind of Verdure)
pause 10
do cart add Wind of Verdure
Pause 1
do move 154 87
pause 3
do openshop
pause 10
do sit
stop
}

}





automacro soldoutWOV {
console /sold out: Wind of Verdure/
cart "Wind of Verdure" <= 1
run-once 1
call {
pause 2
do closeshop
pause 2
do talknpc 146 89 c c r1 n
pause 2
do storage get @storage (Wind of Verdure) @eval (50 - @cartamount (Wind of Verdure))
pause 3
do cart add @inventory (Wind of Verdure) @invamount (Wind of Verdure)
pause 10
do cart add Wind of Verdure
pause 1
do move $location
pause 3
do openshop
pause 10
do sit
stop
}
}

######################################

automacro ELU {
delay 1
console /Not allowed other player view Equipment/
console /All Players ignored/
call {

if (@cartamount (Elunium) == 0) goto get
pause 3
do move 154 87
pause 3
do openshop
pause 10
do sit
stop
:get
pause 2
do talknpc 146 89 c c r1 n
pause 2
do storage get @storage (Elunium) @eval (50 - @cartamount (Elunium))
pause 3
do cart add @inventory (Elunium) @invamount (Elunium)
pause 10
do cart add Elunium
Pause 1
do move 154 87
pause 3
do openshop
pause 10
do sit
stop
}

}





automacro soldoutELU {
console /sold out: Elunium/
cart "Elunium" <= 1
run-once 1
call {
pause 2
do closeshop
pause 2
do talknpc 146 89 c c r1 n
pause 2
do storage get @storage (Elunium) @eval (50 - @cartamount (Elunium))
pause 3
do cart add @inventory (Elunium) @invamount (Elunium)
pause 10
do cart add Elunium
pause 1
do move $location
pause 3
do openshop
pause 10
do sit
stop
}
}

i know its a bit messy, so a lil nudge to the right path would REALLY help me alot..
vox027
Noob
Noob
Posts: 3
Joined: 22 Jun 2013, 04:29
Noob?: Yes

Re: Help with Vend > Refill > Vend MACRO NOOBIE HERE

#2 Post by vox027 »

bump
Bobthebuilder
Noob
Noob
Posts: 19
Joined: 29 Sep 2013, 06:25
Noob?: No

Re: Help with Vend > Refill > Vend MACRO NOOBIE HERE

#3 Post by Bobthebuilder »

and what is the "red error messages"?

however, TL;DR

when opened the storage, to avoid not taking out items from storage because the cart is overweight, put everything from your cart in the storage first and then take everything out. e. g.:

Code: Select all

automacro openedstorage {
	console /storage opened/
	call {
		do storage addfromcart Item X
		pause 1
		do storage addfromcart Item Y
		pause 1
		do storage addfromcart Item Y
		pause 1
		do storage gettocart Item X 500
		pause 1
		do storage gettocart Item Y 1500
		pause 1
		do storage gettocart Item Y 200
	}
}
that way it won't matter how many or how much of each items are sold, you will end up always with a full cart of your shit. just get it right WHEN to go to the storage.