home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / healer.mod / objects / gatelite.obj / SCRIPT.TXT < prev    next >
Text File  |  2000-07-09  |  2KB  |  86 lines

  1. IfSpawned
  2.   // Setup the gate frames ( tile animation )
  3.   tmpx = 128
  4.   tmpy = 130
  5.   tmpargument = 0
  6.   SetXY
  7.   tmpx = 132
  8.   tmpy = 134
  9.   tmpargument = 1
  10.   SetXY
  11.   tmpx = 144
  12.   tmpy = 146
  13.   tmpargument = 2
  14.   SetXY
  15.   tmpx = 148
  16.   tmpy = 150
  17.   tmpargument = 3
  18.   SetXY
  19.   tmpx = 160
  20.   tmpy = 162
  21.   tmpargument = 4
  22.   SetXY
  23.   tmpx = 164
  24.   tmpy = 166
  25.   tmpargument = 5
  26.   SetXY
  27.   tmpx = 176
  28.   tmpy = 178
  29.   tmpargument = 6
  30.   SetXY
  31.   tmpx = 180
  32.   tmpy = 182
  33.   tmpargument = 7
  34.   SetXY
  35.   tmpargument = 50
  36.   SetTime
  37. IfTimeOut
  38.   IfStateIs0
  39.     // Wait until the closest player moves
  40.     tmpargument = 4
  41.     SetTime
  42.     tmpargument = [HUMA]
  43.     tmpdistance = 14  // Items, Friends, Enemies
  44.     SetTargetToNearestBlahID
  45.       tmpx = targetx - 4608 
  46.       tmpy = targety - 7104
  47.       tmpx = xydistance
  48.       tmpy = 80
  49.       IfXIsMoreThanY
  50.         // Play close sound
  51.         tmpargument = 0
  52.         tmpdistance = 11025
  53.         PlaySound
  54.         // Close the door
  55.         tmpargument = ACTIONMJ
  56.         DoActionOverride
  57.         tmpargument = 4
  58.         SetFrame
  59.         tmpargument = 1
  60.         SetState
  61.   IfStateIs1
  62.     tmpargument = 2
  63.     SetTime
  64.     GetContent
  65.     tmpargument = tmpargument + 1
  66.     SetContent
  67.     tmpx = tmpargument
  68.     tmpy = 8
  69.     IfXIsLessThanY
  70.       // Update the map image
  71.       tmpargument = tmpx
  72.       GetXY
  73.       tmpargument = tmpx
  74.       tmpdistance = tmpy
  75.       tmpx = 4480
  76.       tmpy = 7296
  77.       SetTileXY
  78.       tmpargument = tmpdistance
  79.       tmpx = 4608
  80.       SetTileXY
  81.     Else
  82.       tmpx = tmpx - 8 * 42
  83.       tmpargument = 254 - tmpx
  84.       SetLight
  85. End
  86.