~ubuntu-branches/ubuntu/precise/egoboo-data/precise

« back to all changes in this revision

Viewing changes to modules/palsand.mod/objects/mimic.obj/script.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-04-25 10:20:11 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100425102011-1aosouybjkexdg9v
Tags: 1:2.7.7-1
* New Upstream Release
* Switch to debhelper

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//------------------------------------------------------------------------------
2
 
// ZZ> Mimics have an enchantment sustaining them
3
 
IfSpawned
4
 
  EnchantTarget  // Enchant self...
5
 
 
6
 
 
7
 
//------------------------------------------------------------------------------
8
 
// ZZ> Someone cast an unlock spell
9
 
IfOrdered
10
 
  tmpx = selforder
11
 
  tmpy = 491  // The unique code for an unlock order
12
 
  IfXIsEqualToY
13
 
    // Die
14
 
    SetTargetToSelf
15
 
    KillTarget
16
 
    tmpargument = 3
17
 
    SendMessageNear
18
 
 
19
 
 
20
 
//------------------------------------------------------------------------------
21
 
// ZZ> This function makes the character wait for the enemy to open it
22
 
IfKilled                                // This reduces the height of the char
23
 
  tmpargument = 0
24
 
  tmpdistance = rand & 1023 + 10500
25
 
  PlaySound
26
 
 
27
 
 
28
 
  tmpargument = 0                           //
29
 
  SendMessageNear                           // Kill message
30
 
  GetBumpHeight                           //
31
 
  tmpargument = tmpargument * 50 / 100    //
32
 
  SetBumpHeight                           //
33
 
  tmpargument = 65535                     // Drop money
34
 
  DropMoney                               //
35
 
  DropItems
36
 
IfTargetKilled                          // Check for more food
37
 
  tmpargument = 0                         //
38
 
  SetTargetToNearbyEnemy                  // Get the other enemy
39
 
    tmpargument = 1                         //
40
 
  SetState                                //
41
 
IfAttacked                              // Retaliation
42
 
  tmpargument = 0
43
 
  tmpdistance = rand & 1023 + 10500
44
 
  PlaySound
45
 
  SetTargetToWhoeverAttacked              // Get the enemy
46
 
    tmpargument = 0                         //
47
 
    IfStateIs                               // Enter combat mode
48
 
      tmpargument = 1                         //
49
 
      SetState                                //
50
 
      IfTargetIsAPlayer                       //
51
 
        tmpargument = 2                         //
52
 
        SendMessageNear                         // Advice
53
 
IfBumped                                // Attack whoever it bumped
54
 
  SetTargetToWhoeverBumped                //
55
 
  IfTargetIsOnHatedTeam                   // Make sure it's an enemy
56
 
    tmpargument = 0                         //
57
 
    IfStateIs                               // Enter combat mode
58
 
      IfTargetIsAPlayer                       // Advice
59
 
        tmpargument = 1                         //
60
 
        SendMessageNear                         //
61
 
      SetState                                // Combat
62
 
    tmpargument = 1                         // Attack Left = 1
63
 
    PressLatchButton                        //
64
 
IfTimeOut                               // This is done every so often
65
 
  tmpargument = 0                         //
66
 
  IfStateIs                               // State 0 ( Lurk )
67
 
    tmpx = selfx                            //
68
 
    tmpy = selfy                            //
69
 
  Else                                    // State 1 ( Combat )
70
 
    tmpx = 2000                             // Too far?
71
 
    tmpy = targetdistance                   //
72
 
    IfXIsLessThanY                          //
73
 
      SetState                                // Revert to lurk mode
74
 
    tmpx = tmpy                             // In attack range?
75
 
    tmpy = 250                              //
76
 
    IfXIsLessThanY                          // Stick and move
77
 
      tmpargument = 2
78
 
      tmpdistance = rand & 1023 + 10500
79
 
      PlaySound
80
 
 
81
 
      tmpargument = 1                         // Attack Left = 1
82
 
      PressLatchButton                        //
83
 
      tmpx = rand & 511 - 256 + targetx       //
84
 
      tmpy = rand & 511 - 256 + targety       //
85
 
    Else                                    // Get closer
86
 
      tmpargument = 1
87
 
      tmpdistance = rand & 1023 + 10500
88
 
      PlaySound
89
 
 
90
 
      tmpx = targetx                          //
91
 
      tmpy = targety                          //
92
 
      tmpturn = targetturnto                  //
93
 
      tmpdistance = 200                       //
94
 
      Compass                                 //
95
 
  ClearWaypoints                          //
96
 
  AddWaypoint                             //
