ID:169427
 
I need to know how to make it so when i talk to someone i learn something else and ask about it. Here's an example:
Talk
"I don't feel good "
Feel Good
"Yeah I've been feeling sick lately. It all started when that company moved into town
Company Moved Into Town
"Yeah. What do they do anyways?"
-----
If you get my general idea, can you help me? Please Respond quickly
-Trunkz26
verb
talk
var/option
if(option == alert("I don't <b>feel good</b>.", "", "Feel Good", "Cancel"))
if(option == alert("Yeah I've been feeling sick lately. It all started when <b>that company</b> moved into town", "", "That company", "Cancel")
alert("Yeah, what do they do anyways?", "", "Don't know", "Weapons", "Medicine", "Machinery", "Nanotechnology")


Like that.

Is that what you meant?

--Vito
Something, like this?

mob/Someone
icon = 'Icon.dmi'
icon_state = "iconstate"
name = "Some person"
//etc..
verb/Talk()
set category = "A category"
set name = "Talk to"
switch(input("Yes?","Someones name here") in list ("I don't feel good","Cancel"))

if("I don't feel good")
usr<<"Things here.."
switch(input("Really?","Someones name is still here") in list ("I been feeling sick lately","Cancel"))

if("I been feeling sick lately")
usr<<"Things here.."
switch(input("What did this to you?","The same persons name here") in list ("It all started when that company moved into town","Cancel"))

if("It all started when that company moved into town")
usr<<"More drama here!"
//You know the whole thing. Just continue more switch statements or try something else

if("Cancel")
return

if("Cancel")
return

if("Cancel")
return
In response to MasterLink2003
Mine's shorter
In response to Vito Stolidus
Yeah, but not fully what he wanted.
In response to MasterLink2003
Umm, I dunno 'bout that. for conversations, I win.

--Vito
In response to Vito Stolidus
Whatever..
In response to Vito Stolidus
Yours is shorter, but his actually works. Compiled with yours, you get these errors:
<code> C:\WINDOWS\system32\Namer\Namer.dm:4: Inconsistent indentation. C:\WINDOWS\system32\Namer\Namer.dm:5: Inconsistent indentation. C:\WINDOWS\system32\Namer\Namer.dm:6:error: alert: missing comma ',' or right-paren ')' C:\WINDOWS\system32\Namer\Namer.dme:21:error: unbalanced }</CODE>
In response to Mega fart cannon
OOh, sorry, I was being fast, not correct. If you guys like, I'll rebuild it to run (sarcastic). I was giving him a general idea.

--Vito
In response to Vito Stolidus
Sometimes, you have to not do it so fast. But, oh well.
In response to MasterLink2003
You're right: "Oh well." If he can't debug simple typos, he can't program. period.

--Vito
I think he wants kinda like a verb to only be accessable after you use the first verb. Which you could do by adding and deleting from the verbs list. Just look up verbs in the reference.

If thats not it Im sorry.
In response to Green Lime
oooohhh, THAT'S what he meant...
In response to Vito Stolidus
you guys (Vito and MasterLink) both did good. But what i meant was after you had one verb, the next became accessible. Example:
talk
i need a job
Job (Becomes accessible on the Stat Panel)
etc.

-Trunks26

p.s. i don't know if Verb Stacking has been used on BYOND before. I just thougth of a name that sounded fitting
In response to Trunkz26
oooh, then use

usr.verbs += typesof(/mob/conversation/verb/Job


...or something along those lines. Put this line in the effect of the previous verb. I would suggest using the same general syntax to subtract each verb as you use it.

Hope THAT helps.

--Vito
In response to Vito Stolidus
Vito Stolidus wrote:
oooh, then use

> usr.verbs += typesof(/mob/conversation/verb/Job
>

...or something along those lines. Put this line in the effect of the previous verb. I would suggest using the same general syntax to subtract each verb as you use it.

Hope THAT helps.

--Vito

Um.. no offense Vito but thats a tiny bit wrong. I can see where your going in all but..

src.verbs+=typesof(/mob/conversation/verb/Job)


That should do it. I changed usr to src and also added an end ")".
I've used both of those. It works but when I walk away from the mob i can still talk to it about 'Job'.
set src = view(1) won't work and neither will set src in oview(any#) won't work. With oview() i can't even talk.
In response to Trunkz26
Trunkz26 wrote:
I've used both of those. It works but when I walk away from the mob i can still talk to it about 'Job'.
set src = view(1) won't work and neither will set src in oview(any#) won't work. With oview() i can't even talk.

Hmm.. usually:

   set src in oview(1)


works for my NPC's. But, if you can show us your new code that you used for your NPC we could help you.
In response to MasterLink2003
Mob
Mob16_99_2
density=1
verb
Talk_to()
set name = "Talk"
set src = view(1)
set category="Bihridorn Narcoween"
usr <<"Hello [usr], I am Bihridorn Narcoween. Welcome to our \bold caverns."
sleep(30)
usr.verbs+=typesof(/mob/Mob16_99_2_Verb/verb/ Ask_About_Caverns)
Mob16_99_2_Verb
verb
Ask_About_Caverns()
set src = view(1)
set category = "Bihridorn Narcoween"
usr <<"The Caverns go really deep undergroud. They have a lot of \bold springs \ running through them."
-----
There's the coding. I just tried putting in what you told me to (MasterLink2003) and now the verb wont even show up. I have another verb coming up afterwards so tell me if the same thing will work going on to the next verb.

p.s. neither usr. or src. will work
In response to Trunkz26
*Ahem*.. first of all why did you have set src = view(1)? That does'nt really seem to make any sense at all. And then again theres another simple way to do it, sorta.

mob/testnpc
icon = 'test.dmi'
icon_state = "iconstate"
name = "Test NPC"
verb/Test()
src<<"Test NPC: Oh, hello there.. anything of interest?"
src.verbs += /mob/test/verb/testing

mob/test
verb/testing()
src<<"Test NPC: Really? Noithing, of interest?"
Page: 1 2