ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: camotbik on September 26, 2011, 06:48:56 AM

Title: +/- lines on if/else
Post by: camotbik on September 26, 2011, 06:48:56 AM
Code: [Select]
if #charghost = no + 3
event macro 1 1 i'm dead
wait 1s
event macro 1 1 I feel so alive, because
wait 1s
event macro 1 1 i'm not dead
wait 1s
if #charghost = no - 2
halt
Not documented? Well it is documented. But i've never seen this in use, till today.
Title: Re: +/- lines on if/else
Post by: Endless Night on September 26, 2011, 08:20:12 AM
umm i have never seen this at all... interesting find.  I presume you tested it and it works ?


It strikes me that
Code: [Select]
event macro 1 1 i'm not dead
wait 1s
if #charghost = no - 2

is equivalent to a repeat until loop (with opposite signage)
Code: [Select]
repeat
  event macro 1 1 i'm not dead
  wait 1s
until  #charghost <> no
Title: Re: +/- lines on if/else
Post by: TrailMyx on September 26, 2011, 09:44:59 AM
That's the way OLLLD EUO was written.  Makes code totally hard to read and very difficult to add things to.  I would just not even us that method of blocking.  Yuck!
Title: Re: +/- lines on if/else
Post by: Endless Night on September 26, 2011, 09:56:41 AM
That's the way OLLLD EUO was written.  Makes code totally hard to read and very difficult to add things to.  I would just not even us that method of blocking.  Yuck!

totally agree TM, makes code 100% unreadable.
Title: Re: +/- lines on if/else
Post by: UOMaddog on September 26, 2011, 12:27:05 PM
and 300% subject to breaking
Title: Re: +/- lines on if/else
Post by: TrailMyx on September 26, 2011, 04:56:28 PM
ROFL@ Maddog's siggy
Title: Re: +/- lines on if/else
Post by: Khameleon on September 26, 2011, 05:41:26 PM
yes TM is correct that was the OLD way to script when EUO first came out... it sucked to edit scripts like that because you had to change every number if you added a line or even put a space in to separate subs