home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / rogue.mod / objects / mchest.obj / script.txt < prev    next >
Text File  |  2000-02-01  |  2KB  |  118 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.     // Is it closed?
  7.     tmpargument = 0
  8.     IfStateIs
  9.       // Open it up
  10.       tmpargument = ACTIONMG
  11.       DoAction
  12.         tmpargument = 1
  13.         SetState
  14.         tmpargument = 60
  15.         SetBumpHeight
  16.         KeepAction
  17.         tmpargument = 0
  18.         tmpdistance = 11025
  19.         PlaySound
  20.         // Wait a while
  21.         tmpargument = 40
  22.         SetTime
  23.         // Tell the players...
  24.         tmpargument = 1
  25.         SendMessageNear
  26.  
  27.  
  28. // Someone is trying to open it
  29. IfBumped
  30.   // Can they open the chest?
  31.   SetTargetToWhoeverBumped
  32.   IfTargetCanOpenStuff
  33.  
  34.  
  35.     // Is it closed?
  36.     tmpargument = 0
  37.     IfStateIs
  38.  
  39.  
  40.       // Are they in front?
  41.       IfFacingTarget
  42.  
  43.  
  44.         // Make target crouch
  45.         tmpargument = ACTIONMG
  46.         TargetDoAction
  47.  
  48.  
  49.         // Give some experience
  50.         tmpargument = 5
  51.         tmpdistance = EXPDARE
  52.         GiveExperienceToTarget
  53.  
  54.  
  55.         // Open it up
  56.         tmpargument = ACTIONMG
  57.         DoAction
  58.           tmpargument = 1
  59.           SetState
  60.           tmpargument = 60
  61.           SetBumpHeight
  62.           KeepAction
  63.           tmpargument = 0
  64.           tmpdistance = 11025
  65.           PlaySound
  66.           // Wait a while
  67.           tmpargument = 40
  68.           SetTime
  69.           // Tell the players...
  70.           tmpargument = 2
  71.           SendMessageNear
  72.     Else
  73.       IfTimeOut
  74.         // Reset the timer
  75.         tmpargument = 40
  76.         SetTime
  77.  
  78.  
  79.         // Is there a map left?
  80.         IfStateIs1
  81.           // Make target crouch
  82.           tmpargument = ACTIONMG
  83.           TargetDoAction
  84.  
  85.  
  86.           // Show the map
  87.           ShowYouAreHere
  88.           ShowMap
  89.             // Give Experience
  90.             tmpargument = 20
  91.             tmpdistance = EXPSECRET
  92.             GiveExperienceToTarget
  93.  
  94.  
  95.             // Tell everyone
  96.             tmpargument = 0
  97.             SendMessage
  98.             tmpargument = 1
  99.             tmpdistance = 11025
  100.             PlayFullSound
  101.           Else
  102.             // Don't need two maps...
  103.             tmpargument = 4
  104.             SendMessageNear
  105.  
  106.  
  107.           // Empty the chest
  108.           tmpargument = 2
  109.           SetState
  110.         Else
  111.           // The chest is empty
  112.           tmpargument = 3
  113.           SendMessageNear
  114.  
  115.  
  116. // All done
  117. End
  118.