home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / healer.mod / objects / rebirth.obj / SCRIPT.TXT < prev    next >
Text File  |  2000-06-25  |  3KB  |  150 lines

  1. // ZZ> This function makes an item fall to the floor when spawned
  2. IfSpawned                //
  3.   tmpargument = ACTIONJB          //
  4.   DoAction                  //
  5.   KeepAction                  //
  6.   MakeCrushValid
  7.   MakeAmmoKnown
  8. IfCrushed
  9.   tmpx = selfx
  10.   tmpy = selfy
  11.   tmpdistance = selfz
  12.   tmpargument = 2
  13.   SpawnExactParticle
  14.   SpawnExactParticle
  15.   SpawnExactParticle
  16.   SpawnExactParticle
  17.   GoPoof
  18.   tmpargument = 6
  19.   SendMessageNear
  20. IfDropped                // Make it lie on floor
  21.   KeepAction                  //
  22. IfHitGround                // Make a sound
  23.   tmpargument = 0              //
  24.   tmpdistance = rand & 2047 + 10000      //
  25.   PlaySound                  //
  26. IfInWater
  27.   IfHeld
  28.     GetState // NOP
  29.   Else
  30.     // Go blank
  31.     GetContent
  32.     tmpx = tmpargument
  33.     tmpy = 0
  34.     IfXIsEqualToY
  35.       tmpargument = 1
  36.       SetContent
  37.       tmpargument = 5
  38.       SendMessageNear
  39.       MakeNameKnown      // To keep messages okay
  40. IfGrabbed                // Tell them what they've won...
  41.   SetTargetToWhoeverIsHolding          //
  42.   SetOwnerToTarget
  43.   IfTargetIsAPlayer              //
  44.     GetContent
  45.     SendMessageNear              //
  46. IfUsed
  47.   GetContent
  48.   tmpx = tmpargument
  49.   tmpy = 0
  50.   IfXIsEqualToY
  51.     // Find Target state
  52.     tmpargument = 1
  53.     SetState
  54.  
  55.  
  56.     // Make sparklies around caster
  57.     SetTargetToWhoeverIsHolding
  58.       tmpx = targetx
  59.       tmpy = targety
  60.       tmpdistance = targetz
  61.       tmpargument = 0
  62.       SpawnExactParticle
  63.  
  64.  
  65.     // Make sparklies around target
  66.     tmpargument = [NONE]
  67.     tmpdistance = 5  // Dead friends
  68.     SetTargetToNearestBlahID
  69.       tmpx = targetx
  70.       tmpy = targety
  71.       tmpdistance = targetz
  72.       tmpargument = 0
  73.       SpawnExactParticle
  74.   Else
  75.     // Can't use a blank scroll...
  76.     tmpargument = 0
  77.     SetState
  78.     tmpargument = 7
  79.     SendMessageNear
  80.     tmpargument = 50
  81.     SetReloadTime
  82. Else
  83.   // Has it been charged?
  84.   IfStateIs1
  85.     // Revert to uncharged state
  86.     tmpargument = 0
  87.     SetState
  88.  
  89.  
  90.     // Respawn the target
  91.     tmpargument = [NONE]
  92.     tmpdistance = 5  // Dead friends
  93.     SetTargetToNearestBlahID
  94.       RespawnTarget
  95.  
  96.  
  97.       // Play the gong sound
  98.       tmpargument = 1
  99.       tmpdistance = 8000
  100.       PlayFullSound
  101.  
  102.  
  103.       // Let all the players know
  104.       tmpargument = 2
  105.       SendMessage
  106.  
  107.  
  108.       // Give experience to caster
  109.       IfNameIsKnown
  110.         GetState
  111.       Else
  112.         SetTargetToWhoeverIsHolding
  113.         tmpargument = 5
  114.         tmpdistance = EXPSECRET
  115.         GiveExperienceToTarget
  116.       MakeSimilarNamesKnown
  117.     Else
  118.       // Say that it didn't work...
  119.       tmpargument = 3
  120.       SendMessageNear
  121.  
  122.  
  123.  
  124.     // Don't use a second one right away
  125.     SetTargetToWhoeverIsHolding
  126.     tmpargument = 20
  127.     SetTargetReloadTime
  128.  
  129.  
  130.     // Get rid of a scroll
  131.     CostAmmo
  132.     IfAmmoOut
  133.       GoPoof
  134. IfReaffirmed
  135.   IfHeld
  136.     GetState
  137.   Else
  138.     tmpx = selfx
  139.     tmpy = selfy
  140.     tmpdistance = selfz
  141.     tmpargument = 2
  142.     SpawnExactParticle
  143.     SpawnExactParticle
  144.     SpawnExactParticle
  145.     SpawnExactParticle
  146.     GoPoof
  147.     tmpargument = 4
  148.     SendMessageNear
  149. End                    // All done
  150.