Jump to content

Photo

Item for NPC


  • Please log in to reply
21 replies to this topic

#1 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 03 June 2011 - 05:05 PM

Okay, so I want to make an item to give to an NPC. Before they get the item, I want them to say one thing. Once Link gives the item to the NPC, I want them to give Link an item the first time they give it to them. And I want the string to change after he gives them the item.

Can anyone help? icon_smile.gif

#2 Ica

Ica

    Napoleon Bonaparty

  • Members
  • Real Name:Leonardo
  • Location:São Paulo

Posted 03 June 2011 - 06:26 PM

OK, here is what i did, and remeber, i use 2.10, so there are much easier ways archieve the same results.

1º Make three screens: The Overworld one [A], the one in which you give the item[B], and the one where you receive the *reward[C].

2º In [B], set the invisible NPC, set a string and set the room to "feed the gorya".

3º PLace a conveyor going up right before the NPC's solid area, and place Warps around it. Then place the blue square over the conveyor. Also, make the coveyor go all the way to the end of the screen.

4º make the warps around you transport you to [A], and the side warp take you to [C].

This way, if you dont have the item, you wont be able to pass the solid area and will have to move and be tile warped to [A]. But when you give the item (bait), the NPC will desappear, the conveyor will lead you to the side warp, and BANG, there you got the most confusing way to do this icon_smile.gif

*remember to place the item at the same coordinates as the blue square.

#Here is an example:
IPB Image

#3 Moo2wo

Moo2wo

    Yes, you're seeing this.

  • Members
  • Location:The Mushroom Kingdom

Posted 03 June 2011 - 07:15 PM

String Control Codes are your best friend with something like this, if you're using 2.5. Hopefully you can figure it out if you gloss them over; if not, I'll explain exactly how to do it.

Edited by Moo2wo, 03 June 2011 - 07:41 PM.


#4 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 03 June 2011 - 07:39 PM

I am using 2.5 icon_smile.gif
I looked through it, but I didn't understand it at all icon_frown.gif

#5 Moo2wo

Moo2wo

    Yes, you're seeing this.

  • Members
  • Location:The Mushroom Kingdom

Posted 03 June 2011 - 08:00 PM

You'll want to set it up something like this:

String 1:

CODE
I sure could use [item 1]...

String 1 with string command codes inserted:

CODE
\5\X\X\5\X\XI sure could use [item 1]...

I'll explain what I added. The "\5" tells the string what control code to use. In the first "\X", in place of the "X" insert the ID number of the item you need for it to switch to String 2. In the second "\X", put in the number of the string to switch to if you have the item. There are two items that need to be checked for in this string; the item that Link needs to get the other item, as well as the other item.

String 2:

CODE
Thanks for [item 1]!  Here, you can have [item 2].


String 2 with command codes inserted:

CODE
\17\XThanks for [item 1]!  Here, you can have [item 2].\16\X

"\17" tells it what string control code to use, and the first "\X" tells it what item to remove from Link's inventory. In this case, it should be "[item 1]". "\16" tells it what string control code to look for, and the second "\X" tells it what item to give to Link in place of "[item 1]".

Finally, String 3:

CODE
Thanks again for [item 1]!  Hope you like [item 2]!

No control codes needed; everything should be good to go!

Did this help?


#6 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 03 June 2011 - 08:05 PM

Alright, I do get it, a bit at least! icon_biggrin.gif
Now, how do I make an item to do it? i want it to be a doll icon_razz.gif
Do I need it to have a spot in the inventory?

Edited by Lynker, 03 June 2011 - 08:09 PM.


#7 Moo2wo

Moo2wo

    Yes, you're seeing this.

  • Members
  • Location:The Mushroom Kingdom

Posted 03 June 2011 - 08:19 PM

I'm assuming this is part of a trading sequence? Just make a bunch of items with a Custom Item Class and give that item class a spot in the subscreen.

#8 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 03 June 2011 - 08:44 PM

"\17" tells it what string control code to use,
-
What does this mean? What do I put in?

And are the string codes supposed to change to periods after you click okay?

#9 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 04 June 2011 - 11:12 AM

QUOTE(Moo2wo @ Jun 3 2011, 07:00 PM) View Post

CODE
\5\X\X\5\X\XI sure could use [item 1]...


But Moo, won't this look strange seeing as this string will be skipped over if you have the item? Shouldn't this still show if you have the necesary item so it doesn't look like the NPC steals it from you? icon_razz.gif

Edited by Pokemonmaster64, 04 June 2011 - 11:15 AM.


#10 Moo2wo

Moo2wo

    Yes, you're seeing this.

  • Members
  • Location:The Mushroom Kingdom

Posted 04 June 2011 - 11:21 AM

QUOTE(Pokemonmaster64 @ Jun 4 2011, 12:12 PM) View Post

But Moo, won't this look strange seeing as this string will be skipped over if you have the item? Shouldn't this still show if you have the necesary item so it doesn't look like the NPC steals it from you? icon_razz.gif

That was merely an example; it can be whatever he wants. But it would be hilarious if an NPC mugged the player. XD

@Lynker: Consult the wiki. I believe "\17" is the control code for the string to take away one of the player's items; the variable "\X" after it tells it what item to take. For example, if I wanted it to take the Wooden Sword away from the player, first I'd check to see what the Wooden Sword's ID number is, and then I'd write it out in the string like this: \17\5\. 17 tells the string to take away an item, and the next number is the item to take, in this case, item #5. Does that help?

Also, I'm not sure about your other question. It's not doing that when I write out control codes, but it might have something to do with the build you're using. I'm using RC1.


#11 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 04 June 2011 - 11:35 AM

Ohh, I get it now! icon_smile.gif Thanks!
And i'm using RC1. But whenever I save the string with the \'s in the beginning and stuff, the numbers in it turn into periods.

Edit - AHH!!! I got it to work! Thanks soooo much Moo2wo!!
But now, I got the item form her, but now she goes back to saying the first thing she said (About her wanting the item)

Edited by Lynker, 04 June 2011 - 11:48 AM.


#12 HylianGlaceon

HylianGlaceon

    Magus

  • Members
  • Location:Whatever dimension is between Sinnoh and Hyrule...

Posted 04 June 2011 - 03:13 PM

QUOTE(Lynker @ Jun 4 2011, 11:35 AM) View Post

Ohh, I get it now! icon_smile.gif Thanks!
And i'm using RC1. But whenever I save the string with the \'s in the beginning and stuff, the numbers in it turn into periods.

Edit - AHH!!! I got it to work! Thanks soooo much Moo2wo!!
But now, I got the item form her, but now she goes back to saying the first thing she said (About her wanting the item)


You'll need to set another string to change when you have the new item that appears before she asks for the item. So if she gave you the Boomerang for an example, you'll need a string code to change to another string if Link has that Boomerang that appears before the string where she asks.

(If you aren't sure, try editing a string and clicking the help button, there's a guide there in ZQ.)



#13 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 05 June 2011 - 03:26 PM

Can anyone help me still? I tried to do it myself, and it work partially.
The string showed after (Like as if the strings were combined), and then it went back to the first.
I put the string control code after the one where you get the item.

#14 Moo2wo

Moo2wo

    Yes, you're seeing this.

  • Members
  • Location:The Mushroom Kingdom

Posted 05 June 2011 - 03:33 PM

Try putting it at the very start of the first string she says.

If that doesn't work I must have misunderstood the question.

#15 Jared

Jared

    Deified

  • Members
  • Real Name:Jared
  • Pronouns:He / Him
  • Location:New Hampshire

Posted 05 June 2011 - 03:40 PM

But there is already one in the beginning of it.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users