Jump to content

Photo

[Global] Ammo bugfix


  • Please log in to reply
5 replies to this topic

#1 MoscowModder

MoscowModder

    Run for your life.

  • Script DB Staff
  • Gender:Male
  • Location:Not where you'd think

Posted 17 September 2011 - 02:22 PM

Ever been annoyed that the fact that picking up bomb ammo doesn't give you bombs? With this script it does! It can also give you the lvl-1arrow when you have arrows, and take away either when you run out of their ammo. Note that all but the bomb ammo fix are commented out.

CODE
global script Active{

    void run(){
        while(true){
            if(Game->Counter[CR_BOMBS]>0 && !Link->Item[I_BOMB])
                Link->Item[I_BOMB]=true;
            //if(Game->Counter[CR_ARROWS]>0 && !Link->Item[I_ARROW1])
                //Link->Item[I_ARROW1]=true;
        }
    }
}

Edited by MoscowModder, 30 December 2012 - 04:43 PM.


#2 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 18 September 2011 - 12:06 PM

I don't know which bug you man. Every time, when I pick up a bombammo, I get the bombs. I'm confused... :S

#3 MoscowModder

MoscowModder

    Run for your life.

  • Script DB Staff
  • Gender:Male
  • Location:Not where you'd think

Posted 18 September 2011 - 01:26 PM

If you don't have the bomb item but you pick up bomb ammo, your counter goes up but you don't get the bomb item.

#4 Lord Settra!

Lord Settra!

    Apprentice

  • Members
  • Real Name:Raphael
  • Gender:Male

Posted 22 September 2011 - 12:55 PM

Ah, ok. icon_smile.gif
But I changed every "bomb-item" in the item-drop-sets to "bomb-ammo", so I think, I won't need it. But it's a good idea. ^^

#5 MoscowModder

MoscowModder

    Run for your life.

  • Script DB Staff
  • Gender:Male
  • Location:Not where you'd think

Posted 22 September 2011 - 01:04 PM

Do you mean the reverse? Only the "bomb" item puts bombs in your inventory, while "bomb ammo" items only increase your counter.

#6 MoscowModder

MoscowModder

    Run for your life.

  • Script DB Staff
  • Gender:Male
  • Location:Not where you'd think

Posted 10 January 2012 - 11:26 PM

I feel like a total idiot for missing this, but I after months of leaving it disabled and ignoring it, I finally got it to work properly. I forgot to add the "Game->Counter[]" part, specifying that the variables were in fact parts of arrays.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users