home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / advent.mod / objects / healer.obj / script.txt < prev    next >
Text File  |  2000-02-27  |  4KB  |  148 lines

  1. // Show the character's location
  2. tmpx = selfx
  3. tmpy = selfy
  4. tmpargument = YELLOW
  5. ShowBlipXY
  6.  
  7.  
  8.  
  9. IfKilled                // This reduces the height of the char
  10.   tmpargument = 1
  11.   tmpdistance = rand & 1023 + 11000
  12.   PlaySound
  13.  
  14.   tmpargument = 0              // Last words...
  15.   SetState                  //
  16.   IfTargetIsOnSameTeam              // Fragged!
  17.     tmpargument = 3                //
  18.     IfTargetIsSelf                // No, just a damage tile
  19.       tmpargument = 4                  //
  20.   SendMessage                  //
  21.   tmpargument = 65535              // Drop money
  22.   DropMoney                  //
  23.   tmpargument = 45              //
  24.   SetBumpHeight                  //
  25. IfCalledForHelp                // Help others
  26.   SetTargetToWhoeverCalledForHelp      //
  27.     IfTargetIsAlive                // Go heal 'em
  28.       tmpargument = 2                  //
  29.       SetState                      // State 2 ( Helper )
  30.     Else                    // Too late
  31.       SetTargetToOldTarget              //
  32. IfTimeOut                // This is done every so often
  33.   tmpargument = 2              // Check state
  34.   IfStateIs                  // State 2 ( Helper )
  35.     IfTargetIsHurt                // Heal wounded
  36.       tmpx = targetdistance              //
  37.       tmpy = 300                  //
  38.       IfXIsLessThanY                  // In Range?
  39.         tmpx = 260                    //
  40.         tmpy = selfmana                    //
  41.         IfXIsLessThanY                // Enough to cast?
  42.           IfFacingTarget
  43.             tmpargument = LATCHLEFT              // Left Attack == 1
  44.             PressLatchButton                  //
  45.         Else                    // Do something else
  46.           tmpargument = 0                  //
  47.           SetState                      //
  48.     Else                    // Switch to follow
  49.       tmpargument = 0                  //
  50.       SetState                      //
  51.     tmpx = targetx                //
  52.     tmpy = targety                //
  53.   Else                      // Find someone to bash
  54.     SetTargetToNearbyEnemy            //
  55.       tmpargument = 1                  //
  56.       SetState                      //
  57.   tmpargument = 0              //
  58.   IfStateIs                  // State 0 ( Follow )
  59.     tmpx = leaderx                //
  60.     tmpy = leadery                //
  61.     tmpturn = leaderturn + 49152        // Stand to side
  62.     tmpdistance = 100                //
  63.     Compass                    //
  64.   tmpargument = 1              //
  65.   IfStateIs                  // State 1 ( Combat )
  66.     tmpx = targetdistance            // Close enough to attack?
  67.     tmpy = 200                    //
  68.     IfXIsLessThanY                //
  69.       tmpargument = LATCHRIGHT              // Right Attack == 2
  70.       PressLatchButton                  //
  71.     tmpy = 700
  72.     IfXIsMoreThanY
  73.       tmpargument = 0
  74.       SetState
  75.     tmpx = leaderdistance
  76.     IfXIsMoreThanY
  77.       tmpargument = 0
  78.       SetState
  79.     tmpx = targetx                // Move towards enemy
  80.     tmpy = targety                //
  81.     tmpturn = targetturnto            //
  82.     tmpdistance = 200                //
  83.     Compass                    //
  84.   ClearWaypoints              //
  85.   AddWaypoint                  //
  86.   tmpargument = rand & 15 + 15          // Try again later
  87.   SetTime                  //
  88. IfAttacked                // Counter attack if not healing
  89.   tmpargument = 0              //
  90.   IfStateIs                  //
  91.     SetTargetToWhoeverAttacked            //
  92.       IfTargetIsAlive                  //
  93.         IfTargetIsOnHatedTeam                // Go get 'em
  94.           tmpargument = 1                  //
  95.           SetState                      //
  96.           tmpargument = rand & 1 + 2
  97.           tmpdistance = rand & 1023 + 11000
  98.           PlaySound
  99.         IfTargetIsOnSameTeam                // Yell at 'em
  100.           tmpargument = MESSAGEOUCH              //
  101.           SendMessageNear                  //
  102.           SetTargetToOldTarget                  //
  103.           tmpargument = 4
  104.           tmpdistance = rand & 1023 + 11000
  105.           PlaySound
  106.       Else                      // Attacker dead already
  107.         SetTargetToOldTarget                //
  108. IfBumped                // Bumped
  109.   SetTargetToWhoeverBumped          //
  110.   IfTargetIsHurt              //
  111.     IfTargetIsOnOtherTeam            // Revert
  112.       SetTargetToOldTarget              //
  113.     Else                    // Heal 'em
  114.       tmpargument = 2                  // State 2 ( Helper )
  115.       SetState                      //
  116.   Else                      // Revert
  117.     SetTargetToOldTarget            //
  118.   tmpx = rand&511+selfx-256          //
  119.   tmpy = rand&511+selfy-256          //
  120.   ClearWaypoints              //
  121.   AddWaypoint                  //
  122.   tmpargument = 40              // Try again soon
  123.   SetTime                  //
  124. IfTargetKilled                // Mode switch
  125.   tmpargument = 0              // Return to follow mode
  126.   SetState                  //
  127.  
  128.  
  129. // Heal sound and effect
  130. IfUsed
  131.   tmpargument = 0
  132.   tmpdistance = 11025
  133.   PlayFullSound
  134.   tmpargument = 50
  135.   SetReloadTime
  136.   IfTargetIsOnSameTeam
  137.     tmpx = targetx
  138.     tmpy = targety
  139.     tmpdistance = targetz
  140.     tmpargument = 0
  141.     SpawnExactParticle
  142.  
  143.     tmpargument = rand & 511 + 512
  144.     HealTarget
  145.  
  146.  
  147. End                    // Finished with this character
  148.