Randomize waypoint - what wrong ?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kircinek
Posts: 11
Joined: Tue Apr 24, 2012 11:50 am

Randomize waypoint - what wrong ?

#1 Post by kircinek » Tue Apr 24, 2012 11:54 am

i tray make litle randimize waypoint but have problem some error meybe someone know what code be corect

<!-- # 1 --><waypoint x=tostring(-40+math.random(-1, 1)) z=tostring(-17+math.random(-1, 1)) y="62">

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Randomize waypoint - what wrong ?

#2 Post by BillDoorNZ » Wed Apr 25, 2012 2:26 pm

you cannot embed formula's in the <waypoint> attributes.

perhaps something more like:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
</onLoad>
<waypoint x="-40" y="62" z="-17" tag="start">
  player:moveTo(CWaypoint((-40+math.random(-1,1)), (-17+math.random(-1,1)), 62));
</waypoint>
</waypoints>
I havent tested the code of course :) But you should be able to do something like that.

kircinek
Posts: 11
Joined: Tue Apr 24, 2012 11:50 am

Re: Randomize waypoint - what wrong ?

#3 Post by kircinek » Thu Apr 26, 2012 8:59 am

ty for reply

that i cant used variable or code in x="-40" ?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Randomize waypoint - what wrong ?

#4 Post by rock5 » Thu Apr 26, 2012 1:02 pm

kircinek wrote:ty for reply

that i cant used variable or code in x="-40" ?
No, I'm afraid not.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests