Question about making a quest.
Im new to perl just trying to learn, can anyone tell me if its possible to make a npc that zones players to the zone that they say. Like a translocator, but instead if you say lguk it ports you to lguk. Im not sure if there would be a way to take what the persn says and turn it into a variable, then put that variable into the zone command.
|
Code:
sub EVENT_SAY |
no, not like that. I mean like ike say theres a NPCcalled Zone Porter. You hail him, then he says, "Whatzone would you like to be ported to.?" And say you repsonde with katta, it ports you to katta, or you say veeshan, it ports you to veeshan, get what I'm saying. Instead of making it like a million if's for each zone, would there be a way to set it up with a variable?
|
Dont think so.
|
You could make a quest command that retrieves the zoneid and save coords and then implement it, like:
Code:
sub EVENT_SAY |
If anything, FNW should put this into his quest system.
|
ok, well I dont no C++ so I guess ill just have to wait until someone gets too it. Thanks for your help guys=)
|
Would this work?
Code:
sub EVENT_SAY If not, you can just do what Cisc did, but do it for every single zone -- that WOULD work - I was just trying a shorter way ;) Alternatively, you could give them the #zone command -- though a quest is customisable (eg. if $level > 20 && $text =~ /la/ etc. etc.) |
First,
Code:
|| "westwastes" || ") Code:
|| "westwastes") And Second, Its a great zonename parser but movepc() works by zoneid, not zone name :( |
I knew there was a mistake somewhere :P
And if the $zoneid is said in the $text ( $text = $zoneid ) , it should work? If the $text isn't a $zoneid , then the NPC would say something different. |
Yeah if i said
/say 202 theoretically.. Code:
sub EVENT_SAY |
Which is why " if ($text !=) " any of the zone shortnames, the mob will respond with "Sorry $name, I do not recognise that zone." - ELSE, if it IS recognised, he will move you.
I'm not too sure , as I said in #perl just now, I'm rusty with my perl, I've not used || before , have been away for a while , so will take your word that it's wrong. But if anybody tests it .... :P |
Its wrong because movepc looks for a number to move them to. Giving it text will fail because it won't be a number.
|
In Visual Basic (yes, I know....) you are able to define things as things.
For example Code:
Dim Akheva as String I would have thought it would be something like sub EVENT_SAY{ "Akheva" = 1 etc. = etc. if($text =~ /hail/i){ quest ..... etc. etc.} } |
I dont think so, because i dont think you can take the contents of one variable and look for another variable with the name of the text.
|
All times are GMT -4. The time now is 01:45 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.