User Tag List

Results 1 to 6 of 6

Thread: Help with a simple script

  1. #1
    Wizrobe
    Join Date
    Dec 2006
    Age
    30
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,954
    Level
    28
    vBActivity - Bars
    Lv. Percent
    45.51%

    Help with a simple script

    I'm just trying to make a script that gives Link some items and takes some away when he enters the screen. But the script doesn't work. It compiles fine, but nothing happens. Here's the script:
    Code:
    ffc script item{
         void run() {
              Link->Item[17] = true;
              Link->Item[18] = false;
              Link->Item[91] = false;
              Link->Item[143] = true;
         }
    }
    What am I doing wrong?
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  2. #2
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.16%

    Re: Help with a simple script

    Are those valid items? I strongly suggest you use the constants in std.zh for existing items, and make your own for new ones.

    Other than that, the obvious questions:
    - is the FFC assigned the correct script?
    - does the FFC have a combo greater than 0? (0 == disabled)
    - is it at a position greater than (-32, -32)?
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  3. #3
    Wizrobe
    Join Date
    Dec 2006
    Age
    30
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,954
    Level
    28
    vBActivity - Bars
    Lv. Percent
    45.51%

    Re: Help with a simple script

    Yes to all the questions. The Item IDs were taken from the item editor.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  4. #4
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.16%

    Re: Help with a simple script

    Oh, I just tried compiling this, and I see the problem: It's not compiling, and you're missing the error.

    Quote Originally Posted by ZQuest
    Pass 1: Parsing
    Pass 2: Preprocessing
    line 1: syntax error, unexpected ITEM, expecting IDENTIFIER, on token item
    tmp, line 1: Error P01 : Failure to parse imported file test.z.
    Change the name of the script from "item" to something that isn't reserved (such as "giveitem")
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  5. #5
    Wizrobe
    Join Date
    Dec 2006
    Age
    30
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,954
    Level
    28
    vBActivity - Bars
    Lv. Percent
    45.51%

    Re: Help with a simple script

    That's not the name of it in the quest. I just changed it since it's name is a quest spoiler.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  6. #6
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.16%

    Re: Help with a simple script

    Ok then...

    Well, my original suggestion was to do this:

    Code:
    ffc script smurf{
         void run() {
              if(Link->Item[17]) Trace(1); else Trace(0);
              Link->Item[17] = true;
              if(Link->Item[17]) Trace(1); else Trace(0);
              Link->Item[18] = false;
              Link->Item[91] = false;
              Link->Item[143] = true;
         }
    }
    Go into the room, leave it, then go back in. Then, check allegro.log. You should see a few lines that should look like this, if the script is working:

    Quote Originally Posted by allegro.log
    0
    1
    1
    1
    If it isn't, it'll be either four zeroes, or more likely, nothing.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social