Jump to content

Photo

Any Item besides Ball n Chain or Bombchu?


  • Please log in to reply
9 replies to this topic

#1 zeldafan3242

zeldafan3242

    Initiate

  • Members

Posted 09 January 2011 - 09:50 AM

I have been trying 36 different scripts for bombchus and ball n chains and they, don't, work.
Here is the list of items I already put in the subscreen:
  1. Bombs
  2. Bommerang
  3. Candle
  4. Bow & Arrow
  5. Hookshot
  6. Whistle
  7. Wand
  8. Super Bombs
  9. Roc's Feather
  10. Hammer
  11. Letter
  12. Potion
  13. Bait
  14. Cane of Byna
  15. Lens of Truth
  16. (Custom Item): Angel Charm
  17. ?
  18. Din's Fire
  19. Naryu's Love
  20. Farore's Wind
I need an Item to replace the ?.
Please Help me!

#2 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 09 January 2011 - 10:36 AM

The Bombchus and the Ball-and-Cain works fine in my quest. Why doesn't they work in yours? Maybe we can help you with those scripts.

You could try one of the other scripts of the pureZC-database. The Pegasusboots and Grenades also work fine.
Another good item (the magnetic gloves of oracle of Seasons) you find here:
http://zctut.com/magnagloves.php

If you don't like scripts, you can make two different swords/wands/bumerangs/whatever...
(for instance: one bumerang that flys like the wooden-bumerang, but make damage like the fire-bumerang and the orginal magic-bumerang)


Just because I'm interested: What is the Angel Charm?

#3 zeldafan3242

zeldafan3242

    Initiate

  • Members

Posted 09 January 2011 - 07:04 PM

QUOTE(Lord Settra! @ Jan 9 2011, 12:36 PM) View Post

Just because I'm interested: What is the Angel Charm?

An Angel Charm is a charm that works just like the clock pick-up item except it uses magic. That way the clock is still of use. If you want you can add it to your quest. I won't penalize you. icon_slycool.gif

Edited by zeldafan3242, 10 January 2011 - 08:37 PM.


#4 Isdrakthül

Isdrakthül

    Apprentice

  • Members

Posted 09 January 2011 - 07:12 PM

[shameless advertising]You could use my Dominion Rod script at http://www.purezc.co...showtopic=48072 [/shameless advertising] Admittedly, it's rather lame and doesn't do everything it should, but it's an option if you're truly desperate.

#5 zeldafan3242

zeldafan3242

    Initiate

  • Members

Posted 10 January 2011 - 08:48 PM

Thank you. I tried the magnetic gloves script but it won't work. Here it is:
CODE
import "std.zh"

bool magna_gloves_active = false;
bool magna_gloves_positive = false;

const int magna_flag = 98;
const int magna_positive = 144;


