home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / palshad.mod / objects / unseen.obj / script.txt < prev    next >
Text File  |  1999-11-14  |  2KB  |  120 lines

  1. // Create the character
  2. IfSpawned
  3.   KeepAction
  4.  
  5.  
  6.  
  7. // Remove the charge
  8. IfTakenOut
  9.   tmpargument = 0
  10.   SetContent
  11.   SetTargetToWhoeverIsHolding
  12.     IfTargetIsAPlayer
  13.       tmpargument = 3
  14.       SendMessageNear
  15. // Allow it to be charged up
  16. IfUsed
  17.   // Does it have one going?
  18.   UndoEnchant
  19.     tmpargument = 60
  20.     SetReloadTime
  21.   // Nope, so charge
  22.   Else
  23.     SetTargetToWhoeverIsHolding
  24.     tmpargument = [WMAG]
  25.     IfTargetHasSkillID
  26.       GetContent
  27.       tmpx = tmpargument
  28.       tmpy = 512
  29.       IfXIsLessThanY
  30.         tmpy = targetmanaflow
  31.         IfXIsLessThanY
  32.           tmpx = 4
  33.           tmpargument = tmpx
  34.           CostTargetMana
  35.             GetContent
  36.             tmpargument = tmpargument + 4
  37.             SetContent
  38.             tmpx = targetx
  39.             tmpy = targety
  40.             tmpdistance = targetz
  41.             tmpargument = 0
  42.             SpawnExactParticle
  43.       // Spawn particles around target
  44.       SetTargetToNearestFriend
  45.       tmpx = targetdistance
  46.       tmpy = 250
  47.       IfXIsMoreThanY
  48.         SetTargetToWhoeverIsHolding
  49.       tmpx = targetx
  50.       tmpy = targety
  51.       tmpdistance = targetz
  52.       tmpargument = 0
  53.       SpawnExactParticle
  54.  
  55.  
  56. // Let it be cast
  57. Else
  58.   GetContent
  59.   tmpx = tmpargument
  60.   tmpy = 0
  61.   IfXIsMoreThanY
  62.     tmpy = 511
  63.     IfXIsMoreThanY
  64.       // Cast the spell...
  65.       UndoEnchant  // There can be only one
  66.       SetTargetToWhoeverIsHolding
  67.       SetOwnerToTarget
  68.  
  69.  
  70.       // Find the target
  71.       SetTargetToNearestFriend
  72.       tmpx = targetdistance
  73.       tmpy = 250
  74.       IfXIsMoreThanY
  75.         SetTargetToWhoeverIsHolding
  76.  
  77.  
  78.       // Do the spell
  79.       EnchantTarget
  80.         MakeUsageKnown
  81.         MakeNameKnown
  82.         tmpargument = BLUE
  83.         SparkleIcon
  84.         tmpargument = 2
  85.         SendMessageNear
  86.       Else
  87.         tmpargument = 1
  88.         SendMessageNear
  89.  
  90.  
  91.       // Do flashy things
  92.       tmpargument = 0
  93.       tmpdistance = 11025
  94.       PlaySound
  95.       tmpargument = 60
  96.       SetReloadTime
  97.  
  98.  
  99.     // Nothing happens...
  100.     Else
  101.       tmpargument = 0
  102.       SendMessageNear
  103.  
  104.  
  105.     // Reset the charge counter
  106.     tmpargument = 0
  107.     SetContent
  108.  
  109.  
  110. // Return to spellbook, Do last!
  111. IfDropped
  112.   tmpargument = 0
  113.   SetContent
  114.   BecomeSpellbook
  115.   DisaffirmCharacter
  116.   tmpargument = ACTIONJB
  117.   DoAction
  118.   KeepAction
  119. End
  120.