Randomize move-command target
Moderators: Moderators, Documentation Writers
-
- Plain Yogurt
- Posts: 73
- Joined: 09 Nov 2010, 16:20
- Noob?: No
Randomize move-command target
I thought about it and did not get a clue how I could randomize the target of "move" to a specified area like the "location" status.
-
- Plain Yogurt
- Posts: 68
- Joined: 11 Jun 2011, 01:47
- Noob?: No
Re: Randomize move-command target
You mean like this?
Code: Select all
$mapselect = @rand(1,3)
if ($mapselect == 1) do move prt_fild01
if ($mapselect == 2) do move izlude
if ($mapselect == 3) do move pay_dun04
-
- Plain Yogurt
- Posts: 73
- Joined: 09 Nov 2010, 16:20
- Noob?: No
Re: Randomize move-command target
It works like that in macros? If so it looks promising and gives me a way to solve it, thanks.
I use it so my char doesn't walk to the same spot all the time but on different ones.
I use it so my char doesn't walk to the same spot all the time but on different ones.

-
- Plain Yogurt
- Posts: 58
- Joined: 19 May 2011, 00:40
- Noob?: Yes
Re: Randomize move-command target
do you guys know how to configure a macro to make the bot move one block from where it's standing? Sometimes my bot gets stuck when attacking, and one way of getting it unstuck is moving it. Please help me.
automacro moveOneBlock1 {
console /cannot reach or damage target/
call moveOneBlock2
}
macro moveOneBlock2 {
do (???)
}
Help please.
automacro moveOneBlock1 {
console /cannot reach or damage target/
call moveOneBlock2
}
macro moveOneBlock2 {
do (???)
}
Help please.
-
- Moderators
- Posts: 1197
- Joined: 16 Dec 2011, 02:53
- Noob?: No
- Location: Brazil
Re: Randomize move-command target
x or y ?the bot move one block from where it's standing?
Try this :
http://openkore.com/index.php/Category:Movement
Or :
It's 1 in 500 way.$x = @eval (return $::char->{pos}{x})
$y = @eval (return $::char->{pos}{y})
$newy = @eval ($y + 1)
$newx = @eval ($x + 1)
do move $newx $newy
Learn rules
-
- Plain Yogurt
- Posts: 58
- Joined: 19 May 2011, 00:40
- Noob?: Yes
Re: Randomize move-command target
Thanks a lot 
