home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / rogue.mod / objects / lrchest.obj / script.txt < prev    next >
Text File  |  2000-03-16  |  3KB  |  152 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 = 6
  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.         // Can they pick the lock?
  45.         tmpargument = [DISA]
  46.         IfTargetHasSkillID
  47.  
  48.  
  49.           // Make target crouch
  50.           tmpargument = ACTIONMG
  51.           TargetDoAction
  52.  
  53.  
  54.  
  55.           // Give some experience
  56.           tmpargument = 15
  57.           tmpdistance = EXPROLEPLAY
  58.           GiveExperienceToTarget
  59.  
  60.  
  61.           // Open it up
  62.           tmpargument = ACTIONMG
  63.           DoAction
  64.             tmpargument = 1
  65.             SetState
  66.             tmpargument = 60
  67.             SetBumpHeight
  68.             KeepAction
  69.             tmpargument = 0
  70.             tmpdistance = 11025
  71.             PlaySound
  72.             // Wait a while
  73.             tmpargument = 40
  74.             SetTime
  75.             // Tell the players...
  76.             tmpargument = 7
  77.             SendMessageNear
  78.         Else
  79.  
  80.  
  81.           // Do they have a chest key?
  82.           tmpargument = [KEYC]
  83.           CostTargetItemID
  84.  
  85.  
  86.             // Make target crouch
  87.             tmpargument = ACTIONMG
  88.             TargetDoAction
  89.  
  90.  
  91.             // Give some experience
  92.             tmpargument = 5
  93.             tmpdistance = EXPDARE
  94.             GiveExperienceToTarget
  95.  
  96.  
  97.             // Open it up
  98.             tmpargument = ACTIONMG
  99.             DoAction
  100.               tmpargument = 1
  101.               SetState
  102.               tmpargument = 60
  103.               SetBumpHeight
  104.               KeepAction
  105.               tmpargument = 0
  106.               tmpdistance = 11025
  107.               PlaySound
  108.               // Wait a while
  109.               tmpargument = 40
  110.               SetTime
  111.               // Tell the players...
  112.               tmpargument = 8
  113.               SendMessageNear
  114.           IfTimeOut
  115.             // Say it's locked...
  116.             tmpargument = 5
  117.             SendMessageNear
  118.             // Wait a while
  119.             tmpargument = 40
  120.             SetTime
  121.     Else
  122.       // Wait before allowing a swap
  123.       IfTimeOut
  124.         // Reset the timer
  125.         tmpargument = 40
  126.         SetTime
  127.  
  128.  
  129.         // Make target crouch
  130.         tmpargument = ACTIONMG
  131.         TargetDoAction
  132.  
  133.  
  134.         // Can the target use this armor
  135.         tmpargument = [ROGU]
  136.         IfTargetHasID
  137.           // Swap armor
  138.           GetContent
  139.           ChangeTargetArmor
  140.           SetContent
  141.           tmpargument = tmpx
  142.           SendMessageNear
  143.         Else
  144.           // Say it's for someone else
  145.           tmpargument = 4
  146.           SendMessageNear
  147.  
  148.  
  149.  
  150. // All done
  151. End
  152.