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

« back to all changes in this revision

Viewing changes to modules/catacomb1.mod/objects/ghoul.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
// Check for a kill order
 
2
IfOrdered
 
3
  tmpx = selforder
 
4
  tmpy = [UNDO]
 
5
  IfXIsEqualToY
 
6
    UndoEnchant
 
7
    tmpargument = 0 - 500
 
8
    SetContent // Won't come back...
 
9
 
 
10
 
 
11
//------------------------------------------------------------------------------
 
12
// ZZ> Most undead have an enchantment sustaining them
 
13
IfSpawned
 
14
  EnchantTarget  // Enchant self...
 
15
 
 
16
 
 
17
//------------------------------------------------------------------------------
 
18
// ZZ> Rise from the dead...  Takes several times to wake...
 
19
IfCleanedUp
 
20
  GetContent
 
21
  tmpx = tmpargument
 
22
  tmpy = 0 - 1
 
23
  IfXIsMoreThanY
 
24
    tmpargument = tmpargument + 1
 
25
    SetContent
 
26
    tmpy = selfcounter & 7 + 7
 
27
    IfXIsMoreThanY
 
28
      tmpx = selfz
 
29
      tmpy = 0 - 20
 
30
      IfXIsMoreThanY
 
31
        tmpargument = 0
 
32
        SetContent
 
33
        tmpargument = 1
 
34
        SendMessageNear
 
35
        SetTargetToSelf
 
36
        RespawnTarget           // Same location, RespawnCharacter returns to start...
 
37
        EnchantTarget           // Enchant self...
 
38
        tmpargument = 244       // Frame 61...
 
39
        SetFrame
 
40
        tmpargument = ACTIONMD
 
41
        DoActionOverride
 
42
        tmpargument = 50
 
43
        SetReloadTime
 
44
        tmpargument = 0
 
45
        ChangeArmor
 
46
      Else
 
47
        // No coming back from the pit...
 
48
        tmpargument = tmpy
 
49
        SetContent
 
50
 
 
51
 
 
52
 
 
53
//------------------------------------------------------------------------------
 
54
// ZZ> Handle death by sending a message and other stuff
 
55
IfKilled
 
56
  tmpargument = 1
 
57
  ChangeArmor
 
58
 
 
59
 
 
60
  IfTargetIsOnSameTeam
 
61
    tmpargument = MESSAGEFRAG
 
62
    IfTargetIsSelf
 
63
      tmpargument = 0 - 500
 
64
      SetContent // Won't come back...
 
65
      tmpargument = MESSAGEACCIDENT
 
66
  Else
 
67
    GetDamageType
 
68
    tmpx = tmpargument
 
69
    tmpy = DAMAGEHOLY
 
70
    IfXIsEqualToY
 
71
      tmpargument = 0 - 500
 
72
      SetContent // Won't come back...
 
73
      SetTargetToWhoeverAttacked                //Give exp
 
74
      tmpargument = 20
 
75
      tmpdistance = EXPREVENGE
 
76
      GiveExperienceToTarget
 
77
      tmpargument = 2
 
78
    Else
 
79
      tmpargument = MESSAGEDEATH
 
80
  SendMessageNear
 
81
 
 
82
 
 
83
  // Drop goodies
 
84
  tmpargument = 65535
 
85
  DropMoney
 
86
 
 
87
 
 
88
  // Play the sound
 
89
  tmpargument = 1
 
90
  PlaySound
 
91
 
 
92
 
 
93
  // Make the character body
 
94
  tmpargument = 25
 
95
  SetBumpHeight
 
96
 
 
97
 
 
98
 
 
99
//------------------------------------------------------------------------------
 
100
// ZZ> Let the character walk around
 
101
IfTimeOut
 
102
  tmpx = rand & 255
 
103
  tmpy = 235
 
104
  IfXIsMoreThanY
 
105
    tmpargument = tmpx & 1 + 2
 
106
    PlaySound
 
107
    // Randomize the frames...
 
108
    tmpargument = tmpx & 1 + LATCHLEFT
 
109
    PressLatchButton
 
110
  SetTargetToNearbyEnemy
 
111
    tmpx = targetdistance
 
112
    tmpy = 140
 
113
    IfXIsLessThanY
 
114
      IfFacingTarget
 
115
        tmpargument = rand & 1 + LATCHLEFT
 
116
        PressLatchButton
 
117
    tmpargument = 20
 
118
    SetTime
 
119
    tmpx = targetx
 
120
    tmpy = targety
 
121
    tmpdistance = 200
 
122
    tmpturn = targetturnto
 
123
    Compass
 
124
  Else
 
125
    tmpargument = rand & 31 + 60
 
126
    SetTime
 
127
    tmpx = rand & 1023 - 512 + selfspawnx
 
128
    tmpy = rand & 1023 - 512 + selfspawny
 
129
  ClearWaypoints
 
130
  AddWaypoint
 
131
IfAtLastWaypoint
 
132
  tmpargument = 0
 
133
  SetTime
 
134
 
 
135
 
 
136
//------------------------------------------------------------------------------
 
137
// ZZ> Handle being attacked by blocking or countering or running away
 
138
IfAttacked
 
139
  // Image changes with damage
 
140
  tmpx = selflife
 
141
  tmpy = 2048
 
142
  IfXIsLessThanY
 
143
    tmpargument = 1
 
144
    ChangeArmor
 
145
 
 
146
 
 
147
  // Scream
 
148
  tmpargument = 0
 
149
  PlaySound
 
150
 
 
151
  // Chase the attacker
 
152
  SetTargetToWhoeverAttacked
 
153
  IfTargetIsOnHatedTeam
 
154
    tmpx = targetx
 
155
    tmpy = targety
 
156
    tmpdistance = 200
 
157
    tmpturn = targetturnto
 
158
    Compass
 
159
    ClearWaypoints
 
160
    AddWaypoint
 
161
    tmpargument = 30
 
162
    SetTime
 
163
 
 
164
 
 
165
//------------------------------------------------------------------------------
 
166
IfBumped
 
167
  SetTargetToWhoeverBumped
 
168
  IfTargetIsOnHatedTeam
 
169
    IfFacingTarget
 
170
      tmpargument = rand & 1 + LATCHLEFT
 
171
      PressLatchButton
 
172
    Else
 
173
      tmpx = targetx
 
174
      tmpy = targety
 
175
      tmpdistance = 200
 
176
      tmpturn = targetturnto
 
177
      Compass
 
178
      ClearWaypoints
 
179
      AddWaypoint
 
180
      tmpargument = 30
 
181
      SetTime
 
182
  Else
 
183
    tmpargument = 0
 
184
    SetTime
 
185
    SetTargetToOldTarget
 
186
 
 
187
 
 
188
//------------------------------------------------------------------------------
 
189
End
 
190
//------------------------------------------------------------------------------