Auto Vend and Refill [Looping over and over again]

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

Moderator: Moderators

deeh16
Noob
Noob
Posts: 19
Joined: 14 Dec 2008, 06:07
Noob?: Yes

Auto Vend and Refill [Looping over and over again]

#1 Post by deeh16 »

It open a shop and also storage.. but my problem is it uses storage over and over again..even if it has the item in the cart..

Code: Select all

automacro vend {
delay 1
console /Other players are not allowed to view your Equipment./
cart "Blue Herb" => 1
call open_my_shop
timeout 10
}

macro open_my_shop {
do move prontera 142 100
pause 1
do openshop
stop
}

####################
##### GET Item ######## 
####################

#automacro check_deadbranch {
shop "Dead Branch" < 50
cart "Dead Branch" < 50
exclusive 1
call get_deadbranch
timeout 30
}

macro get_deadbranch {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Dead Branch 100
pause 1
do move 142 100 prontera
}

automacro check_blueherb {
shop "Blue Herb" < 100
cart "Blue Herb" < 100
exclusive 1
call get_blueherb
timeout 30
}

macro get_blueherb {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Blue Herb 100
pause 1
do move 142 100 prontera
}

automacro check_greenherb {
shop "Green Herb" < 100
cart "Green Herb" < 100
exclusive 1
call get_greenherb
timeout 30
}

macro get_greenherb {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Green Herb 900
pause 1
do move 142 100 prontera
}

automacro check_pricklyfruit {
shop "Prickly Fruit" < 100
cart "Prickly Fruit" < 100
exclusive 1
call get_pricklyfruit
timeout 30
}

macro get_pricklyfruit {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Prickly Fruit 100
pause 1
do move 142 100 prontera
}

automacro check_emptybottle {
shop "Empty Bottle" < 100
cart "Empty Bottle" < 100
exclusive 1
call get_emptybottle
timeout 30
}

macro get_emptybottle {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Empty Bottle 400
pause 1
do move 142 100 prontera
}

automacro check_witchedstarsand {
shop "Witched Starsand" < 100
cart "Witched Starsand" < 100
exclusive 1
call get_witchedstarsand
timeout 30
}

macro get_witchedstarsand {
do closeshop
do move prontera 142 100
do talk @npc (146 89)
pause 1
do talk resp 1
pause 1
do storage gettocart Witched Starsand 400
pause 1
do move 142 100 prontera
}




##########VEND#############

automacro vend_again {
delay 1
run-once 1
location prontera 142 100
call open_my_shop_again
timeout 5
}

macro open_my_shop_again {
pause 1
do move prontera 142 100
do openshop
release vend_again
stop
}
Image
KoreGhost
Developers
Developers
Posts: 124
Joined: 28 Mar 2011, 12:48
Noob?: No
Location: Brazil

Re: Auto Vend and Refill [Looping over and over again]

#2 Post by KoreGhost »

change

shop "item"
cart "item"

for

Code: Select all

console /(Msg item sell)/i
or add any item more for check

shop "item"
cart "item"
inventory "item" > 0
deeh16
Noob
Noob
Posts: 19
Joined: 14 Dec 2008, 06:07
Noob?: Yes

Re: Auto Vend and Refill [Looping over and over again]

#3 Post by deeh16 »

even may cart has the item..

it still uses storage..

may condition is

cart "item" = 0
shop "item" = 0
Image
jrelcess25
Noob
Noob
Posts: 4
Joined: 28 May 2011, 05:33
Noob?: Yes

Re: Auto Vend and Refill [Looping over and over again]

#4 Post by jrelcess25 »

did you fix it deeh?
lancelynyrd
Noob
Noob
Posts: 2
Joined: 18 Jun 2011, 05:22
Noob?: Yes

Re: Auto Vend and Refill [Looping over and over again]

#5 Post by lancelynyrd »

what is the code if i want to store item to storage rather than getting item. do i need to input the storage pass here or the kore will read the one on the config.txt. tnx