home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / healer.mod / objects / ghoul.obj / script.txt < prev    next >
Text File  |  2000-07-08  |  4KB  |  191 lines

  1. // Check for a kill order
  2. IfOrdered
  3.   tmpx = selforder
  4.   tmpy = [UNDO]
  5.   IfXIsEqualToY
  6.     UndoEnchant
  7.     tmpargument = 0 - 500
  8.     SetContent // Won't come back...
  9.  
  10.  
  11. //------------------------------------------------------------------------------
  12. // ZZ> Most undead have an enchantment sustaining them
  13. IfSpawned
  14.   EnchantTarget  // Enchant self...
  15.  
  16.  
  17. //------------------------------------------------------------------------------
  18. // ZZ> Rise from the dead...  Takes several times to wake...
  19. IfCleanedUp
  20.   GetContent
  21.   tmpx = tmpargument
  22.   tmpy = 0 - 1
  23.   IfXIsMoreThanY
  24.     tmpargument = tmpargument + 1
  25.     SetContent
  26.     tmpy = selfcounter & 7 + 7
  27.     IfXIsMoreThanY
  28.       tmpx = selfz
  29.       tmpy = 0 - 20
  30.       IfXIsMoreThanY
  31.         tmpargument = 0
  32.         SetContent
  33.  
  34.  
  35.         tmpargument = 1
  36.         SendMessageNear
  37.         SetTargetToSelf
  38.         RespawnTarget // Same location, RespawnCharacter returns to start...
  39.         EnchantTarget  // Enchant self...
  40.         tmpargument = 244  // Frame 61...
  41.         SetFrame
  42.         tmpargument = ACTIONMD
  43.         DoActionOverride
  44.         tmpargument = 50
  45.         SetReloadTime
  46.         tmpargument = 0
  47.         ChangeArmor
  48.       Else
  49.         // No coming back from the pit...
  50.         tmpargument = tmpy
  51.         SetContent
  52.  
  53.  
  54.  
  55. //------------------------------------------------------------------------------
  56. // ZZ> Handle death by sending a message and other stuff
  57. IfKilled
  58.   tmpargument = 1
  59.   ChangeArmor
  60.  
  61.  
  62.   IfTargetIsOnSameTeam
  63.     tmpargument = MESSAGEFRAG
  64.     IfTargetIsSelf
  65.       tmpargument = 0 - 500
  66.       SetContent // Won't come back...
  67.       tmpargument = MESSAGEACCIDENT
  68.   Else
  69.     GetDamageType
  70.     tmpx = tmpargument
  71.     tmpy = DAMAGEHOLY
  72.     IfXIsEqualToY
  73.       tmpargument = 0 - 500
  74.       SetContent // Won't come back...
  75.       tmpargument = 2
  76.     Else
  77.       tmpargument = MESSAGEDEATH
  78.   SendMessageNear
  79.  
  80.  
  81.   // Drop goodies
  82.   tmpargument = 65535
  83.   DropMoney
  84.  
  85.  
  86.   // Play the sound
  87.   tmpargument = 1
  88.   tmpdistance = rand & 2047 + 10000
  89.   PlaySound
  90.  
  91.  
  92.   // Make the character body
  93.   tmpargument = 25
  94.   SetBumpHeight
  95.  
  96.  
  97.  
  98. //------------------------------------------------------------------------------
  99. // ZZ> Let the character walk around
  100. IfTimeOut
  101.   tmpx = rand & 255
  102.   tmpy = 235
  103.   IfXIsMoreThanY
  104.     tmpargument = tmpx & 1 + 2
  105.     tmpdistance = rand & 2047 + 10000
  106.     PlaySound
  107.     // Randomize the frames...
  108.     tmpargument = tmpx & 1 + LATCHLEFT
  109.     PressLatchButton
  110.   SetTargetToNearbyEnemy
  111.     tmpx = targetdistance
  112.     tmpy = 110
  113.     IfXIsLessThanY
  114.       IfFacingTarget
  115.         tmpargument = rand & 1 + LATCHLEFT
  116.         PressLatchButton
  117.     tmpargument = 20
  118.     SetTime
  119.     tmpx = targetx
  120.     tmpy = targety
  121.     tmpdistance = 200
  122.     tmpturn = targetturnto
  123.     Compass
  124.   Else
  125.     tmpargument = rand & 31 + 120
  126.     SetTime
  127.     tmpx = rand & 1023 - 512 + selfspawnx
  128.     tmpy = rand & 1023 - 512 + selfspawny
  129.   ClearWaypoints
  130.   AddWaypoint
  131. IfAtLastWaypoint
  132.   tmpargument = 0
  133.   SetTime
  134.  
  135.  
  136. //------------------------------------------------------------------------------
  137. // ZZ> Handle being attacked by blocking or countering or running away
  138. IfAttacked
  139.   // Image changes with damage
  140.   tmpx = selflife
  141.   tmpy = 2048
  142.   IfXIsLessThanY
  143.     tmpargument = 1
  144.     ChangeArmor
  145.  
  146.  
  147.   // Scream
  148.   tmpargument = 0
  149.   tmpdistance = rand & 2047 + 10000
  150.   PlaySound
  151.   // Chase the attacker
  152.   SetTargetToWhoeverAttacked
  153.   IfTargetIsOnHatedTeam
  154.     tmpx = targetx
  155.     tmpy = targety
  156.     tmpdistance = 200
  157.     tmpturn = targetturnto
  158.     Compass
  159.     ClearWaypoints
  160.     AddWaypoint
  161.     tmpargument = 30
  162.     SetTime
  163.  
  164.  
  165. //------------------------------------------------------------------------------
  166. IfBumped
  167.   SetTargetToWhoeverBumped
  168.   IfTargetIsOnHatedTeam
  169.     IfFacingTarget
  170.       tmpargument = rand & 1 + LATCHLEFT
  171.       PressLatchButton
  172.     Else
  173.       tmpx = targetx
  174.       tmpy = targety
  175.       tmpdistance = 200
  176.       tmpturn = targetturnto
  177.       Compass
  178.       ClearWaypoints
  179.       AddWaypoint
  180.       tmpargument = 30
  181.       SetTime
  182.   Else
  183.     tmpargument = 0
  184.     SetTime
  185.     SetTargetToOldTarget
  186.  
  187.  
  188. //------------------------------------------------------------------------------
  189. End
  190. //------------------------------------------------------------------------------
  191.