home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 42 / CDGAMER42.iso / Egoboo / egoboo.exe / egoboo / modules / palshad.mod / objects / watcher.obj / script.txt < prev    next >
Text File  |  2000-05-26  |  2KB  |  68 lines

  1. // ZZ> This function makes the character wanders around its enemy
  2. IfKilled                // This reduces the height of the char
  3.   tmpargument = 0                //
  4.   SendMessageNear                //
  5.   tmpargument = 40              //
  6.   SetBumpSize                  //
  7.   tmpargument = 45              //
  8.   SetBumpHeight                  //
  9.   tmpargument = 65535              // Drop money
  10.   DropMoney                  //
  11.   tmpargument = 0              //
  12.   tmpdistance = rand & 2047 + 10000      //
  13.   PlaySound
  14.   SpawnPoof
  15. //  PlaySound                  //
  16. IfAttacked                // Counter attack
  17.   SetTargetToWhoeverAttacked          //
  18.     IfTargetIsOnHatedTeam            //
  19.       BecomeLeader                  //
  20.       tmpargument = 1                  // Enter combat mode
  21.       SetState                      //
  22.     Else                    //
  23.       SetTargetToOldTarget              //
  24.   tmpargument = rand & 1          //
  25.   tmpdistance = rand & 4095 + 8000      //
  26. //  PlaySound                  //
  27. IfTargetKilled                // Return to follow mode
  28.   tmpargument = 0              //
  29.   SetState                  //
  30. IfBumped                // Attack whoever it bumped
  31.   SetTargetToWhoeverBumped          //
  32.   IfTargetIsOnHatedTeam              // Make sure it's an enemy
  33.     IfHoldingMeleeWeapon                    // Got Weapon?
  34.       PressLatchButton                  //
  35.   Else                      // Scooch around friendly
  36.     tmpx = rand & 255 + targetx - 128        //
  37.     tmpy = rand & 255 + targety - 128        //
  38.     ClearWaypoints                //
  39.     AddWaypoint                    //
  40.     SetTargetToOldTarget            //
  41. IfTimeOut                // This is done every so often
  42.   IfStateIs0
  43.     tmpx = selfx
  44.     tmpy = selfy
  45.     SetTargetToNearestEnemy
  46.       IfFacingTarget
  47.         SetTurnModeToWatchTarget
  48.         tmpargument = 1
  49.         SetState
  50.       Else
  51.         SetTurnModeToSpin
  52.   IfStateIs1
  53.     tmpx = targetdistance
  54.     tmpy = 1000
  55.     IfXIsLessThanY
  56.       tmpx = targetx
  57.       tmpy = targety
  58.     Else
  59.       tmpx = selfx
  60.       tmpy = selfy
  61.       tmpargument = 0
  62.       SetState
  63.   ClearWaypoints              //
  64.   AddWaypoint                  //
  65.   tmpargument = rand & 15 + 30          // Wait a while and try again
  66.   SetTime                  //
  67. End                    // Finished with this character
  68.