global script onstart {
  void run() {
    
    bool isSolid(int x, int y) {
    if(x<0 || x>255 || y<0 || y>175) return false;
    int mask=1111b;
      
    if(x % 16 < 8)
      mask &= 0011b;
    else
      mask &= 1100b;
    
    if(y % 16 < 8)
      mask &= 0101b;
    else
      mask &= 1010b;
    
    int ret = Screen->ComboS[ComboAt(x, y)] & mask;
    return (ret!=0);

    
    while(true) {
      
      if(magna_gloves_active) MagnaGlovesWork();
      
      Waitframe();
    }
  }
  
  void MagnaGlovesWork() {
    if(Link->InputB) {
      
      //Link->Action = LA_FROZEN;
      
      int lc = 0;
      bool yes = false;
      
      
      if(Link->Dir == DIR_LEFT) {
        for(int i = Floor(Link->X / 16)  - 1; i >= 0; i--) {
          lc = ComboAt(i * 16, Link->Y + 8);
          if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
            yes = true;
            break;
          }
        }
        if(yes) {
          Link->Z = 5;
          Link->Jump = 0;
          Link->Y = Floor((Link->Y + 8) / 16) * 16;
          KillLinkInput();
          if(magna_gloves_positive) {
            if(!isSolid(Link->X + 16, Link->Y)) {
              Link->X += 1;
            }
            if(!isSolid(Link->X + 16, Link->Y)) {
              Link->X += 1;
            }
          } else {
            if(!isSolid(Link->X - 1, Link->Y)) {
              Link->X -= 1;
            }
            if(!isSolid(Link->X - 1, Link->Y)) {
              Link->X -= 1;
            }
          }
        }
      } else if(Link->Dir == DIR_RIGHT) {
        for(int i = Floor(Link->X / 16) + 1; i <= 16; i++) {
          lc = ComboAt(i * 16, Link->Y + 8);
          
          if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
            yes = true;
            break;
          }
}
        if(yes) {
          Link->Z = 5;
          Link->Jump = 0;
          Link->Y = Floor((Link->Y + 8) / 16) * 16;
          KillLinkInput();
          if(magna_gloves_positive) {
            if(!isSolid(Link->X - 1, Link->Y)) {
              Link->X -= 1;
            }
            if(!isSolid(Link->X - 1, Link->Y)) {
              Link->X -= 1;
            }

          } else {
            if(!isSolid(Link->X + 16, Link->Y)) {
              Link->X += 1;
            }
            if(!isSolid(Link->X + 16, Link->Y)) {
              Link->X += 1;
            }
          }
          
        }
      } else if(Link->Dir == DIR_UP) {
        for(int i = Floor((Link->Y + 9) / 16) - 1; i >= 0; i--) {
          lc = ComboAt(Link->X + 8, i * 16);
          if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
            yes = true;
            break;
          }
        }
        if(yes) {
          Link->Z = 5;
          Link->Jump = 0;
          Link->X = Floor((Link->X + 8) / 16) * 16;
          KillLinkInput();
          if(!magna_gloves_positive) {
            if(!isSolid(Link->X, Link->Y - 1)) {
              Link->Y -= 1;
            }
            if(!isSolid(Link->X, Link->Y - 1)) {
              Link->Y -= 1;
            }
          } else {
            
            if(!isSolid(Link->X, Link->Y + 16)) {
              Link->Y += 1;
            }
            if(!isSolid(Link->X, Link->Y + 16)) {
              Link->Y += 1;
            }
          }
        }
      } else if(Link->Dir == DIR_DOWN) {
        for(int i = Floor(Link->Y / 16) + 1; i <= 16; i++) {
          lc = ComboAt(Link->X + 8, i * 16);
          
          if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
            yes = true;
            break;
          }
        }
        if(yes) {
          Link->Z = 5;
          Link->Jump = 0;
          Link->X = Floor((Link->X + 8) / 16) * 16;
          KillLinkInput();
          if(!magna_gloves_positive) {
            if(!isSolid(Link->X, Link->Y + 16)) {
              Link->Y += 1;
            }
            if(!isSolid(Link->X, Link->Y + 16)) {
              Link->Y += 1;
            }
          } else {
            if(!isSolid(Link->X, Link->Y - 1)) {
              Link->Y -= 1;
            }
            if(!isSolid(Link->X, Link->Y - 1)) {
              Link->Y -= 1;
            }
          }
          
        }
      }
      
      if(!yes) {
        int d = Link->Dir;
        //well, we're not attached to anything.
        //so, let's move around
        if(Link->InputUp) {
          Link->InputUp = false;
          if(!isSolid(Link->X, Link->Y - 1)) Link->Y -= 1;
        }
        if(Link->InputDown) {
          Link->InputDown = false;
          if(!isSolid(Link->X, Link->Y + 16)) Link->Y += 1;
        }
        if(Link->InputLeft) {
          Link->InputLeft = false;
          if(!isSolid(Link->X - 1, Link->Y)) Link->X -= 1;
        }
        if(Link->InputRight) {
          Link->InputRight = false;
          if(!isSolid(Link->X + 16, Link->Y)) Link->X += 1;
        }
        //Link->Dir = d;
      }
    } else {
      magna_gloves_active = false;
      magna_gloves_positive = !magna_gloves_positive;
      //Link->Action = LA_NONE;
      Link->Item[magna_positive] = !Link->Item[magna_positive];
    }
  }
  
  void KillLinkInput() {
    Link->InputUp = false;
    Link->InputDown = false;
    Link->InputLeft = false;
    Link->InputRight = false;
  }

}

