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

« back to all changes in this revision

Viewing changes to modules/abyss1.mod/objects/lpotion.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
// Set up general stuff
 
2
IfSpawned
 
3
  tmpargument = ACTIONJB
 
4
  DoAction
 
5
  KeepAction
 
6
  MakeCrushValid
 
7
  MakeAmmoKnown
 
8
 
 
9
 
 
10
 
 
11
// Make it poof
 
12
IfCrushed
 
13
  tmpx = selfx
 
14
  tmpy = selfy
 
15
  tmpdistance = selfz
 
16
  tmpargument = 0
 
17
  SpawnExactParticle
 
18
  SpawnExactParticle
 
19
  SpawnExactParticle
 
20
  SpawnExactParticle
 
21
  GoPoof
 
22
  tmpargument = 1
 
23
  SendMessageNear
 
24
 
 
25
 
 
26
 
 
27
// Make it lie on the floor
 
28
IfDropped
 
29
  KeepAction
 
30
 
 
31
 
 
32
 
 
33
// Play a clink or clang
 
34
IfHitGround
 
35
  tmpargument = 0
 
36
  PlaySound
 
37
 
 
38
 
 
39
// Alert others to draw
 
40
IfTakenOut
 
41
  SetTargetToWhoeverIsHolding
 
42
  IfTargetIsAPlayer
 
43
    tmpargument = 2
 
44
    SendMessageNear
 
45
 
 
46
 
 
47
 
 
48
// Tell them what they've won...
 
49
IfGrabbed
 
50
  SetTargetToWhoeverIsHolding
 
51
  IfTargetIsAPlayer
 
52
    tmpargument = 0
 
53
    SendMessageNear
 
54
 
 
55
 
 
56
 
 
57
// Give the user a bonus, but it's addictive...
 
58
IfUsed
 
59
  tmpargument = 40
 
60
  SetReloadTime
 
61
  MakeSimilarNamesKnown
 
62
  IfUsageIsKnown
 
63
    IfTargetIsHurt
 
64
      tmpargument = 1           //Make them drink it
 
65
      SetState
 
66
      tmpargument = 3
 
67
    Else
 
68
      tmpargument = 6
 
69
    SendMessageNear
 
70
  Else                  //They don't know what it was
 
71
    MakeUsageKnown
 
72
    tmpargument = 4
 
73
    IfTargetIsAPlayer
 
74
      tmpargument = 5
 
75
    SendMessageNear
 
76
    tmpargument = 40
 
77
    tmpdistance = EXPDARE
 
78
    GiveExperienceToTarget
 
79
    tmpargument = 1             //Make them drink it
 
80
    SetState
 
81
 
 
82
  //This proceeds if the player drank the potion
 
83
  IfStateIs1
 
84
    tmpargument = 1
 
85
    PlaySound
 
86
    tmpargument = 0 - 32                      // Decrease max life a little
 
87
    GiveLifeToTarget
 
88
    
 
89
    // Increase current life
 
90
    tmpargument = rand & 2047 + 2048    //Amount of life healed
 
91
    HealTarget
 
92
    tmpargument = ACTIONMC              //Drink animation
 
93
    TargetDoAction
 
94
    tmpdistance = SPAWNORIGIN
 
95
    tmpargument = 1
 
96
    SpawnAttachedHolderParticle
 
97
  Else                          //This makes them drop it if not set to use
 
98
    tmpx = selfx        //Where to spawn the object
 
99
    tmpy = selfy
 
100
    tmpturn = selfturn
 
101
    tmpdistance = 0     //Velocity speed of the spawned object
 
102
    SpawnCharacter      //Spawn a copy of the flask
 
103
      tmpargument = 1
 
104
      SetChildAmmo
 
105
 
 
106
  //Use one "charge"
 
107
  CostAmmo
 
108
  IfAmmoOut
 
109
    GoPoof
 
110
 
 
111
  tmpargument = 0
 
112
  SetState                              //Reset for next use
 
113
 
 
114
// Finish up
 
115
End