User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: [Request] Custom potions

  1. #11
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: [Request] Custom potions

    Well, if the magic jar item refils gradually you could just spawn a magic jar on top of Link when he drinks a potion. I can't remember though.

  2. #12
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.96%

    Re: [Request] Custom potions

    Wait, why does it need to be that complicated? Couldn't you just make it like:

    import "std.zh"

    //This script, when attached to an item, works as a magic potion.
    //It refills Link's magic, but disappears after one use.
    //A simple script, but useful.
    //Set D0 to be the ID of the item.

    item script MagicPotion{

    void run (int id){

    Link->MP+=128;
    Link->Item[id] = false;

    }

    }
    Wouldn't that work and be less complicated than your script?
    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?


  3. #13
    Octorok CaRmAgE's Avatar
    Join Date
    Oct 2008
    Location
    Historia
    Age
    35
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,335
    Level
    12
    vBActivity - Bars
    Lv. Percent
    42.82%

    Re: [Request] Custom potions

    Yes, but good programming habits say to make your code as general as possible, so it can be re-used.

    Speaking of which, can't this be done w/o scripting (using the item editor)?

  4. #14
    Lynel
    Join Date
    Jul 2005
    Posts
    1,726
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    4,605
    Level
    21
    vBActivity - Bars
    Lv. Percent
    37.84%

    Re: [Request] Custom potions

    Quote Originally Posted by CaRmAgE View Post
    Speaking of which, can't this be done w/o scripting (using the item editor)?
    I don't think so, beause there's only one potion class. You have to use a custom item class to make a seperate potion, and custom classes aren't exactly customisable [without scripting].

  5. #15
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: [Request] Custom potions

    Yes, but my script works for both types of potion, and you can choose how much it'll refill.

    Your script will also fill Link's MP over the max, which is never very good.
    You don't really need the line to remove the item either, as there's an option in the item editor which does that.

  6. #16
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.96%

    Re: [Request] Custom potions

    Scripts can set Link's MP high than his max MP? Just goes to show how much I know about scripting.
    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?


  7. #17
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    32
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,303
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.73%

    Re: [Request] Custom potions

    Yeah, that's what the 'if(Link->MP > Link->MaxMP) Link->MP = Link->MaxMP;' line is for.

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