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

« back to all changes in this revision

Viewing changes to modules/wizard.mod/objects/redstone.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
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
 
 
20
//Maybe the character identifies the gem?
 
21
IfUsed
 
22
  IfStateIs0
 
23
      //Intelligence checks show if others find it out
 
24
      tmpx = targetint
 
25
      tmpy = rand & 2500 + 2750
 
26
      IfXIsMoreThanY
 
27
        // Character identifies the gem
 
28
        tmpargument = 2
 
29
        SendMessageNear
 
30
        MakeNameKnown
 
31
        tmpargument = 10
 
32
        tmpdistance = EXPSECRET
 
33
        GiveExperienceToTarget
 
34
        tmpargument = 2
 
35
        SetState
 
36
        tmpargument = 100
 
37
        SetTime
 
38
      Else
 
39
        tmpargument = 6
 
40
        SendMessageNear
 
41
        tmpargument = 4
 
42
        SetState
 
43
        tmpargument = 100
 
44
        SetTime            
 
45
        
 
46
//This is a ingredient
 
47
  IfStateIs1
 
48
    tmpargument = 5
 
49
    SendMessageNear
 
50
    tmpargument = 3
 
51
    SetState
 
52
    tmpargument = 100
 
53
    SetTime
 
54
 
 
55
IfTimeOut
 
56
  IfStateIs2
 
57
    tmpargument = 1
 
58
    SetState
 
59
 
 
60
  IfStateIs3
 
61
    tmpargument = 1
 
62
    SetState
 
63
 
 
64
  IfStateIs4
 
65
    tmpargument = 0
 
66
    SetState
 
67
 
 
68
 
 
69
End                                     // All done