PDA

View Full Version : #perl is now open for your questions.


cofruben
07-25-2004, 10:46 PM
Hi all!.Have you got a question,suggestion,or feature request?Come to #perl channel and give your opinion!.All people are welcome,come and ask/help people.

See you there :twisted: .

Eshmanguls
07-26-2004, 03:23 AM
Is it possible to add a function that copies what the PC says and then the NPC can quote it back?

For example,

Player says "Diet Coke sucks."
NPC says, "Diet Coke sucks?"

cofruben
07-26-2004, 03:42 AM
u cant quote it,but you can send a message with color.
try the message command with style 0,3,5,etc...,you can add a perl function that calls message command.Use my guide to make it :)

killspree
08-04-2004, 05:53 PM
Actually, it is possible. HOWEVER, I do NOT suggest using this with an NPC you actually intend to use for quests, because it may cause issues with triggering various sections of the quest, if not all of it. Using this to add life to a zone would be a nice touch though. Maybe have some crazy npc that repeats what everyone says.

sub EVENT_SAY{
if($text =~ /$text/i){quest::say("$text?");}
}

That's it. Tested it just now and it works.

KhaN
08-04-2004, 08:36 PM
You make NPC repeat PC text by using a perl script that will txt log what is being said to a NPC, this way later, NPC will be able to have a memory of what you said to him and it will just have to read this log to remember.

killspree
08-04-2004, 10:00 PM
Well that works too, but you have to be careful with that. Someone could probably abuse it and a log file could get pretty big...