Jump to content

Photo

Magic Pieces


  • Please log in to reply
2 replies to this topic

#1 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

Posted 26 September 2009 - 03:31 PM

In Exploration(here we go again!) there is 1 heart container, one magic container in each dungeon, two heart pieces, and two magic pieces in contiguous set of chambers in each dungeon(Example, there are 5 seperated parts of the Pillar dungeon, so there would be 10 heart and magic containers in the Pillar Dungeon).

I need a script that I can use for Magic Pieces. It could be built to allow any number of magic pieces in all, but I only need it to make one full magic container after two pieces. It doesn't need to display the containers, but it'd be prefered if it does.

#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 26 September 2009 - 08:05 PM


I think this is what you're after.
CODE

const int MAX_MAGIC_CONT_PER_FULL = 2;
const int MAGIC_INCREASE_ON_LVUP = 32;
int cur_magic_peices = 0;


item script MagicPickup
{
    void run()
    {
        cur_magic_peices ++;
        if (cur_magic_peices >= MAX_MAGIC_CONT_PER_FULL)
        {
            cur_magic_peices =0;
            Link->MaxMP += MAGIC_INCREASE_ON_LVUP;
        }
    }
}


Graphics are your responsibility. icon_wink.gif Also if you want to display a message upon magic up, you can track the variable cur_mag_peices in a global script and innsert Screen->Message somewhere afterwards.

#3 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

Posted 26 September 2009 - 09:49 PM

Alrighty, thanks dude!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users