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

« back to all changes in this revision

Viewing changes to modules/rogue.mod/objects/pstiletto.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
// ZZ> This function makes an item fall to the floor when spawned
 
2
 
 
3
//Show its poisoned if its identified
 
4
IfNameIsKnown
 
5
  tmpargument = 0       //Is it not changed already?
 
6
  IfArmorIs
 
7
    tmpargument = 1     //Then show poison icon
 
8
    ChangeArmor
 
9
 
 
10
IfSpawned                               //
 
11
  tmpargument = ACTIONJB                  //
 
12
  DoAction                                //
 
13
  KeepAction                              //
 
14
  MakeCrushValid
 
15
IfCrushed
 
16
  tmpx = selfx
 
17
  tmpy = selfy
 
18
  tmpdistance = selfz
 
19
  tmpargument = 1
 
20
  SpawnExactParticle
 
21
  SpawnExactParticle
 
22
  SpawnExactParticle
 
23
  SpawnExactParticle
 
24
  GoPoof
 
25
  tmpargument = 1
 
26
  SendMessageNear
 
27
IfDropped                               // Make it lie on floor
 
28
  KeepAction                              //
 
29
IfGrabbed                               // Tell them what they've won...
 
30
  SetTargetToWhoeverIsHolding             //
 
31
  IfTargetIsAPlayer                       //
 
32
    tmpargument = 0                       //
 
33
    SendMessageNear                       //
 
34
IfHitGround                             // Make a sound
 
35
  tmpargument = 1                         //
 
36
  PlaySound                               //
 
37
IfNotDropped
 
38
  tmpargument = 2
 
39
  SendMessageNear
 
40
IfTakenOut
 
41
  tmpargument = 2
 
42
  PlaySound
 
43
  SetTargetToWhoeverIsHolding
 
44
  IfTargetIsAPlayer
 
45
    tmpargument = 4
 
46
    SendMessageNear
 
47
IfNotPutAway
 
48
  tmpargument = 3
 
49
  SendMessageNear
 
50
 
 
51
//Check if user poisoned himself
 
52
IfUsed
 
53
  SetTargetToWhoeverIsHolding
 
54
  tmpargument = [POIS]
 
55
  IfTargetHasSkillID            //Does it have poison use skill?
 
56
      MakeNameKnown             //Tell the players its poisoned
 
57
  Else
 
58
    tmpx = rand & 2816 + 1024   //Wisdom determines the chance, 15 is never and 4 is almost always
 
59
    tmpy = rand & 500 + targetwis       //Randomness to decrease chance
 
60
    IfXIsMoreThanY
 
61
      SetOwnerToTarget
 
62
      EnchantTarget             //Give the character some poison damage
 
63
      tmpargument = 5
 
64
      SendMessageNear           //Tell them what happened
 
65
      DetachFromHolder          //Drop the weapon
 
66
      MakeNameKnown             //Tell the players its poisoned
 
67
 
 
68
//Paladins dont use poisoned weapons
 
69
IfGrabbed
 
70
  SetTargetToWhoeverIsHolding
 
71
  tmpargument = [PALA]
 
72
  IfTargetHasID
 
73
    DetachFromHolder
 
74
    tmpargument = 6             //I refuse to hold this!
 
75
    SendMessageNear
 
76
    MakeNameKnown               //Its poisoned, yes
 
77
 
 
78
End                                     // All done