I think there is somthing wrong with line 13 (Counting the spaces).

Edited by zeldafan3242, 10 January 2011 - 08:49 PM.


#6 MarioBrosCom

MarioBrosCom

    Adept

  • Members
  • Real Name:Stylianos
  • Location:Canada

Posted 10 January 2011 - 11:58 PM

It looks like the body of the run function has been deleted. It looked something like:

CODE
void run() {
    while (true) {
        if(magna_gloves_active) MagnaGlovesWork();
        Waitframe();
    }
}


ie, your working script should look like this:
CODE
import "std.zh"

bool magna_gloves_active = false;
bool magna_gloves_positive = false;

const int magna_flag = 98;
const int magna_positive = 144;


global script onstart {
    void run() {
        while (true) {
            if (magna_gloves_active) MagnaGlovesWork();
            Waitframe();
        }
    }
    
    bool isSolid(int x, int y) {
        if(x<0 || x>255 || y<0 || y>175) return false;
        int mask=1111b;
        
        if(x % 16 < 8)
        mask &= 0011b;
        else
        mask &= 1100b;
        
        if(y % 16 < 8)
        mask &= 0101b;
        else
        mask &= 1010b;
        
        int ret = Screen->ComboS[ComboAt(x, y)] & mask;
        return (ret!=0);
    }

    void MagnaGlovesWork() {
        if(Link->InputB) {
            
            //Link->Action = LA_FROZEN;
            
            int lc = 0;
            bool yes = false;
            
            
            if(Link->Dir == DIR_LEFT) {
                for(int i = Floor(Link->X / 16)  - 1; i >= 0; i--) {
                    lc = ComboAt(i * 16, Link->Y + 8);
                    if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
                        yes = true;
                        break;
                    }
                }
                if(yes) {
                    Link->Z = 5;
                    Link->Jump = 0;
                    Link->Y = Floor((Link->Y + 8) / 16) * 16;
                    KillLinkInput();
                    if(magna_gloves_positive) {
                        if(!isSolid(Link->X + 16, Link->Y)) {
                            Link->X += 1;
                        }
                        if(!isSolid(Link->X + 16, Link->Y)) {
                            Link->X += 1;
                        }
                    } else {
                        if(!isSolid(Link->X - 1, Link->Y)) {
                            Link->X -= 1;
                        }
                        if(!isSolid(Link->X - 1, Link->Y)) {
                            Link->X -= 1;
                        }
                    }
                }
            } else if(Link->Dir == DIR_RIGHT) {
                for(int i = Floor(Link->X / 16) + 1; i <= 16; i++) {
                    lc = ComboAt(i * 16, Link->Y + 8);
                    
                    if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
                        yes = true;
                        break;
                    }
                }
                if(yes) {
                    Link->Z = 5;
                    Link->Jump = 0;
                    Link->Y = Floor((Link->Y + 8) / 16) * 16;
                    KillLinkInput();
                    if(magna_gloves_positive) {
                        if(!isSolid(Link->X - 1, Link->Y)) {
                            Link->X -= 1;
                        }
                        if(!isSolid(Link->X - 1, Link->Y)) {
                            Link->X -= 1;
                        }

                    } else {
                        if(!isSolid(Link->X + 16, Link->Y)) {
                            Link->X += 1;
                        }
                        if(!isSolid(Link->X + 16, Link->Y)) {
                            Link->X += 1;
                        }
                    }
                    
                }
            } else if(Link->Dir == DIR_UP) {
                for(int i = Floor((Link->Y + 9) / 16) - 1; i >= 0; i--) {
                    lc = ComboAt(Link->X + 8, i * 16);
                    if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
                        yes = true;
                        break;
                    }
                }
                if(yes) {
                    Link->Z = 5;
                    Link->Jump = 0;
                    Link->X = Floor((Link->X + 8) / 16) * 16;
                    KillLinkInput();
                    if(!magna_gloves_positive) {
                        if(!isSolid(Link->X, Link->Y - 1)) {
                            Link->Y -= 1;
                        }
                        if(!isSolid(Link->X, Link->Y - 1)) {
                            Link->Y -= 1;
                        }
                    } else {
                        
                        if(!isSolid(Link->X, Link->Y + 16)) {
                            Link->Y += 1;
                        }
                        if(!isSolid(Link->X, Link->Y + 16)) {
                            Link->Y += 1;
                        }
                    }
                }
            } else if(Link->Dir == DIR_DOWN) {
                for(int i = Floor(Link->Y / 16) + 1; i <= 16; i++) {
                    lc = ComboAt(Link->X + 8, i * 16);
                    
                    if(Screen->ComboF[lc] == magna_flag || Screen->ComboI[lc] == magna_flag) {
                        yes = true;
                        break;
                    }
                }
                if(yes) {
                    Link->Z = 5;
                    Link->Jump = 0;
                    Link->X = Floor((Link->X + 8) / 16) * 16;
                    KillLinkInput();
                    if(!magna_gloves_positive) {
                        if(!isSolid(Link->X, Link->Y + 16)) {
                            Link->Y += 1;
                        }
                        if(!isSolid(Link->X, Link->Y + 16)) {
                            Link->Y += 1;
                        }
                    } else {
                        if(!isSolid(Link->X, Link->Y - 1)) {
                            Link->Y -= 1;
                        }
                        if(!isSolid(Link->X, Link->Y - 1)) {
                            Link->Y -= 1;
                        }
                    }
                    
                }
            }
            
            if(!yes) {
                int d = Link->Dir;
                //well, we're not attached to anything.
                //so, let's move around
                if(Link->InputUp) {
                    Link->InputUp = false;
                    if(!isSolid(Link->X, Link->Y - 1)) Link->Y -= 1;
                }
                if(Link->InputDown) {
                    Link->InputDown = false;
                    if(!isSolid(Link->X, Link->Y + 16)) Link->Y += 1;
                }
                if(Link->InputLeft) {
                    Link->InputLeft = false;
                    if(!isSolid(Link->X - 1, Link->Y)) Link->X -= 1;
                }
                if(Link->InputRight) {
                    Link->InputRight = false;
                    if(!isSolid(Link->X + 16, Link->Y)) Link->X += 1;
                }
                //Link->Dir = d;
            }
        } else {
            magna_gloves_active = false;
            magna_gloves_positive = !magna_gloves_positive;
            //Link->Action = LA_NONE;
            Link->Item[magna_positive] = !Link->Item[magna_positive];
        }
    }

    void KillLinkInput() {
        Link->InputUp = false;
        Link->InputDown = false;
        Link->InputLeft = false;
        Link->InputRight = false;
    }
}


