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

« back to all changes in this revision

Viewing changes to modules/wizard.mod/objects/trigdoor.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
// Make it stay open or close
 
2
IfSpawned
 
3
  KeepAction
 
4
  tmpargument = passage
 
5
  ClosePassage
 
6
 
 
7
 
 
8
//Open door and close it
 
9
IfTimeOut
 
10
  KeepAction
 
11
  tmpargument = 10
 
12
  SetTime
 
13
  tmpargument = passage + 2
 
14
  SetTargetToWhoeverIsInPassage
 
15
    IfTargetCanOpenStuff        //Only open for intelligent creatures
 
16
      tmpargument = 0
 
17
      IfContentIs               //Only open unlocked doors
 
18
        tmpargument = passage
 
19
        OpenPassage
 
20
      Else
 
21
        IfTargetIsAPlayer
 
22
          tmpargument = passage + 2
 
23
          tmpdistance = [KEYA]
 
24
          SetTargetToPassageID
 
25
            tmpargument = [KEYA]
 
26
            CostTargetItemID
 
27
              tmpargument = 0
 
28
              SendMessageNear
 
29
              tmpargument = passage
 
30
              OpenPassage
 
31
              tmpargument = passage + 2
 
32
              SetTargetToWhoeverIsInPassage
 
33
              tmpargument = 10
 
34
              tmpdistance = EXPSECRET
 
35
              GiveExperienceToTarget
 
36
          Else
 
37
            tmpargument = 1
 
38
            SendMessageNear
 
39
            tmpargument = 300
 
40
            SetTime
 
41
  Else
 
42
    tmpargument = 0
 
43
    IfContentIs                 //Only close unlocked doors
 
44
      tmpargument = passage
 
45
      ClosePassage
 
46
 
 
47
                
 
48
 
 
49
IfOrdered
 
50
  tmpx = selforder
 
51
  tmpy = 491  // The unique code for an unlock order
 
52
  IfXIsEqualToY
 
53
    tmpargument = 3
 
54
    SendMessageNear
 
55
 
 
56
 
 
57
 
 
58
// Handle the animation and sound
 
59
tmpargument = passage   // Is the passage clear?
 
60
IfPassageOpen                   // 
 
61
  tmpargument = 0                 //
 
62
  IfStateIs                       // State 0 ( Closed )
 
63
    tmpargument = ACTIONMG          //
 
64
    DoAction                        //
 
65
      tmpargument = 1                 // Open it
 
66
      SetState                        //
 
67
      tmpargument = 0                 //
 
68
      tmpdistance = 11025             //
 
69
      PlaySound                       //
 
70
Else
 
71
  tmpargument = 1                 //
 
72
  IfStateIs                       // State 1 ( Open )
 
73
    tmpargument = ACTIONMJ          //
 
74
    DoAction                        //
 
75
      tmpargument = 0                 // Close it
 
76
      SetState                        //
 
77
      tmpargument = 1                 //
 
78
      tmpdistance = 11025             //
 
79
      PlaySound                       //
 
80
End                             // Finished with this character