home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / palshad.mod / objects / schest.obj / script.txt < prev    next >
Text File  |  2000-06-06  |  2KB  |  103 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 = 5
  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 = 6
  71.           SendMessageNear
  72.     Else
  73.       // Wait before allowing a swap
  74.       IfTimeOut
  75.         // Reset the timer
  76.         tmpargument = 40
  77.         SetTime
  78.  
  79.  
  80.         // Make target crouch
  81.         tmpargument = ACTIONMG
  82.         TargetDoAction
  83.  
  84.  
  85.         // Can the target use this armor
  86.         tmpargument = [SOLD]
  87.         IfTargetHasID
  88.           // Swap armor
  89.           GetContent
  90.           ChangeTargetArmor
  91.           SetContent
  92.           tmpargument = tmpx
  93.           SendMessageNear
  94.         Else
  95.           // Say it's for someone else
  96.           tmpargument = 4
  97.           SendMessageNear
  98.  
  99.  
  100.  
  101. // All done
  102. End
  103.