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

« back to all changes in this revision

Viewing changes to modules/heist.mod/objects/eyeballguard.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
//The different states
 
2
//0: Watch mode
 
3
//1: Combat mode
 
4
//3: Backstabbed
 
5
 
 
6
//SPECIAL Knife's Heist Module stuff
 
7
IfKilled
 
8
  tmpx = 7100
 
9
  tmpy = 5350
 
10
  tmpturn = 0
 
11
  tmpargument = 56
 
12
  tmpdistance = 400
 
13
  SpawnExactCharacterXYZ
 
14
  tmpargument = 6
 
15
  PlaySound
 
16
 
 
17
//---------------------------------------------------------------------------------
 
18
//What to do if warned
 
19
IfCalledForHelp
 
20
  SetTargetToWideEnemy
 
21
    tmpargument = 3
 
22
    IfStateIsNot                //Dont if backstabbed
 
23
      tmpargument = 1
 
24
      SetState
 
25
  Else
 
26
    SetTargetToOldTarget
 
27
    tmpargument = 0
 
28
    SetState
 
29
 
 
30
//---------------------------------------------------------------------------------
 
31
//New round
 
32
IfTimeOut
 
33
  tmpargument = rand & 15 + 30
 
34
  SetTime
 
35
                         
 
36
  //WATCH MODE
 
37
  IfStateIs0
 
38
    Sneak
 
39
    SetTargetToWideEnemy                //Enemy nearby?
 
40
      IfFacingTarget                    //See the enemy
 
41
        tmpx = targetz
 
42
        tmpy = 300
 
43
        IfXIsLessThanY                  //Target not flying or jumping out of sight?
 
44
          tmpargument = 1               //Enter combat mode
 
45
          SetState
 
46
    Else
 
47
      SetTurnModeToSpin                 //Spin around
 
48
    tmpx = selfx
 
49
    tmpy = selfy
 
50
 
 
51
  //COMBAT MODE
 
52
  IfStateIs1
 
53
    SetTurnModeToVelocity
 
54
    Run
 
55
    SetTargetToWideEnemy                //Enemy nearby?
 
56
      CallForHelp
 
57
      //SHOOT EYE RAY
 
58
      IfFacingTarget
 
59
        tmpargument = rand & 25 + 25    //Time between shots
 
60
        SetTime
 
61
        tmpargument = rand % 3 + 1      //Randomize ray
 
62
        tmpx = selfx
 
63
        tmpy = selfy
 
64
        tmpdistance = selfz + 50
 
65
        SpawnExactParticle
 
66
//        tmpargument = 256             //1 ray costs 1 mana
 
67
//        SetTargetToSelf
 
68
//        CostTargetMana
 
69
      tmpx = targetx
 
70
      tmpy = targety                    //Move towards him or her
 
71
 
 
72
    Else                                //Enemy ran away
 
73
      tmpargument = 0
 
74
      SetState
 
75
  ClearWaypoints                          //
 
76
  AddWaypoint                             //    
 
77
 
 
78
//---------------------------------------------------------------------------------
 
79
//Change skin
 
80
IfStateIs0              //When watching
 
81
  tmpargument = 0
 
82
  tmpx = selfspawnx     //Return to start
 
83
  tmpy = selfspawny
 
84
  ClearWaypoints
 
85
  AddWaypoint
 
86
IfStateIs1              //Or in combat
 
87
  tmpargument = 1
 
88
SetTargetToSelf
 
89
IfTargetIsAlive         //and when killed
 
90
  GetState              //DoNothing
 
91
Else            
 
92
  tmpargument = 2
 
93
SetTargetToOldTarget
 
94
ChangeArmor             //Do it
 
95
 
 
96
//---------------------------------------------------------------------------------
 
97
//Return to watch mode
 
98
IfStateIs1                              //Only if already in combat
 
99
  IfTargetKilled                                
 
100
    SetTargetToNearestEnemy
 
101
      tmpargument = 1
 
102
      SetState                  //Combat
 
103
    Else
 
104
      tmpargument = 0                   //Watch mode
 
105
      SetState                           
 
