BOT to BOT Trade using automacro. Is it possible?
Moderators: Moderators, Documentation Writers
-
- Noob
- Posts: 3
- Joined: 23 May 2011, 23:18
- Noob?: Yes
BOT to BOT Trade using automacro. Is it possible?
I still havent found a way using automacro, for my bot to initiate the deal with another bot.
When using the deal command using macro, it needs the pl# of the player you want to deal with.
Is there a way to extract a specific player's pl# using macro?
is it possible using automacro?
if it is. can somebody show some sample syntax.
When using the deal command using macro, it needs the pl# of the player you want to deal with.
Is there a way to extract a specific player's pl# using macro?
is it possible using automacro?
if it is. can somebody show some sample syntax.
-
- Human
- Posts: 38
- Joined: 17 May 2011, 07:09
- Noob?: No
Re: BOT to BOT Trade using automacro. Is it possible?
There is a macro keyword or function called @player:
from
http://wiki.openkore.com/index.php/Macro
First, move the char near the player then put this in your block:
*player name is the person you want to deal with
Code: Select all
@player (<name>)
Returns player index of player <name>. If player <name> is not found, it returns -1
http://wiki.openkore.com/index.php/Macro
First, move the char near the player then put this in your block:
Code: Select all
$playerID = @player("player name")
オペンコレ!
-
- Noob
- Posts: 3
- Joined: 01 Feb 2010, 21:12
- Noob?: Yes
- Location: Indonesia, Depok
Re: BOT to BOT Trade using automacro. Is it possible?
This is work if the name doesn't contain any symbol.
if the player name is containing a symbol, this macro always return -1 even the player is visible.
example name:
`name~
%name2
.:name3:.
and etc
Any solution if the name contain any symbol or not word,, like above??
if the player name is containing a symbol, this macro always return -1 even the player is visible.
example name:
`name~
%name2
.:name3:.
and etc
Any solution if the name contain any symbol or not word,, like above??
.::Learning Openkore Again::.
-
- Moderators
- Posts: 1196
- Joined: 16 Dec 2011, 02:53
- Noob?: No
- Location: Brazil
Re: BOT to BOT Trade using automacro. Is it possible?
setsunaseiei wrote:There is a macro keyword or function called @player:fromCode: Select all
@player (<name>) Returns player index of player <name>. If player <name> is not found, it returns -1
http://wiki.openkore.com/index.php/Macro
First, move the char near the player then put this in your block:*player name is the person you want to deal withCode: Select all
$playerID = @player("player name")
Don't use quotes in bracket.
@player (<name>)
$playerID = @player("player name")
Use in deal,example :
Code: Select all
$player = @player (~~Mario K'art)
do deal "$player"
The same example,is with Macro Plugin.
With this sintax :
If you will return the message,from the last people,and this people have symbols on name,with this example :$.lastpub
Code: Select all
$player = @player("$.lastpub")
do pm $.lastpub(or $.lastpub) Hello boy
But,with this :
Code: Select all
$player = @player ($.lastpub)
do pm "$player"(or "$.lastpub") Hello Boy
Learn rules
-
- Noob
- Posts: 9
- Joined: 11 May 2011, 22:16
- Noob?: Yes
Re: BOT to BOT Trade using automacro. Is it possible?
It works correctly, you are doing something wrong.indrakid wrote:This is work if the name doesn't contain any symbol.
if the player name is containing a symbol, this macro always return -1 even the player is visible.
example name:
`name~
%name2
.:name3:.
and etc
Any solution if the name contain any symbol or not word,, like above??
You can´t put spaces between the curved brackets and the name, or it will give you always the -1 return for your calls.
Code: Select all
log @player(`name~)
Code: Select all
log @player( `name~ )
I´d tested this:
Code: Select all
macro un {
log @player(`name~)
}
Code: Select all
macro un {
log @player(%the name2)
}
Note: `name~ differs from 'name~, so you have to pay attention to these detais.
-
- Noob
- Posts: 3
- Joined: 01 Feb 2010, 21:12
- Noob?: Yes
- Location: Indonesia, Depok
Re: BOT to BOT Trade using automacro. Is it possible?
Oh I see,,,SkylorD wrote:setsunaseiei wrote:There is a macro keyword or function called @player:fromCode: Select all
@player (<name>) Returns player index of player <name>. If player <name> is not found, it returns -1
http://wiki.openkore.com/index.php/Macro
First, move the char near the player then put this in your block:*player name is the person you want to deal withCode: Select all
$playerID = @player("player name")
Don't use quotes in bracket.
@player (<name>)
$playerID = @player("player name")
Use in deal,example :
Never presented error with me.Code: Select all
$player = @player (~~Mario K'art) do deal "$player"
The same example,is with Macro Plugin.
With this sintax :If you will return the message,from the last people,and this people have symbols on name,with this example :$.lastpubThe message never will arrive.Code: Select all
$player = @player("$.lastpub") do pm $.lastpub(or $.lastpub) Hello boy
But,with this :Will works.Because i used quotes on action (do deal, do pm) and no on especification ($player = ... , $playerID = ...)Code: Select all
$player = @player ($.lastpub) do pm "$player"(or "$.lastpub") Hello Boy
Thanks for your explanation, now a bug in my AutoWarp had been clear,,,
Even tough it was not smooth yet...

Thank you so much...

.::Learning Openkore Again::.