2
// Decide which weapon to use
14
tmpargument = rand & 63 + 32
16
tmpargument = ACTIONMK
24
//------------------------------------------------------------------------------
26
SetTargetToWhoeverBumped
29
// Bumping a sleeping Cobol... How rude!
31
tmpdistance = rand & 2047 + 13000
37
tmpargument = ACTIONMJ
50
// Jump over barriers, onto mounts
53
// Jump over some stuff
54
tmpargument = LATCHJUMP
67
tmpargument = LATCHJUMP
72
//------------------------------------------------------------------------------
74
// Blocking... Need to keep that button pressed
76
// Revert to combat state
79
// Attack now if possible
91
//------------------------------------------------------------------------------
98
tmpargument = rand & 2
114
tmpdistance = EXPROLEPLAY
115
GiveExperienceToTarget
121
tmpargument = ACTIONKA
127
tmpdistance = rand & 2047 + 13000
136
// Make the character body
141
// Make the next part not happen...
147
//------------------------------------------------------------------------------
149
SetTargetToWhoeverAttacked
154
// This is what Rogues do best...
157
// Just a normal player
164
tmpdistance = EXPMURDER
165
GiveExperienceToTarget
172
IfTargetIsOnHatedTeam
175
tmpargument = tmpargument & 1 + 4 // Preserve even/odd
178
// Check for instant death
181
// Allow Rogues to backstab
191
tmpdistance = EXPMURDER
192
GiveExperienceToTarget
200
// Friendly fire, get out of the way
201
tmpx = rand & 511 - 256 + selfx
202
tmpy = rand & 511 - 256 + selfy
208
// Tell everyone to charge
213
tmpargument = rand & 1 + 2
214
tmpdistance = rand & 2047 + 13000
219
//------------------------------------------------------------------------------
221
// Check if the current target is alive or not
226
IfTargetIsOnHatedTeam
229
// Revert to target acquisition state ( Invisible enemy? Dismount? )
231
tmpargument = tmpargument & 1 // Retain even/odd
234
// Revert to target acquisition state
236
tmpargument = tmpargument & 1 // Retain even/odd
240
tmpargument = 100 // Default time... Shouldn't be needed
242
// Riding some type of animal...
244
SetTurnModeToVelocity
245
SetTargetToNearestEnemy
246
// Charge towards enemy
249
tmpturn = targetturnto
257
// Check for special mount attacks
258
tmpx = targetdistance
263
SetTargetToWhoeverIsHolding
265
tmpargument = LATCHRIGHT
269
// Don't let the enemy jump over
278
tmpargument = rand & 15 + 15 // TIme
280
// Guard the start position
281
tmpx = rand & 511 - 256 + selfspawnx
282
tmpy = rand & 511 - 256 + selfspawny
285
tmpargument = rand & 31 + 30 // TIme
288
// Behave according to state
290
// Odd states are for melee weapons
293
// Is the enemy facing the character?
294
tmpturn = selfturn - targetturn
305
// Tell everyone to attack while Cobol hides... Coward
308
tmpargument = rand & 15 + 15 // Time
310
// Circle around the enemy
311
SetTurnModeToWatchTarget
317
SetTargetToNearestFriend
319
tmpturn = targetdistance
320
IfDistanceIsMoreThanTurn
321
// The friend is close, so move away
322
tmpturn = targetturnto + 32768
325
// Make it look better
326
tmpargument = ACTIONWB
329
tmpturn = targetturnto + 32768
336
// Randomly issue the battle cry
341
tmpdistance = rand & 2047 + 13000
347
// Issue the battle cry if there's a threat
348
tmpx = targetdistance
357
tmpargument = rand & 15 + 10 // Time
359
// Randomly issue the retreat order
364
tmpdistance = rand & 2047 + 13000
371
// Charge and attack the enemy
372
GetContent // Desired range
373
tmpx = targetdistance
376
// Close enough to attack
382
tmpturn = targetturnto + 32768
389
tmpargument = rand & 15 + 40 // Time
391
// Too far, so get closer
394
tmpturn = targetturnto
396
// 1 = left, 2 = right
397
tmpargument = tmpargument < 13 // 8192 or 16384
398
tmpturn = tmpturn + tmpargument - 12288
403
tmpargument = rand & 15 + 8 // Time
405
// Rummage for a weapon
408
SetTurnModeToVelocity
409
tmpdistance = 250000 // Square of distance to check
410
SetTargetToDistantEnemy
411
// Charge towards enemy
417
// Next time, circle up
420
tmpargument = 20 // Time
422
// Guard the start position
423
tmpx = rand & 511 - 256 + selfspawnx
424
tmpy = rand & 511 - 256 + selfspawny
427
tmpargument = rand & 15 + 30 // Time
430
tmpargument = LATCHPACKRIGHT
432
tmpargument = 15 // Time
434
// Even states are for ranged weapons...
435
IfStateIs8 // ...and sleeping
445
tmpargument = rand & 3 + 4
446
tmpdistance = rand & 2047 + 15000
450
tmpargument = ACTIONMK
452
tmpdistance = 160000 // Distance to check
453
SetTargetToDistantEnemy
455
tmpargument = 100 // Time
458
// Too close... Wake up
460
tmpdistance = rand & 2047 + 13000
466
tmpargument = ACTIONMJ
476
tmpargument = 30 // Time
478
tmpargument = 100 // Time
480
// Decide whether to shoot again or not
484
tmpy = 0 // Captains don't run away
486
tmpx = targetdistance
493
tmpy = tmpargument + 200
502
// Time needn't be set here
509
// Don't shoot if friends are too close
510
SetTargetToNearestFriend
511
tmpx = targetdistance
514
// Keep distance from friends
517
tmpturn = rand & 8191 + 28000 + targetturnto
525
IfHoldingRangedWeapon
526
SetTurnModeToWatchTarget
530
// // Reload the weapon...
533
// tmpargument = [WOOD]
534
// RestockTargetAmmoIDAll
535
// SetTargetToOldTarget
540
// Go to close range mode
543
// Now using melee weapons
548
IfHoldingRangedWeapon
552
// // Reload the weapon...
555
// tmpargument = [WOOD]
556
// RestockTargetAmmoIDAll
557
// SetTargetToOldTarget
562
// Go to close range mode
565
// Now using melee weapons
571
tmpargument = rand & 7 + 10 // Time before next check
573
// Get into firing position
574
SetTurnModeToVelocity
579
SetTargetToNearestFriend
580
tmpx = targetdistance
583
// Keep distance from friends
592
tmpturn = xyturnto + 32768
594
tmpdistance = tmpargument // Desired range
601
// Check distance to target
602
tmpx = targetx - selfx
603
tmpy = targety - selfy
604
tmpx = xydistance // Pythag thing... targetdistance isn't as good
606
tmpy = tmpargument - 300 // The desired range ( MIN )
607
tmpargument = rand & 15 + 15 // Default time
609
tmpy = tmpy + 600 // The desired range ( MAX )
611
// Target is in range, so switch to fire state
614
SetTurnModeToWatchTarget
615
tmpargument = 30 // Time before shooting
618
SetTurnModeToVelocity
619
SetTargetToNearestEnemy
620
// Move away from enemy
623
tmpturn = targetturnto + 32768
629
// Go to position state
632
tmpargument = 50 // Time
634
// Guard the start position
639
tmpargument = rand & 15 + 30 // Time
642
// tmpargument is set above
647
//------------------------------------------------------------------------------
649
// Someone said to wake up
657
// Check distance to enemy
659
SetTargetToNearestEnemy
660
tmpx = targetdistance
665
tmpdistance = rand & 2047 + 13000
671
tmpargument = ACTIONMJ
684
// Ignore wake orders...
690
// Someone said to attack ( hand to hand )
696
tmpargument = selforder
698
tmpargument = rand & 7
702
//------------------------------------------------------------------------------
709
//------------------------------------------------------------------------------
711
//------------------------------------------------------------------------------