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

« back to all changes in this revision

Viewing changes to modules/bishopiacity.mod/objects/holybolt.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 = [HMAG]
 
30
  IfTargetHasSkillID                            //Need divine spell skill
 
31
    GetContent
 
32
    tmpx = tmpargument
 
33
    tmpy = 512                                  //Don't overcharge
 
34
    IfXIsLessThanY
 
35
      tmpy = targetmanaflow                     //Enough spell power?
 
36
      IfYIsMoreThanX
 
37
        tmpargument = 14                                //Mana cost
 
38
        CostTargetMana
 
39
          GetContent                            //Increase the charge
 
40
          tmpargument = tmpargument + 8         //Casting Time
 
41
          SetContent
 
42
 
 
43
Else
 
44
  GetContent
 
45
  tmpx = tmpargument
 
46
  tmpy = 1000
 
47
  IfXIsMoreThanY                //Enough power to activate?
 
48
    tmpargument = 2
 
49
    tmpx = selfx
 
50
    tmpy = selfy
 
51
    tmpdistance = selfz
 
52
    SpawnExactParticle
 
53
    tmpargument = 0             //Set cooldown time
 
54
    SetReloadTime
 
55
    tmpargument = 3
 
56
    SendMessageNear             //Tell what happened
 
57
  Else                          
 
58
    GetContent
 
59
    tmpx = tmpargument
 
60
    tmpy = 0
 
61
    IfXIsMoreThanY              //Only if there was a charge
 
62
      tmpargument = 1
 
63
      SendMessageNear           //Tell it didn't work
 
64
  tmpargument = 0
 
65
  SetContent                    //Reset counter
 
66
 
 
67
// Put the little mana ball on the
 
68
// character's hand
 
69
GetContent
 
70
tmpx = tmpargument
 
71
tmpy = 0
 
72
IfXIsMoreThanY
 
73
  tmpturn = tmpargument < 4 + 3000
 
74
  tmpdistance = SPAWNORIGIN
 
75
  tmpargument = 0
 
76
  SpawnAttachedSizedParticle
 
77
 
 
78
End                                     // All done