home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / healer.mod / objects / faerie.obj / script.txt < prev    next >
Text File  |  2000-07-09  |  959b  |  44 lines

  1. // ZZ> This controls the yellow faerie
  2. IfTimeOut
  3.   tmpargument = rand & 15 + 10
  4.   SetTime
  5.   IfStateIs0
  6.     // Circle around start location
  7.     tmpx = selfspawnx
  8.     tmpy = selfspawny
  9.     tmpturn = xyturnto + 16384
  10.     tmpdistance = 100
  11.     Compass
  12.     ClearWaypoints
  13.     AddWaypoint
  14.     // Look for a player
  15.     tmpargument = [HUMA]
  16.     tmpdistance = 14 // Items, friends and enemies
  17.     SetTargetToNearestBlahID
  18.       SetOwnerToTarget
  19.       tmpargument = 1
  20.       SetState
  21.   Else
  22.     tmpx = ownerdistance
  23.     tmpy = 300
  24.     IfXIsMoreThanY
  25.       // Catch up fast
  26.       tmpx = ownerx
  27.       tmpy = ownery
  28.       tmpturn = ownerturnto
  29.       tmpdistance = 500
  30.       Compass
  31.       ClearWaypoints
  32.       AddWaypoint
  33.     Else
  34.       // Circle around the player
  35.       tmpx = ownerx
  36.       tmpy = ownery
  37.       tmpturn = xyturnto + 16384
  38.       tmpdistance = 100
  39.       Compass
  40.       ClearWaypoints
  41.       AddWaypoint
  42. // All done
  43. End
  44.