97
 
  tmpargument = rand & 31 + 20            // Wait a while and try again
98
 
  SetTime                                 //
99
 
End                                     // Finished with this character
 
1
//------------------------------------------------------------------------------
 
2
// ZZ> Mimics have an enchantment sustaining them
 
3
IfSpawned
 
4
  EnchantTarget  // Enchant self...
 
5
 
 
6
 
 
7
//------------------------------------------------------------------------------
 
8
// ZZ> Someone cast an unlock spell
 
9
IfOrdered
 
10
  tmpx = selforder
 
11
  tmpy = 491  // The unique code for an unlock order
 
12
  IfXIsEqualToY
 
13
    // Die
 
14
    SetTargetToSelf
 
15
    KillTarget
 
16
    tmpargument = 3
 
17
    SendMessageNear
 
18
 
 
19
 
 
20
//------------------------------------------------------------------------------
 
21
// ZZ> This function makes the character wait for the enemy to open it
 
22
IfKilled                                // This reduces the height of the char
 
23
  tmpargument = 0
 
24
  tmpdistance = rand & 1023 + 10500
 
25
  PlaySound
 
26
 
 
27
 
 
28
  tmpargument = 0                           //
 
29
  SendMessageNear                           // Kill message
 
30
  GetBumpHeight                           //
 
31
  tmpargument = tmpargument * 50 / 100    //
 
32
  SetBumpHeight                           //
 
33
  tmpargument = 65535                     // Drop money
 
34
  DropMoney                               //
 
35
  DropItems
 
36
IfTargetKilled                          // Check for more food
 
37
  tmpargument = 0                         //
 
38
  SetTargetToNearbyEnemy                  // Get the other enemy
 
39
    tmpargument = 1                         //
 
40
  SetState                                //
 
41
IfAttacked                              // Retaliation
 
42
  tmpargument = 0
 
43
  tmpdistance = rand & 1023 + 10500
 
44
  PlaySound
 
45
  SetTargetToWhoeverAttacked              // Get the enemy
 
46
    tmpargument = 0                         //
 
47
    IfStateIs                               // Enter combat mode
 
48
      tmpargument = 1                         //
 
49
      SetState                                //
 
50
      IfTargetIsAPlayer                       //
 
51
        tmpargument = 2                         //
 
52
        SendMessageNear                         // Advice
 
53
IfBumped                                // Attack whoever it bumped
 
54
  SetTargetToWhoeverBumped                //
 
55
  IfTargetIsOnHatedTeam                   // Make sure it's an enemy
 
56
    tmpargument = 0                         //
 
57
    IfStateIs                               // Enter combat mode
 
58
      IfTargetIsAPlayer                       // Advice
 
59
        tmpargument = 1                         //
 
60
        SendMessageNear                         //
 
61
      SetState                                // Combat
 
62
    tmpargument = 1                         // Attack Left = 1
 
63
    PressLatchButton                        //
 
64
IfTimeOut                               // This is done every so often
 
65
  tmpargument = 0                         //
 
66
  IfStateIs                               // State 0 ( Lurk )
 
67
    tmpx = selfx                            //
 
68
    tmpy = selfy                            //
 
69
  Else                                    // State 1 ( Combat )
 
70
    tmpx = 2000                             // Too far?
 
71
    tmpy = targetdistance                   //
 
72
    IfXIsLessThanY                          //
 
73
      SetState                                // Revert to lurk mode
 
74
    tmpx = tmpy                             // In attack range?
 
75
    tmpy = 250                              //
 
76
    IfXIsLessThanY                          // Stick and move
 
77
      tmpargument = 2
 
78
      tmpdistance = rand & 1023 + 10500
 
79
      PlaySound
 
80
 
 
81
      tmpargument = 1                         // Attack Left = 1
 
82
      PressLatchButton                        //
 
83
      tmpx = rand & 511 - 256 + targetx       //
 
84
      tmpy = rand & 511 - 256 + targety       //
 
85
    Else                                    // Get closer
 
86
      tmpargument = 1
 
87
      tmpdistance = rand & 1023 + 10500
 
88
      PlaySound
 
89
 
 
90
      tmpx = targetx                          //
 
91
      tmpy = targety                          //
 
92
      tmpturn = targetturnto                  //
 
93
      tmpdistance = 200                       //
 
94
      Compass                                 //
 
95
  ClearWaypoints                          //
 
96
  AddWaypoint                             //
 
97
  tmpargument = rand & 31 + 20            // Wait a while and try again
 
98
  SetTime                                 //
 
99
End                                     // Finished with this character