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

« back to all changes in this revision

Viewing changes to modules/bishopiacity.mod/objects/frostward.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
//This function makes an item fall to the floor when spawned
 
2
IfSpawned
 
3
  tmpargument = ACTIONJB
 
4
  DoAction
 
5
  KeepAction
 
6
IfDropped                               // Make it lie on floor
 
7
  KeepAction
 
8
IfGrabbed                               // Tell them what they've won, Johnny!
 
9
  SetTargetToWhoeverIsHolding
 
10
  IfTargetIsAPlayer
 
11
    tmpargument = 0
 
12
    SendMessageNear
 
13
IfHitGround
 
14
  tmpargument = 0
 
15
  tmpdistance = rand & 2047 + 8000
 
16
  PlaySound
 
17
  tmpargument = ACTIONDB
 
18
  DoAction
 
19
IfHeld                  //Hide in hand
 
20
  tmpargument = 1
 
21
  SetState
 
22
Else
 
23
  tmpargument = 0
 
24
  SetState
 
25
 
 
26
//Spell stuff
 
27
IfUsed
 
28
  SetTargetToWhoeverIsHolding
 
29
  tmpargument = [GOOD]
 
30
  IfTargetHasSpecialID                          //Need divine spell skill
 
31
    GetContent
 
32
    tmpx = tmpargument
 
33
    tmpy = 768                                  //Don't overcharge
 
34
    IfXIsLessThanY
 
35
      tmpy = targetmanaflow                     //Enough spell power?
 
36
      IfYIsMoreThanX
 
37
        tmpargument = 8                         //Mana cost
 
38
        CostTargetMana
 
39
          GetContent                            //Increase the charge
 
40
          tmpargument = tmpargument + 8         //Casting Time
 
41
          SetContent
 
42
        
 
43
    // Spawn particles around target
 
44
    SetTargetToNearestFriend
 
45
    tmpx = targetdistance
 
46
    tmpy = 375
 
47
    IfXIsMoreThanY                      //No target in range, select caster
 
48
      SetTargetToWhoeverIsHolding
 
49
    tmpx = targetx
 
50
    tmpy = targety
 
51
    tmpdistance = targetz
 
52
    tmpargument = 1
 
53
    SpawnExactParticle
 
54
    tmpargument = RED                   //Icon sparkles
 
55
    SparkleIcon
 
56
 
 
57
Else
 
58
  GetContent
 
59
  tmpx = tmpargument
 
60
  tmpy = 750
 
61
  IfXIsMoreThanY                //Enough power to activate?
 
62
    tmpx = targetx
 
63
    tmpy = targety
 
64
    tmpdistance = targetz
 
65
    tmpargument = 2
 
66
    SpawnExactParticle
 
67
    SetOldTarget                        //Remember the spell target
 
68
    SetTargetToWhoeverIsHolding
 
69
    SetOwnerToTarget                    //Make the caster sustain the spell
 
70
    SetTargetToOldTarget                //Retarget the spell target
 
71
    EnchantTarget               //Do the enchant
 
72
    tmpargument = 100           //Set cooldown time
 
73
    SetReloadTime
 
74
    tmpargument = 3
 
75
    SendMessageNear             //Tell what happened
 
76
    tmpargument = 1
 
77
    tmpdistance = rand & 6000 + 11000
 
78
    PlaySound
 
79
  Else                          
 
80
    GetContent
 
81
    tmpx = tmpargument
 
82
    tmpy = 0
 
83
    IfXIsMoreThanY              //Only if there was a charge
 
84
      tmpargument = 1
 
85
      SendMessageNear           //Tell it didn't work
 
86
      tmpargument = 2
 
87
      tmpdistance = rand & 6000 + 11000
 
88
      PlaySound
 
89
  tmpargument = 0
 
90
  SetContent                    //Reset counter
 
91
  UnsparkleIcon
 
92
 
 
93
  //Award xp and stuff for daring to do it
 
94
  IfNameIsKnown
 
95
    DoNothing
 
96
  Else
 
97
    tmpargument = 20
 
98
    tmpdistance = EXPDARE
 
99
    GiveExperienceToTarget
 
100
    MakeNameKnown
 
101
    MakeUsageKnown
 
102
 
 
103
// Put the little mana ball on the
 
104
// character's hand
 
105
GetContent
 
106
tmpx = tmpargument
 
107
tmpy = 0
 
108
IfXIsMoreThanY
 
109
  tmpturn = tmpargument < 4 + 3000
 
110
  tmpdistance = SPAWNORIGIN
 
111
  tmpargument = 0
 
112
  SpawnAttachedSizedParticle
 
113
 
 
114
End                                     // All done