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

  1. // Show the character's location
  2. tmpx = selfx
  3. tmpy = selfy
  4. tmpargument = BLUE
  5. ShowBlipXY
  6.  
  7.  
  8. IfKilled                // This reduces the height of the char
  9.   tmpdistance = rand & 1023 + 11000
  10.   tmpargument = 6
  11.   PlaySound
  12.  
  13.   tmpargument = 0              // Last words...
  14.   SetState                  //
  15.   IfTargetIsOnSameTeam              // Fragged!
  16.     tmpargument = 3                //
  17.     IfTargetIsSelf                // No, just a damage tile
  18.       tmpargument = 4                  //
  19.   SendMessage                  //
  20.   tmpargument = 65535              // Drop money
  21.   DropMoney                  //
  22.   tmpargument = 45              //
  23.   SetBumpHeight                  //
  24. IfAttacked                // Attacked
  25.   SetTargetToWhoeverAttacked          //
  26.     IfTargetIsAlive                //
  27.       IfTargetIsOnHatedTeam              // Go after 'em
  28.         tmpargument = 1                    //
  29.         SetState                    //  
  30.         tmpdistance = rand & 2047 + 11000       // Ouch!
  31.         tmpargument = tmpdistance & 1 + 4
  32.         PlaySound                    //
  33.       Else                      // Complain
  34.         tmpargument = 2                    //
  35.         SendMessageNear                    //
  36.         tmpargument = 1                    //
  37.         tmpdistance = rand & 2047 + 11000       //
  38.         PlaySound                    //
  39.         SetTargetToOldTarget                //
  40.     Else                    //Attacker died already
  41.       SetTargetToOldTarget              //
  42. IfTargetKilled                // Return to follow mode
  43.   tmpargument = 0              // State 0 ( Follow )
  44.   SetState                  //
  45. IfTimeOut                // This is done every so often
  46.   GetContent
  47.   tmpx = tmpargument
  48.   tmpy = 1
  49.   IfXIsEqualToY
  50.     // Say "After Her"
  51.     tmpargument = 8
  52.     tmpdistance = 11025
  53.     PlayFullSound
  54.  
  55.     tmpargument = 5
  56.     SendMessageNear
  57.  
  58.     tmpargument = 0
  59.     SetContent
  60.   Else
  61.     IfXIsMoreThanY
  62.       // Say it next time
  63.       tmpargument = tmpx - 1
  64.       SetContent
  65.   SetTargetToNearbyEnemy          // Look out for enemies
  66.     tmpargument = 1                  //
  67.     SetState                      // Change to combat mode
  68.     tmpargument = selfhateid              //
  69.     IfTargetHasID                  // Battle cry versus hate group
  70.       IfTargetIsOldTarget                //
  71.         tmpargument = 0                      // NOP
  72.       Else                        //
  73.         tmpargument = 1                      //
  74.         SendMessageNear                      //
  75.         tmpargument = 3                      //
  76.         tmpdistance = rand & 2047 + 11000         //
  77.         PlaySound                      //
  78.   tmpargument = 0              // Check state
  79.   IfStateIs                  // State 0 ( Follow )
  80.     tmpx = leaderx                //
  81.     tmpy = leadery                //
  82.     tmpturn = 16384 + leaderturn        // Stand to side
  83.     tmpdistance = 100                //
  84.     Compass                    //
  85.   Else                      // State 1 ( Combat )
  86.     tmpx = targetdistance            // Close enough to attack?
  87.     tmpy = 200                    //
  88.     IfXIsLessThanY                //
  89.       tmpargument = LATCHRIGHT              // Right Attack == 2
  90.       PressLatchButton                  //
  91.     tmpy = 700
  92.     IfXIsMoreThanY
  93.       tmpargument = 0
  94.       SetState
  95.     tmpx = leaderdistance
  96.     IfXIsMoreThanY
  97.       tmpargument = 0
  98.       SetState
  99.     tmpx = targetx                // Move towards enemy
  100.     tmpy = targety                //
  101.     tmpturn = targetturnto            //
  102.     tmpdistance = 200                //
  103.     Compass                    //
  104.   ClearWaypoints              //
  105.   AddWaypoint                  //
  106.   tmpargument = rand&20              // Try again later
  107.   SetTime                  //
  108.  
  109. // Use shield?
  110. IfTargetIsAttacking
  111.   IfTargetIsOnHatedTeam
  112.     IfFacingTarget
  113.       tmpargument = LATCHLEFT
  114.       PressLatchButton
  115.  
  116.  
  117. IfBumped                // Bumped
  118.   SetTargetToWhoeverBumped          //
  119.   IfTargetIsOnHatedTeam              // Try to counter
  120.     tmpargument = LATCHRIGHT            //
  121.     PressLatchButton                //
  122.   Else                      // Get around other character
  123.     tmpargument = 0                // Return to follow state
  124.     SetTargetToNearbyEnemy            // Look out for enemies
  125.       tmpargument = 1                  // Stay in combat state
  126.     Else                    // Revert
  127.       SetTargetToOldTarget              //
  128.     SetState                    //
  129.     tmpx = rand&511+selfx-256            //
  130.     tmpy = rand&511+selfy-256            //
  131.     ClearWaypoints                //
  132.     AddWaypoint                    //
  133.     tmpargument = 40                // Try again soon
  134.     SetTime                    //
  135.  
  136.  
  137. // Ya!  Unarmed attack sound
  138. IfUsed
  139.   tmpdistance = rand & 1023 + 11000
  140.   tmpargument = 7
  141.   PlaySound
  142. End                    // Finished with this character
  143.