Jump to content

Photo

Need help with Hot Water Music Man's NPC script.


  • Please log in to reply
9 replies to this topic

#1 Dann Woolf

Dann Woolf

    Recipient of Ways

  • Members
  • Real Name:Daniel
  • Location:The Netherlands

Posted 05 April 2011 - 01:12 PM

I need a way an NPC to give you an item after talking to you, and a way for the NPC to be able to say different things (like maybe a hidden flag that turns on after you talk to them, and/or checking to see if you have an item or not. These have to be optional things. I don't want every NPC to give Link an item or for every NPC to have multiple strings.

Edited by Dann Woolf, 05 April 2011 - 01:14 PM.


#2 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 05 April 2011 - 01:25 PM

These are all possible (and simple) with string control codes. Read up on them.

Edited by MoscowModder, 05 April 2011 - 01:25 PM.


#3 Dann Woolf

Dann Woolf

    Recipient of Ways

  • Members
  • Real Name:Daniel
  • Location:The Netherlands

Posted 05 April 2011 - 01:41 PM

Thank you! A couple more questions, sorry. Is it possible make it so a chest can't be opened until you talk to a certain NPC nearby? And those counter codes. Do those edit global counters? Is there like a way to check a list of counters?

Edited by Dann Woolf, 05 April 2011 - 02:00 PM.


#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 05 April 2011 - 02:38 PM

1. One version of the NPC script allows you to make guard NPCs that can block you from reaching the chest.

2. Yes, they set global counters. Search the wiki for "Counter" or else search for counters in std.zh.

#5 Dann Woolf

Dann Woolf

    Recipient of Ways

  • Members
  • Real Name:Daniel
  • Location:The Netherlands

Posted 05 April 2011 - 03:39 PM

Alright, thank you for answering my questions. If I have any more, I'll just edit this post.

It's been a year or so since I last used Zelda Classic, so I'm a little rusty.

EDIT: And yep, I have another question: do counters use names or ID numbers? I'm not sure what the counter codes use for argument 1.

Edited by Dann Woolf, 05 April 2011 - 03:45 PM.


#6 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 05 April 2011 - 05:20 PM

In string control codes, you use ID numbers. In scripts, you can use both.

#7 Dann Woolf

Dann Woolf

    Recipient of Ways

  • Members
  • Real Name:Daniel
  • Location:The Netherlands

Posted 06 April 2011 - 02:27 AM

Is there a list of global counter IDs that can be used safely without screwing with Zelda Classic? Or does it not matter what IDs I use?

I couldn't find anything on the Shardstorm Wiki and when I looked at std.zh I couldn't understand a word of it.

#8 Giggidy

Giggidy

    We live for chaos so that we may die for ourselves.

  • Banned

Posted 06 April 2011 - 03:08 AM

QUOTE
//Generic counters. Use with itemclass->Counter, Game->Counter[], Game->MCounter[] and Game->DCounter[]
const int CR_LIFE = 0;
const int CR_RUPEES = 1;
const int CR_BOMBS = 2;
const int CR_ARROWS = 3;
const int CR_MAGIC = 4;
const int CR_KEYS = 5;
const int CR_SBOMBS = 6;
const int CR_SCRIPT1 = 7;
const int CR_SCRIPT2 = 8;
const int CR_SCRIPT3 = 9;
const int CR_SCRIPT4 = 10;
const int CR_SCRIPT5 = 11;
const int CR_SCRIPT6 = 12;
const int CR_SCRIPT7 = 13;
const int CR_SCRIPT8 = 14;
const int CR_SCRIPT9 = 15;
const int CR_SCRIPT10 = 16;


Counters 7 through and including 16 can be used without screwing with ZC, but they may screw up a script someone else wrote if you aren't careful. I'm not sure what happens if you try to use counters 17 or higher, but they probably don't work.

A problem you may have though is using script control codes to give items: Items given this way won't trigger item pickup scripts or have link hold up the item.

Edited by Giggidy, 06 April 2011 - 03:11 AM.


#9 Dann Woolf

Dann Woolf

    Recipient of Ways

  • Members
  • Real Name:Daniel
  • Location:The Netherlands

Posted 06 April 2011 - 03:22 AM

Well I'm using Hot Water Music Man's NPC script (obviously), the ladder, signpost, and spin check scripts from zctut.com, Joe123's item pick up message script, InsanityForce's cliff jump script, and the "Link Dropper" script from ZCRealm, would changing global counters mess with any of those scripts?

Edited by Dann Woolf, 06 April 2011 - 07:05 AM.


#10 Giggidy

Giggidy

    We live for chaos so that we may die for ourselves.

  • Banned

Posted 06 April 2011 - 03:40 AM

I have no idea, I've never used any of those scripts before. You're the one who has the code, do a ctrl+f and search for counter modifications. Given the functions though I see no reason why any of those would need counters to work, but who knows.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users