Help with Merchant AutoVend Please?

Philippines

Moderators: waferbaron, Moderators

Forum rules
This server is currently not maintained and tables folder (including connection info) is outdated. Read the wiki for instructions on how to update those information. Please contribute your updated info. Contact Cozzie to join the team as a regular server supporter.
Message
Author
iheartgemini
Noob
Noob
Posts: 1
Joined: 02 May 2014, 06:45
Noob?: Yes

Help with Merchant AutoVend Please?

#1 Post by iheartgemini »

Hi Good Day!

So I ran into a problem with my Bot.

Here's the Story. (BTW, I just started playing Ragnarok 2 months ago and started Botting 3 weeks ago, so yes, this is all very new to me)

I originally had only 3 characters.
An Assassin
An Acolyte
A Knight

I configured all of them to AUTOSELL everything before they become overweight. At first I thought it was a good thing, but then I realized that I wasn't making a lot of zeny and I needed Zeny to make or buy stronger items.

So I made a merchant. Now what I need for my merchant to do is to just sit somewhere and sell his stuff. (I do plan to make him strong too)

And what I want for my 3 other characters to do is to sell or give all their items to my merchant before they become overweight so that my merchant can start selling them.
Unfortunately I do not know how to do this.

Short version: Assassin, Acolyte and Knight kill monsters for Loot, they give it to Merchant, Merchant will sell.

Is this possible? And can someone please help me with the config of my Merchant and other characters?

Any help would be greatly appreciated :)

** Note **
So I noticed that when I manually deal with my merchant, nothing happens when he's selling his stuff, so i have to close his shop and reopen it once the deal is done. There has got to be an easier way to do this.

** Another Question **
I don't really know a lot about macros and how they work, believe me I tried to understand what I read but I just can't. Can someone please help me or teach me how? The reason I ask is because I want my bot to automatically respond with a *Flag 3* when someone waves a flag, so as not to get killed when I'm botting.


Again, any help will be greatly appreciated :)
Thanks a Lot!

User avatar
SkylorD
Moderators
Moderators
Posts: 1167
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil
Contact:

Re: Help with Merchant AutoVend Please?

#2 Post by SkylorD »

Read this :
http://www.openkore.com/index.php/Macro_plugin
-exclusive (0|1) - do not allow automacros to cancel this macro

-

run-once (0 | 1)
When set to 1 the automacro will be locked after being triggered.
Use the macro command release to unlock this automacro.
May be used only once per automacro block.

-

@player (<name>)
Returns player index of player <name>. If player <name> is not found, it returns -1.

-

@inventory (<item>)
Returns inventory item index of <item>. If <item> doesn't exist, it returns -1.

@Inventory (<item>)
Same as @inventory but returns all matching indexes as a comma-separated list or -1 if the item was not found.

-

console ("<text>" | /<regexp>/)
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.

-

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.

-

location [not] <mapname [<x1> <y1> [<x2> <y2>]] [, ...]
Triggers when you are [not] at the specified location.
When neither <x1> <y1> nor <x2> <y2> are given, it triggers when you are [not] on <mapname>.

-

player ("<player name>" | /<regexp>/) [, <distance> ]
Triggers when <player name> is on screen and not more than <distance> blocks away.
Multiple lines are treated as AND conditions.
Set variables:
$.lastPlayerName - name of the last player that triggered the automacro.

-


Assassin,Acolyte and Knight macros :

Set your merchant map and coords, item names and merchant name.


automacro TradeMerchant {
weight >= 48%
run-once 1
call {
do ai manual
do move Map X Y
pause 1
do deal @player(MerchantName)
pause 2
do deal add @inventory(ItemName1)
do deal add @inventory(ItemName2)
do deal add @inventory(ItemName3)
do deal add @inventory(ItemName4)
...
..
.
pause 2
do deal
pause 2
do deal
do ai auto
release TradeMerchant
}
}

automacro WaitFB {
exclusive 1
weight >= 48%
console /That person is in another deal/i
timeout 10
call {
pause 20
release TradeMerchant
}
}



#This option (For Merchant):

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

If you set to 0, you can use these merchant macros.
If you set to 2 or 3, your merchant won't need to use any automacro. Because he'll accept automatically all deal requests.

http://www.openkore.com/index.php/DealAuto_names
#

Merchant macros :

Set your Assassin and Knight character names, and merchant map.


automacro WantsForDeal {
player /(Assassin|Knight|Acolyte)/i
location Map X Y
weight < 90%
exclusive 1
console /(.*) \(level (\d+)\) Requests a Deal/i
call {
if ($.lastMatch1 == $.lastPlayerName) {
do deal
} else {
do deal no
}
}
}

automacro FinalDeal {
player /(Assassin|Knight|Acolyte)/i
location Map X Y
weight < 90%
console /(.*) finalized the Deal/i
exclusive 1
call {
if ($.lastMatch1 == $.lastPlayerName) {
do deal
pause 2
do deal
} else {
do deal no
}
}
}

The reason I ask is because I want my bot to automatically respond with a *Flag 3* when someone waves a flag, so as not to get killed when I'm botting.


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

automacro Fl3g {
console /\[dist=(.*)\] (.*) \((\d+)\): \*Flag (1|2|3)\*$/i
call {
$distance = $.lastMatch1
$flgid = $.lastMatch4
$maxDistance = 2
if ($distance <= $maxDistance) {
do e flg$flgid
}
}
}


Now you need to find a way to sell your items.
You can create an automacro using :

console /Deal Complete/

And open your shop, or sell your items.
Learn rules

Post Reply