Help - Search - Members - Calendar
Full Version: random turn
AC Tools Everything Macro > AC Tool Macros > Macro Development
maikel
hey, im totally new to this kind of stuff but its great..

my question is, i have 2 commandos

saypaste <b><FONT COLOR="#FF6600">test1
Clearglobalkeys


saypaste <b><FONT COLOR="#FF6600">test2
Clearglobalkeys


how can i let the system random choose one of the 2 ??

i tried randomturn but i dont understand how to use the command???
Markkkkk26
you can try this
(im still learning too)

CODE
constants
  temp = 0
end

Procedure one
  saypaste <b><FONT COLOR="#FF6600">test1
  Clearglobalkeys
end

Procedure two
  saypaste <b><FONT COLOR="#FF6600">test2
  Clearglobalkeys
end

while 1 = 1
  compute temp = Ceil( random(0) * 10 ) -1
  If $temp > 4.5
    call one
  Else
    call two
  end
end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.