106
 
 
107
 
 
108
//---------------------------------------------------------------------------------
 
109
//How to react if bumped
 
110
IfBumped                                // Attack whoever it bumped
 
111
  SetTargetToWhoeverBumped                
 
112
  IfTargetIsOnHatedTeam                   // Make sure it's an enemy
 
113
    tmpargument = 3
 
114
    IfStateIsNot                          //Dont if backstabbed
 
115
      tmpargument = 1                     //Enter combat mode
 
116
      SetState
 
117
      CallForHelp               //Warn others (Only if not backstabbed)
 
118
      tmpx = targetx            //Move away from melee
 
119
      tmpy = targety
 
120
      tmpdistance = 400
 
121
      tmpturn = targetturnto + 36000
 
122
      Compass
 
123
      ClearWaypoints
 
124
      AddWaypoint
 
125
  Else                                      //Move out of the way of friendlies
 
126
    tmpx = rand & 255 + targetx - 128       
 
127
    tmpy = rand & 255 + targety - 128       
 
128
    ClearWaypoints                          
 
129
    AddWaypoint                             
 
130
    SetTargetToOldTarget                    
 
131
 
 
132
//---------------------------------------------------------------------------------
 
133
//How to react if attacked
 
134
IfAttacked
 
135
  SetTargetToWhoeverAttacked
 
136
 
 
137
  //Backstab?
 
138
  IfStateIs0                            //Hasn't seen a enemy yet
 
139
    IfHitFromBehind
 
140
      tmpargument = [DISA]              //Is it a rouge?
 
141
      IfTargetHasSkillID                
 
142
        SetTargetToSelf
 
143
        KillTarget                      //Yep, instant kill
 
144
        SetTargetToWhoeverAttacked
 
145
        tmpargument = 25
 
146
        tmpdistance = EXPMURDER
 
147
        GiveExperienceToTarget          //Give some bonus xp
 
148
        tmpargument = 3
 
149
        SetState                        //Backstabs are undetected
 
150
        SetContent                      //For death message
 
151
        tmpargument = 1
 
152
        SendMessageNear               
 
153
 
 
154
  IfTargetIsOnHatedTeam
 
155
    tmpargument = 3                     //Backstabbed?
 
156
    IfStateIsNot                    
 
157
      tmpargument = 1                   //Nope, enter combat mode
 
158
      SetState          
 
159
      CallForHelp               //Warn others (Only if not backstabbed)               
 
160
  Else                              
 
161
    SetTargetToOldTarget
 
162
 
 
163
  tmpargument = rand % 3                  //Play damaged sound
 
164
  tmpdistance = rand & 4095 + 8000        
 
165
  PlaySound
 
166
 
 
167
 
 
168
//---------------------------------------------------------------------------------
 
169
//What to do if killed
 
170
IfKilled        
 
171
  //Messaging   
 
172
  tmpargument = 3       //Backstabbed?
 
173
  IfContentIs
 
174
    tmpargument = 1
 
175
  Else
 
176
    tmpargument = 0     //Normal death
 
177
 
 
178
  SendMessageNear                           
 
179
 
 
180
  //Make the body
 
181
  tmpargument = 33                        
 
182
  SetBumpSize                     
 
183
  tmpargument = 50  
 
184
  SetBumpHeight                                                   
 
185
 
 
186
  tmpargument = 7
 
187
  SetShadowSize
 
188
 
 
189
  //Drop stash
 
190
  tmpargument = 65535                     
 
191
  DropMoney     
 
192
  DropKeys
 
193
 
 
194
  //Death sound
 
195
  tmpargument = 1                         
 
196
  tmpdistance = rand & 2047 + 10000       
 
197
  PlaySound
 
198
 
 
199
  //Death stuff
 
200
  tmpargument = 0
 
201
  SetFlyHeight
 
202
  tmpargument = 10
 
203
  SetShadowSize
 
204
  KeepAction
 
205
 
 
206
 
 
207
//---------------------------------------------------------------------------------
 
208
End                                     // Finished with this character
 
209
//---------------------------------------------------------------------------------
 
 
b'\\ No newline at end of file'