home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / palshad.mod / objects / book.obj / script.txt < prev    next >
Text File  |  2000-01-28  |  2KB  |  77 lines

  1. // ZZ> This function makes an item fall to the floor when spawned
  2. IfSpawned                //
  3.   tmpargument = ACTIONJB          //
  4.   DoAction                  //
  5.   KeepAction                  //
  6.   DisaffirmCharacter              //
  7. IfStateIs1                // Spellbook burning?
  8.   IfTimeOut                  // All burned up?
  9.     tmpargument = 0                //
  10.     IfContentIs                    // Blank?
  11.       // Blank burn message
  12.       tmpargument = 5
  13.     Else                    // Spell?
  14.       // Find the nearest book-burner
  15.       tmpargument = [HEAL]
  16.       tmpdistance = 6  // Friends and Enemies...
  17.       SetTargetToNearestBlahID
  18.         // Give Experience
  19.         tmpargument = 25
  20.         tmpdistance = EXPROLEPLAY
  21.         GiveExperienceToTarget
  22.         // Approval message
  23.         tmpargument =  7
  24.       Else
  25.         // Spell burn message
  26.         tmpargument = 1                  //
  27.     SendMessageNear                //
  28.     UndoEnchant                    //
  29.     GoPoof                    //
  30.  
  31.  
  32.  
  33.  
  34.  
  35.     tmpargument = 0                // FIX FOR NETWORK
  36.     SetState                    // FIX FOR NETWORK
  37. Else                    // It's not burning...
  38.   IfReaffirmed                  // Catch on fire?
  39.     DetachFromHolder                //
  40.     tmpargument = 1                //
  41.     SetState                    //
  42.     tmpargument = 75                // Set death time
  43.     SetTime                    //
  44.     tmpargument = ACTIONKD            //
  45.     DoActionOverride                //
  46.     KeepAction                    //
  47. IfInWater                // Make the spellbook go blank
  48.   tmpargument = 0              // Is it blank?
  49.   IfContentIs                  // Yes
  50.     tmpargument = 0                //
  51.   Else                      // No, so make it blank
  52.     SetContent                    //
  53.     tmpargument = 3                //
  54.     SendMessageNear                //
  55.     MakeUsageKnown                //
  56. IfGrabbed                // Change into a spell
  57.   SetTargetToWhoeverIsHolding          //
  58.   IfTargetIsAPlayer              //
  59.     tmpx = 0                  //
  60.     tmpargument = 0              //
  61.     IfContentIs                  // Saved a blank one
  62.       tmpx = 4                    //
  63.     tmpargument = selfstate < 1 + tmpx      //
  64.     SendMessageNear              //
  65.     tmpargument = 0                //
  66.     SetState                    //
  67.   tmpargument = 0              //
  68.   IfContentIs                  // Is it soggy?
  69.     tmpargument = 0                // NOP
  70.   Else                      // No, so memorize the spell
  71.     BecomeSpell                    //
  72. IfHitGround                // Make a sound
  73.   tmpargument = 0              //
  74.   tmpdistance = rand & 2047 + 10000      //
  75.   PlaySound                  //
  76. End                    // All done
  77.