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

« back to all changes in this revision

Viewing changes to modules/palsand.mod/objects/book.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
 
  DisaffirmCharacter                      //
7
 
IfStateIs1                              // Spellbook burning?
8
 
  IfTimeOut                               // All burned up?
9
 
    tmpargument = 0                         //
10
 
    IfContentIs                             // Blank?
11
 
      // Blank burn message
12
 
      tmpargument = 5
13
 
    Else                                    // Spell?
14
 
      // Find the nearest book-burner
15
 
      tmpargument = [HEAL]
16
 
      tmpdistance = 6  // Friends and Enemies...
17
 
      SetTargetToNearestBlahID
18
 
        // Give Experience
19
 
        tmpargument = 25
20
 
        tmpdistance = EXPROLEPLAY
21
 
        GiveExperienceToTarget
22
 
        // Approval message
23
 
        tmpargument =  7
24
 
      Else
25
 
        // Spell burn message
26
 
        tmpargument = 1                       //
27
 
    SendMessageNear                         //
28
 
    UndoEnchant                             //
29
 
    GoPoof                                  //
30
 
 
31
 
 
32
 
 
33
 
 
34
 
 
35
 
    tmpargument = 0                         // FIX FOR NETWORK
36
 
    SetState                                // FIX FOR NETWORK
37
 
Else                                    // It's not burning...
38
 
  IfReaffirmed                            // Catch on fire?
39
 
    DetachFromHolder                        //
40
 
    tmpargument = 1                         //
41
 
    SetState                                //
42
 
    tmpargument = 75                        // Set death time
43
 
    SetTime                                 //
44
 
    tmpargument = ACTIONKD                  //
45
 
    DoActionOverride                        //
46
 
    KeepAction                              //
47
 
IfInWater                               // Make the spellbook go blank
48
 
  tmpargument = 0                         // Is it blank?
49
 
  IfContentIs                             // Yes
50
 
    tmpargument = 0                         //
51
 
  Else                                    // No, so make it blank
52
 
    SetContent                              //
53
 
    tmpargument = 3                         //
54
 
    SendMessageNear                         //
55
 
    MakeUsageKnown                          //
56
 
IfGrabbed                               // Change into a spell
57
 
  SetTargetToWhoeverIsHolding             //
58
 
  IfTargetIsAPlayer                       //
59
 
    tmpx = 0                              //
60
 
    tmpargument = 0                       //
61
 
    IfContentIs                           // Saved a blank one
62
 
      tmpx = 4                              //
63
 
    tmpargument = selfstate < 1 + tmpx    //
64
 
    SendMessageNear                       //
65
 
    tmpargument = 0                         //
66
 
    SetState                                //
67
 
  tmpargument = 0                         //
68
 
  IfContentIs                             // Is it soggy?
69
 
    tmpargument = 0                         // NOP
70
 
  Else                                    // No, so memorize the spell
71
 
    BecomeSpell                             //
72
 
IfHitGround                             // Make a sound
73
 
  tmpargument = 0                         //
74
 
  tmpdistance = rand & 2047 + 10000       //
75
 
  PlaySound                               //
76
 
End                                     // All done
 
1
// ZZ> This function makes an item fall to the floor when spawned
 
2
IfSpawned                               //
 
3
  tmpargument = ACTIONJB                  //
 
4
  DoAction                                //
 
5
  KeepAction                              //
 
6
  DisaffirmCharacter                      //
 
7
IfStateIs1                              // Spellbook burning?
 
8
  IfTimeOut                               // All burned up?
 
9
    tmpargument = 0                         //
 
10
    IfContentIs                             // Blank?
 
11
      // Blank burn message
 
12
      tmpargument = 5
 
13
    Else                                    // Spell?
 
14
      // Find the nearest book-burner
 
15
      tmpargument = [HEAL]
 
16
      tmpdistance = 6  // Friends and Enemies...
 
17
      SetTargetToNearestBlahID
 
18
        // Give Experience
 
19
        tmpargument = 25
 
20
        tmpdistance = EXPROLEPLAY
 
21
        GiveExperienceToTarget
 
22
        // Approval message
 
23
        tmpargument =  7
 
24
      Else
 
25
        // Spell burn message
 
26
        tmpargument = 1                       //
 
27
    SendMessageNear                         //
 
28
    UndoEnchant                             //
 
29
    GoPoof                                  //
 
30
 
 
31
 
 
32
 
 
33
 
 
34
 
 
35
    tmpargument = 0                         // FIX FOR NETWORK
 
36
    SetState                                // FIX FOR NETWORK
 
37
Else                                    // It's not burning...
 
38
  IfReaffirmed                            // Catch on fire?
 
39
    DetachFromHolder                        //
 
40
    tmpargument = 1                         //
 
41
    SetState                                //
 
42
    tmpargument = 75                        // Set death time
 
43
    SetTime                                 //
 
44
    tmpargument = ACTIONKD                  //
 
45
    DoActionOverride                        //
 
46
    KeepAction                              //
 
47
IfInWater                               // Make the spellbook go blank
 
48
  tmpargument = 0                         // Is it blank?
 
49
  IfContentIs                             // Yes
 
50
    tmpargument = 0                         //
 
51
  Else                                    // No, so make it blank
 
52
    SetContent                              //
 
53
    tmpargument = 3                         //
 
54
    SendMessageNear                         //
 
55
    MakeUsageKnown                          //
 
56
IfGrabbed                               // Change into a spell
 
57
  SetTargetToWhoeverIsHolding             //
 
58
  IfTargetIsAPlayer                       //
 
59
    tmpx = 0                              //
 
60
    tmpargument = 0                       //
 
61
    IfContentIs                           // Saved a blank one
 
62
      tmpx = 4                              //
 
63
    tmpargument = selfstate < 1 + tmpx    //
 
64
    SendMessageNear                       //
 
65
    tmpargument = 0                         //
 
66
    SetState                                //
 
67
  tmpargument = 0                         //
 
68
  IfContentIs                             // Is it soggy?
 
69
    tmpargument = 0                         // NOP
 
70
  Else                                    // No, so memorize the spell
 
71
    BecomeSpell                             //
 
72
IfHitGround                             // Make a sound
 
73
  tmpargument = 0                         //
 
74
  tmpdistance = rand & 2047 + 10000       //
 
75
  PlaySound                               //
 
76
End                                     // All done