PDA

View Full Version : I input, I say



bremerial
08-25-2014, 07:08 AM
Ok am on a roll. Someone is looking at this next query for me from a stormfront perspective.

What would a basic Lich script look like where I input a word and get a verbal response. Ok, a good example of this would be regarding herbs. Lets assume I wanted to input the name of a herb and 'say' something about the herb. How would that work? It the list of things I might want too convey is long, would an xml document be needed? Yeah I know. Coding 101 right? heh. But i'm genuinely interested to know.


A very rough Stormfront example of this might be:


Start:

match Ephlox
matchwait

Ephlox:
put say This ephlox moss can cure your bleeding limb wounds and is located blah bla blah
goto start

Tgo01
08-25-2014, 11:11 AM
while line = get
if line =~ /Ephlox/i
put "say This ephlox moss can cure your bleeding limb wounds and is located blah bla blah"
elsif line =~ /acantha leaf/i
put "say This leaf does stuff as well."
end
end

bremerial
08-25-2014, 12:20 PM
yeay
thanks

Tgo01
08-25-2014, 12:24 PM
Keep in mind this is going to have you saying the bit about ephlox anytime the game sees the word ephlox so I dunno how you're planning on using this script but if you plan on having it running all the time or something and you only want it to go off at certain times you may want to make the trigger something more precise :p

JackWhisper
08-26-2014, 04:42 AM
Maybe you could set an echo line that enters the game command, but doesn't have it go into chat. Like how you can ;chat to yourself on Lich, and it comes up twice, but this only echoes into the game window as an unknown command? Just a thought.

bremerial
08-26-2014, 05:06 AM
Yeah I did think about that.
I remember creating a stormfront script that triggered ewave. In that case I used what I thought was an obscure English phrase. Figured I was safe as it wasn't one US folk would use. Alas I had the script running in the background when I entered town and the script picked up that phrase that someone actually said. Five minutes in a cell and a hefty fine!

Will look to either exit the script after specific use or employ some other suggested method of achieving the same thing - as suggested perhaps.