Special Variables to your Statements

This are the important built-in Variables for you to determine your character info/location etc.
  • $.map - the map you're on ("prontera")
  • $.pos - your current position ("123 234")
  • $.time - current time as unix timestamp ("1131116304")
  • $.datetime - current date and time ("Fri Nov 4 15:59:36 2005")
  • $.hour - current hour time in 24h format
  • $.minute - current minute time
  • $.second - current second time
  • $.hp - current hp
  • $.sp - current sp
  • $.lvl - current base level
  • $.joblvl - current job level
  • $.spirits - current number of spirit spheres
  • $.zeny - current amount of zeny
  • $.status - current statuses in a comma-separated list
  • $.caller - name of the last triggered automacro
  • $.weight - returns the current weight of the character
  • $.maxweight - returns the maximum weight of the character

Special KeyWords to your Statements

@npc (<x> <y> | /regexp/i | "<name>")
Return NPC's ID which location is <x> <y> or NPC's name match regexp or NPC's name is equal to <name> . Returns -1 if no NPC was found.
@inventory (<item>)
Returns Inventory Item ID of <item>. If <item> doesn't exist, it returns -1.
@Inventory (<item>)
Same as @inventory but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@invamount (<item>)
Returns the amount of the given <item> in inventory.
@cart (<item>)
Returns cart item ID of <item>. If <item> doesn't exist, it returns -1.
@Cart (<item>)
Same as @cart but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@cartamount (<item>)
Returns the amount of the given <item> in cart.
@storage (<item>)
Returns storage item ID of <item>. If <item> doesn't exist, it returns -1.
@Storage (<item>)
Same as @storage but returns all matching IDs as a comma-separated list or -1 if the item was not found.
@storamount (<item>)
Returns the amount of the given <item> in storage.
@player (<name>)
Returns player ID of player <name>. If player <name> is not found, it returns -1.
@vender (<name>)
Returns vender ID of vender <name>. If vender <name> is not found, it returns -1.
@store (<name>)
Looks for an item in a store and returns ID or -1 if the item was not found.
@shopamount (<item>)
Returns the amount of the given <item> in shop.
@random ("<argument1>", "<argument2>", ...)
Returns randomly one of the given arguments .
@rand (<n>, <m>)
Returns a random number between (and including) <n> and <m>.
@eval (<argument>)
Evaluates the given <argument>. Contents of @eval is Perl and does NOT have macro plugin syntax, except for variables and @() substitution.
@arg ("<argument>", <n>)
Returns the <n>th word of <argument> or an empty string if the word index is out of range.
Note: <n> could also be a variable that contains a round number/s greater than zero.
@config (<variable>)
Returns the value of <variable> specified in config.txt.
@venderitem (<name>)
Looks for an item in a player's shop and returns ID or -1 if the item was not found.
@venderprice (<indexID>)
Looks for an item in a player's shop and returns its price.
@nick (<word>)
Escapes all the regexp metacharacters and some of the perl special characters with \ (a backslash). Especially for player's name.

How to use Macro

Well, we want to create a movement to your Ragnarok Character...Openkore Console supports a chat command or a auto command to your Character, which means you are assigning your Character to what you wan'ts to do.

so here's our simple program, we can say that we want to move your character...

macro MoveMyChar {
         do move 100 10
         do move prontera 120 120
}

so now we created a program that the character will walk


macro MoveMyChar {
   -I rename my macro to MoveMyChar and you can also rename it by yourself
do
   -do means, we are using the Console Command of Openkore Built in Method
move 100 10
   -we use the Console command move with 'x' and 'y' Location
   -we are moving your character to your current map e.g(payon)
move prontera 120 120
   -we are now moving your character to prontera 120 120, for the instance, you're at the payon, and then
   - the map prontera, will detect and your character will move there.




Run your Openkore bot, and type-in "macros MoveMyChar" without the quotes

How to go to Traning Ground Willow new_2-3 map

Well, this is my Macro code for training groud Willow Monsters,

automacro new13 {
    location new_1-3
    location not new_1-3 97 52 105 48
    run-once 0
    timeout 20
call {
    do move 101 50
}
}

automacro new33 {
    location new_3-3
    location not new_3-3 98 53 106 48
    run-once 0
    timeout 20
call {
    do move 102 49
}
}

#TalktoNPC's

automacro TalkNPC13 {
    location new_1-3 97 52 105 48
    run-once 0
    timeout 10
call {
    do talknpc 103 50 c c c r0 c
}
}

automacro TalkNPC33 {
    location new_3-3 97 52 105 48
    run-once 0
    timeout 10
call {
    do talknpc 103 50 c c c r0 c
}
}

Hope you like it!