ScriptUO
Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: NecroFox on August 22, 2011, 01:13:54 PM
-
Is there a way to make a script choise random numbers? if so whats the command for them?
-
You know where the documentation is at EasyUO?
#random (http://wiki.easyuo.com/index.php?title=Random)
-
http://wiki.easyuo.com/index.php?title=Random
-
set #cervPostTimer ( #enPostTimer - 56 )
:P
-
Ty i didn't know what the code name was
-
so from the wiki
;make a random number between 0 and 99.
set %a #random % 100
;make a random number between a range of two numbers
;set %random1 #random % %increments + #bottom
;%increments is (top# - bottom#) + 1
;#top is the highest number of the range
;#bottom is the lowest number of the range
;example of two random numbers between 3 and 10
set %random1 #random % 8 + 3
Does this mean i can do
set %random_num #random %2
means i can set a random number to choise from 1 to 2?
-
spaces remember spaces... EUO is very unforgiving wihtout spaces
so NOT
set %random_num #random %2
this
set %random_num #random % 2
That gives a random number between 0 and 1
if you want 1 - 2 you must +1
ie
set %random_num #random % 2 + 1
-
ah ok i see tyvm
as for coding
finditem %bait C_ , #backpackid
set #lobjectid #findid
event macro 17 0
wait 10
finditem %pole C_ , #backpackid
set #ltargetid #findid
event macro 22 0
halt
it wont target the pole but i set it as the last target then the code clicks the last target why wont it set the bait?
or is that coded wrong?
-
solved .. set #targetkind 1