[DEMAND] Macro Warp portal

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

Moderator: Moderators

Sparne
Noob
Noob
Posts: 5
Joined: 07 May 2014, 13:04
Noob?: Yes

[DEMAND] Macro Warp portal

#1 Post by Sparne »

Hello everybody,
I don't know if the forum is still alive or not but I have a request for you... :D


I'm looking for a macro more or less like that:

-When I'm overweight or when I haven't got Fresh Fish/Awakening potion anymore, I come back in town to put or take some items in storage
-When I have finished with the storage, I pm a priest bot that will boost me and cast his warp portal skill
-Then I move on the position of the warp portal


I know some basics macro's words but I don't know really well how to use them together... I think I should write "do pm" when i'll be in town then maybe a "do move (X, Y) to go on the warp portal position but to write the entire macro, I'm a bit lost.. Anyone to help me ?
User avatar
SkylorD
Moderators
Moderators
Posts: 1197
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil

Re: [DEMAND] Macro Warp portal

#2 Post by SkylorD »

Hi friend. http://www.openkore.com/index.php/Macro_plugin
When I'm overweight or when I haven't got Fresh Fish/Awakening potion anymore,
You could create a automacro with 2 conditions.
Or enable your storageAuto in your config.txt (better) !

Code: Select all

weight <condition> <amount>[%]
Triggers when your weight matches <condition> <amount> (absolute value) or <condition> <amount> percent (relative value).
Multiple lines are treated as AND conditions.
or :

Code: Select all

inventory "<item>" <condition> <amount> [, ...]
Triggers when you have <condition> <amount> of <item> in your inventory.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.
or :

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

Read attentively all the instructions

You need to set your items_controls.txt to specify what items will be stored.

http://www.openkore.com/index.php/Items_control.txt

In your items_control, you should be considerate with this part.
<storage>
Store this item when storageAuto is set.

Code: Select all

0	Do not store this item.
1	Store items from inventory.
2	Store items from inventory and cart.
You need to set your storageAuto_password.
And if occur some problem to talk with the NPC, the problem can be in your storageAuto_npc_sequence -> its about the talk sequence with the NPC.

I come back in town to put or take some items in storage
You could use : GetAuto

GetAuto to get your items from storage and storageAuto to auto storage your items (Inventory to storage).
When I have finished with the storage
Could use the console condition.

Code: Select all

console ("<text>" | /<regexp>/[i])
Triggers when <text> is received on console or the text received matches <regexp>.
The i switch means the regexp is case-insensitive.
Set variables:
$.lastLogMsg - the console text that trigerred the automacro.
$.lastMatchN - backreference from regexp.
Console generally includes custom strings, like names and chat messages, which can match your regexp, so matching the beginning and the end of the string should almost always be used (learn about regexp to find out how to do it - it's not just matching symbols at the beginning/end). Furthermore, use as narrow character classes as possible (avoid using .* and alike). Otherwise, your macro may be exploited.
Furthermore, format of console output isn't frozen and can change in future versions and/or in translations. It's not a good idea to rely on console condition.
Using :

console /^(Storage closed|Storage registered)$/i
I pm a priest bot that will boost me and cast his warp portal skill, Then I move on the position of the warp portal

http://forums.openkore.com/viewtopic.php?f=33&t=8455

If you use this macro above :

You need to create a macro to use the "pm command", but just to send the "warp map number" (recorded on portal list)

do pm "warp x"

For example *To warp after storage close :

Code: Select all

automacro WarpAfterStorage {
console /^(Storage closed|Storage registered)(\.?)$/i
exclusive 1
call {
do pm "CharName" warp 1 
}
}
Or you can use console "Storage closed."

Code: Select all

console "Storage closed."

Now, about "PM then warp Macro'", you can send this :

warp 1 or warp 2 or warp 3 or warp 4.

Remember one thing :

macros and automacros goes to macros.txt.
getAuto goes to config.txt. Here you set the item to get. Don't need to do any other thing, just set this block.
storageAuto you need to set in your config.txt
Items to storage you need to set in your items_controls.txt


Other thing :

About your macros, you can do one thing.
Set your storageAuto for 0, but set your items_control to specify the items to storage, set your storageAuto_password and set the npc coordinates (storageAuto_npc).
And use a macro to use the "autostorage" command :

Code: Select all

automacro StorageItems {
inventory "Fresh Fish" == 0, "Awakening Potion" == 0
exclusive 1
call {
log Ready to storage...
do autostorage
}
}
The macro above will trigger only if you don't have any fresh fish OR any awakening potion.
Comma-separated arguments are treated as OR conditions.
Multiple lines are treated as AND conditions.
If you set your macro to ;

Code: Select all

inventory "Fresh Fish" == 0
inventory "Awakening Potion" == 0
It will trigger only if you don't have any fresh fish AND any awakening potion.


Anyway, if you use storageAuto 1 or storageAuto 0 + macro, when you open your storage, it'll getAuto your needed items.
Learn rules
Sparne
Noob
Noob
Posts: 5
Joined: 07 May 2014, 13:04
Noob?: Yes

Re: [DEMAND] Macro Warp portal

#3 Post by Sparne »

First of all thank you for your reply !
console /^(Storage closed|Storage registered)$/i
I was already using the config.txt to use the storage but I didn't know how to make the macro begins after I have finished with storage :mrgreen:
So that's the part that helped me the more, thank you ! Now my macro is working :D