mob
NPC
Red_Haired_Woman
icon='Mobs.dmi'
icon_state="Red Haired Woman"
verb
Talk()
set src in oview(1)
set name="Talk"
set desc="Talk"
set category="Commands"
switch(input("What would you like to know?")in list("The Beach","This Town","Merchants","You must be really old to know all this","Cancel"))
if("The Beach")
usr<<"The Beach lies to the east but recently krabs and other monsters have been showing up.The krabs stayed behind at the beach but no one knows where the other monsters went."
if("This Town")
usr<<"No one here remembers anything about this town or island.Most of the elders here say that there is one place that holds all our questions but we don't know where it is."
if("Merchants")
usr<<"Here is a tip . Merchants in towns sell there items at low prices but merchants outside of towns sell there items for twice the price."
if("You must be really old to know all this.")
usr<<"I am not old."
switch(input("Ok...")in list("...sorry.","...sorry but how do you know all this."))
if("...sorry.")
usr<<"It's ok"
if("...sorry but how do you know all this.")
usr<<"Ummm I lsten in on the elder's conversations"
ID:268690
Oct 17 2004, 1:05 pm
|
|
I made it where you ask the NPC questions but on 1 button "You must be really olf to know all this" the NPC continues about that exact subject and you also so continue it by getting 2 new buttons 2 click but i can't get it to work .
|
In response to Hell Ramen
|
|
ok but what do i do about this problem .
|
I think, I THINK, this is what you're trying to do:
If you select: "You must be really old to know all this" You want it to switch input you again but with two more options right? One way to do it is if they select that first option, create a brand new switch input with the two more options in it, like so: switch(input("What would you like to know?")in list("The Beach","This Town","Merchants","You must be really old to know all this","Cancel")) Another, less space taking method, would be to make the switch input choose from an actual list and then add things to the list and then switch input again. verb I feel option 1 is better since goto is considered a bad habit and i feel that i have more control with option 1. |
In response to Hell Ramen
|
|
Hell Ramen wrote:
Uh, just to save you in the future. I think you're a little confused, this isn't a player verb. This verb belongs to another object (the NPC), and is one of the few places you have to use usr. |
switch(input("blah")in list("blah","You must be really old to know all this","blah")) if("You must be really old to know all this.") See the difference? =) There is a period in one of those, the have to be exactly the same. |
In response to YMIHere
|
|
YMIHere wrote:
Hell Ramen wrote: Wouldn't M work better? |
In response to Hell Ramen
|
|
It'd work the same i believe.
|
In response to Hell Ramen
|
|
No, he has it set-up a different way. It's just like an object verb only it's attached to a mob instead. If he used mob/M it would prompt him to pick a mob, but he doesn't need the prompt because src is the mob he wants to talk to. =)
He could make a basic Talk(mob/M in view(src,1)) verb for players where they would always have the verb, but it would only work if there was a mob in view to talk to. The way he currently has it the verb will only show up when near the mob. obj/apple/verb/Get() It's basically the same as that. I could add a parameter (Get(obj/apple/A)), but it would be useless since it is already src and usr is the guy who picked it up. *Edit Maybe I should add that since src is the object (not to be confused with /obj) that the verb belongs to (the NPC) you have to use usr (the thing that started the call stack {the player who clicked the verb}) in this instance. |
Make the verb, "talk", be Talk(mob/M), and replace every user with M