home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / healer.mod / objects / ulna.obj / script.txt < prev    next >
Text File  |  2000-10-30  |  3KB  |  139 lines

  1. // Check for a kill order
  2. IfOrdered
  3.   tmpx = selforder
  4.   tmpy = [UNDO]
  5.   IfXIsEqualToY
  6.     UndoEnchant
  7.  
  8.  
  9. //------------------------------------------------------------------------------
  10. // Undead are sustained by magic
  11. IfSpawned
  12.   EnchantTarget // target is self...
  13.   Walk
  14.  
  15.  
  16. //------------------------------------------------------------------------------
  17. // ZZ> Handle death by sending a message and other stuff
  18. IfKilled
  19.   tmpargument = MESSAGEDEATH
  20.   IfTargetIsOnSameTeam
  21.     tmpargument = MESSAGEFRAG
  22.     IfTargetIsSelf
  23.       tmpargument = MESSAGEACCIDENT
  24.   SendMessageNear
  25.  
  26.   // Drop goodies
  27.   tmpargument = 65535
  28.   DropMoney
  29.  
  30.   // Respawn the team
  31. //  tmpx = selfmorale
  32. //  tmpy = 1
  33. //  IfXIsLessThanY
  34. //    CleanUp
  35.  
  36.   // Make the character body
  37.   tmpargument = 45
  38.   SetBumpHeight
  39.  
  40.  
  41.  
  42. //------------------------------------------------------------------------------
  43. // ZZ> For helper AIs
  44. IfLeaderKilled
  45.   BecomeLeader
  46.  
  47.  
  48.  
  49. //------------------------------------------------------------------------------
  50. // ZZ> Respawn the character
  51. //IfCleaned
  52. //  DropWeapons
  53. //  SpawnPoof
  54. //  RespawnCharacter
  55. //  BecomeLeader
  56.  
  57.  
  58. IfTimeOut
  59.   tmpx = rand & 255
  60.   tmpy = 235
  61.   IfXIsMoreThanY
  62.     tmpargument = tmpx & 1 + 2
  63.     tmpdistance = rand & 2047 + 10000
  64.     PlaySound
  65.     // Randomize the frames...
  66.     tmpargument = tmpx & 1 + LATCHLEFT
  67.     PressLatchButton
  68.   SetTargetToNearbyEnemy
  69.     tmpx = targetdistance
  70.     tmpy = 110
  71.     IfXIsLessThanY
  72.       IfFacingTarget
  73.         tmpargument = rand & 1 + LATCHLEFT
  74.         PressLatchButton
  75.     tmpargument = 20
  76.     SetTime
  77.     tmpx = targetx
  78.     tmpy = targety
  79.     tmpdistance = 200
  80.     tmpturn = targetturnto
  81.     Compass
  82.   Else
  83.     tmpargument = rand & 31 + 120
  84.     SetTime
  85.     tmpx = rand & 1023 - 512 + selfspawnx
  86.     tmpy = rand & 1023 - 512 + selfspawny
  87.   ClearWaypoints
  88.   AddWaypoint
  89. IfAtLastWaypoint
  90.   tmpargument = 0
  91.   SetTime
  92.  
  93.  
  94. //------------------------------------------------------------------------------
  95. // ZZ> Handle being attacked by blocking or countering or running away
  96. IfAttacked
  97.   // Image changes with damage
  98.  
  99.   // Chase the attacker
  100.   SetTargetToWhoeverAttacked
  101.   IfTargetIsOnHatedTeam
  102.     tmpx = targetx
  103.     tmpy = targety
  104.     tmpdistance = 200
  105.     tmpturn = targetturnto
  106.     Compass
  107.     ClearWaypoints
  108.     AddWaypoint
  109.     tmpargument = 30
  110.     SetTime
  111.  
  112.  
  113. //------------------------------------------------------------------------------
  114. IfBumped
  115.   SetTargetToWhoeverBumped
  116.   IfTargetIsOnHatedTeam
  117.     IfFacingTarget
  118.       tmpargument = rand & 1 + LATCHLEFT
  119.       PressLatchButton
  120.     Else
  121.       tmpx = targetx
  122.       tmpy = targety
  123.       tmpdistance = 200
  124.       tmpturn = targetturnto
  125.       Compass
  126.       ClearWaypoints
  127.       AddWaypoint
  128.       tmpargument = 30
  129.       SetTime
  130.   Else
  131.     tmpargument = 0
  132.     SetTime
  133.     SetTargetToOldTarget
  134.  
  135.  
  136. //------------------------------------------------------------------------------
  137. End
  138. //------------------------------------------------------------------------------
  139.