Edit: Source->formatted for sanity.

Another edit because something seems to keep happening to my changes.

Edited by MarioBrosCom, 11 January 2011 - 06:50 PM.


#7 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 11 January 2011 - 05:43 PM

You can erease this part, because the function is already called in "std.zh":

QUOTE
bool isSolid(int x, int y) {
if(x<0 || x>255 || y<0 || y>175) return false;
int mask=1111b;

if(x % 16 < 8)
mask &= 0011b;
else
mask &= 1100b;

if(y % 16 < 8)
mask &= 0101b;
else
mask &= 1010b;

int ret = Screen->ComboS[ComboAt(x, y)] & mask;
return (ret!=0);



So just delete those lines.

Edited by Lord Settra!, 11 January 2011 - 05:45 PM.


#8 MarioBrosCom

MarioBrosCom

    Adept

  • Members
  • Real Name:Stylianos
  • Location:Canada

Posted 11 January 2011 - 06:56 PM

QUOTE(Lord Settra! @ Jan 11 2011, 05:43 PM) View Post

You can erease this part, because the function is already called in "std.zh":

So just delete those lines.

Maybe you're thinking of Screen->isSolid. I don't see isSolid defined in std.zh, so including it shouldn't cause a conflict. Likewise, removing it might only cause more problems since the script uses its own isSolid function.

#9 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 11 January 2011 - 09:33 PM

After you remove the isSolid function, change every instance of isSolid to screen->isSolid using Find+Replace. The built-in version works on layers while the other one doesn't.

#10 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 12 January 2011 - 07:53 AM

Oh, I'm sorry.
I looked in my script and thought, I deleted it, but the same function was called in the bombchu-script.
So just forget, what I said...


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users