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

  1. // Someone cast an unlock spell
  2. IfOrdered
  3.   tmpx = selforder
  4.   tmpy = 491  // The unique code for an unlock order
  5.   IfXIsEqualToY
  6.     // Open it up
  7.     tmpargument = passage + 1
  8.     OpenPassage
  9.       tmpargument = 1
  10.       SendMessageNear
  11.     Else
  12.       tmpargument = 2
  13.       SendMessageNear
  14.  
  15.  
  16. // See if there is a character in the detect passage
  17. IfTimeOut
  18.   tmpargument = 10
  19.   SetTime
  20.   KeepAction
  21.   tmpargument = passage + 1
  22.   IfPassageOpen
  23.     GetContent // NOP
  24.   Else
  25.     GetContent
  26.     tmpdistance = tmpargument + [KEYA]  // KEYA - KEYZ
  27.     tmpargument = passage
  28.     SetTargetToPassageID
  29.       tmpargument = tmpdistance
  30.       CostTargetItemID
  31.         // Give EXP
  32.         tmpargument = 10
  33.         tmpdistance = EXPSECRET
  34.         GiveExperienceToTarget
  35.  
  36.         // Display text
  37.         tmpargument = 0
  38.         SendMessageNear
  39.  
  40.         // Open it up
  41.         tmpargument = passage + 1
  42.         OpenPassage
  43.  
  44.  
  45. // Handle the animation and sound
  46. tmpargument = passage + 1    // Is the passage clear?
  47. IfPassageOpen            // 
  48.   tmpargument = 0          //
  49.   IfStateIs              // State 0 ( Closed )
  50.     tmpargument = ACTIONMG        //
  51.     DoAction                //
  52.       tmpargument = 1              // Open it
  53.       SetState                  //
  54.       tmpargument = 0              //
  55.       tmpdistance = 11025          //
  56.       PlaySound                  //
  57. Else
  58.   tmpargument = 1          //
  59.   IfStateIs              // State 1 ( Open )
  60.     tmpargument = ACTIONMJ        //
  61.     DoAction                //
  62.       tmpargument = 0              // Close it
  63.       SetState                  //
  64.       tmpargument = 1              //
  65.       tmpdistance = 11025          //
  66.       PlaySound                  //
  67. End                // Finished with this character
  68.