macro auto storage if item is equal to inventory

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

Moderator: Moderators

mrmtsuruya
Human
Human
Posts: 21
Joined: 30 Oct 2011, 06:27
Noob?: No
Location: Philippines

macro auto storage if item is equal to inventory

#1 Post by mrmtsuruya »

Code: Select all

automacro storage {
	delay 800
	call stored
    timeout 20
}

macro stored {
		do ai manual
	pause 1
		do c @storage
	pause 2
		do storage add Gold
	pause 10
		do storage close
	pause 2	
		do storage log
		do ai on
}

automacro checkgold {
       inventory "Gold" >= 22,000 #if my inventory has 22k gold this macro will be triggered?#
       delay 800
       timeout 20
       call sellgold
}

macro sellgold {
       do move prontera
       do move prontera
       do move prontera
       do talknpc 147 167 c r0
       do move 345 68
       do sell
       do sell @inventory(Gold)
       do sell done
       
what i want to add after sell gold is to check if my zeny is equal to 1b
then it will go to another npc and convert zeny to credits.
npc location is 355 66 r2 "and then ask me how many credits" ans: "100" and done.
after this, macro will call "gold" script.

hoping that someone can help me with this...
my bot is almost done...

help is greatly appreciated, and will help others.
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: macro auto storage if item is equal to inventory

#2 Post by SkylorD »

Hi.

http://www.openkore.com/index.php/Macro_plugin

Use the condition zeny instead of inventory.
zeny <condition> <amount>
Triggers when your zeny amount matches <condition> <amount>.
Multiple lines are treated as AND conditions.
Look :

Macro Plugin Example - The following macro will tell if you've over 1.000z or 1.000z or less.

Code: Select all

macro checkZeny {
   if ($.zeny > 1000) {
      do c I've over 1.000z! 
   } else {
      do c I've 1.000z or less...
   }
}
$.zeny - current amount of zeny
Learn rules
mrmtsuruya
Human
Human
Posts: 21
Joined: 30 Oct 2011, 06:27
Noob?: No
Location: Philippines

Re: macro auto storage if item is equal to inventory

#3 Post by mrmtsuruya »

SkylorD wrote:Hi.

http://www.openkore.com/index.php/Macro_plugin

Use the condition zeny instead of inventory.
zeny <condition> <amount>
Triggers when your zeny amount matches <condition> <amount>.
Multiple lines are treated as AND conditions.
Look :

Macro Plugin Example - The following macro will tell if you've over 1.000z or 1.000z or less.

Code: Select all

macro checkZeny {
   if ($.zeny > 1000) {
      do c I've over 1.000z! 
   } else {
      do c I've 1.000z or less...
   }
}
$.zeny - current amount of zeny
thanks i will just reconstruct code given.