Reset Password
Existing players used to logging in with their character name and moo password must signup for a website account.
- krakoise 4s
- Cyberpunker 8m
- arm0r3r 3m
- Hippo 20s
- dwtm 6s
- Mory 19m http://www.novelupdates.com
- Baron17 5s
- Madhouse 2m
- Mephibosheth 8s !zib eht si sivni@
- Vivvykins 1h
- Selly 33m
- deepBlue 5s
- Barrien 15s
- Sara 12m
- Strummer 2m
- Jade1202 52s
- HottFoxx 45s I don't play on your schedule.
- Kyrius00 45s
- Archer 3m
- jsmith225 20m
- fujiyamyam 42s
j Kwisatz 5h Definitely not a GM.
- pfh 2h
- Manywaters 1m youtu.be/lxAOc4JYELc
- attaboy 3s
- FancyPenguin 12m
- SacredWest 1m
j Johnny 2m New Code Written Nightly. Not a GM.
And 27 more hiding and/or disguised
Connect to Sindome @ moo.sindome.org:5555 or just Play Now

NPC Responses in scripts
Hookie turns to you and says, "Say what?"

After a brief battle with some basic code design problems which lead me to write and rewrite a very complex and important piece of code, I was able to quickly and easily (using 12 lines of code I might add) make the following addition:

On $npc_centric_script:

waitfor OBJ who, STR speach type, STR response variable
�<who> is who you want to wait for a response from
�<speach type> is the 'response type' you want to wait for. Presently only "speach" is supported.
�<response variable> is the variable to hold what the response was.
�This causes the NPC to wait for <who> to say something to them, and puts what they said in the variable <response variable>. It returns 1 if it got a response within 2 minuits, else 0.

Why is this useful you ask?

Let's give an example.

Your NPC says something to the player, then needs to wait for a response from them. Depending on what the player says, (assuming he says anything at all) the NPC might do different things.

So Let's just do a basic script with this example.

uses $npc_centric_script

say "Say something."
if waitfor %player "speach" "response"
�say "You said: " %response
�if match %response "fuck" or match %response "shit"
� �say "Hey man, that's a dirty word."
�endif
else
�say "I didn't hear you say anything."
endif

We can call this the 'polly parrot' script because it makes the NPC say something, then repeats what the player says, and potentially makes a comment about it. In the case where the player dosn't say anything in 2 minuits or less, the NPC says "I didn't hear you say anything." after the 2 minuits are up.

Yes, 2 minuits is easily adjusted. No, we don't have a way to set it but were thinking there should be one.

Questions, comments, screams of agony, and other cries for help go below.

-Kevlar

-----------------------------------------------------

As an aside: In embarking in the journey that was writing all the complex underlying code necessary to make something like this possible, and even simple, (and changing a few existing things in the process) I was make very aware of the following interesting bit of trivia:

The average person dosn't like 'big' words. I define big words as ones that are not commonly used in every day usage like 'Transient' and 'Mutually Exclusive'. They see or hear them and are daunted by them. They cry out 'You use big words, and I don't understand!', yet they are english words with dictionary definitions. They even go as far in their fear of these words as to accuse the user of the words of having a 'superiority complex', which is ironic because 'superiority complex' are big words. They ignore their context, and their provided definition. They can't see past the number of letters and through to the meaning.

To these people I offer my appologies. My intention was not to confuse you, but to enlighten you. I use big words because we have a rich language which supports complex concepts such as 'Transient' when refering to something that is on the move, temporary, or fleeting, or 'Mutually exclusive' when refering to two conditions which cannot co-exist. I provide definitions of these words there with their usage so that you need not look further than the words after the word you don't understand in the hopes to allow you to easily follow.

If I had a superiority complex, I would not bother to do these things. I would say, "Bah, your all dumb. Figgure it out your damn self." and just use big words to spite you. But that's not the case.

Instead I'll use another big word: Ignorant.
Because we all are. You, me, and everyone else in this world, there's all things we don't know; that were ignorant about. But we learn. We grow. Don't be afraid of doing it.

(Edited by Kevlar at 3:01 am on Oct. 30, 2002)

That's sort of insulting. Because I was drunk, stoned, and bored, when you started to explain the concept of Mutex(MUTually EXclusive locks) - I couldn't really keep up with you and the 6 other people I was aim-ing with. (btw, you never really said what they were mutually exclusive for, ie: users, code, rooms, connections) But please, feel free to fire away with all the technical wisdom you may provide, so I may - in a more sober state - absorb it and potentially use it in the future. :)

(Edited by Hunter at 12:35 pm on Oct. 30, 2002)

Hunter: Not you man. You were very gracious in your requesting me to explain, and certianly never accused me of having a superiority complex.

(Edited by Kevlar at 11:29 am on Oct. 30, 2002)