please help i cant figure this out
ok this is my code and it doesnt seem to wanna work please help
Code:
sub EVENT_SAY { Code:
sub EVENT_SAY { |
Could be multiple things.
First, you should make sure your NPC has access to quest globals (see npc_types). Second, you should read at the bottom of the quest tutorial to see which NPC/PC/Zone combo you are using: http://www.eqemulator.net/wiki/wikka...=QuestTutorial Third, you should really use the $qglobal{} method to read globals. Something like: Code:
if (defined($qglobals{MM}) && $qglobals{MM} == 1) { |
now with that command that u said how would i add a iftext hail to it and npc is set to global commands
and the npc player and zone is set to 0 which is this npc this player and this zone |
In your post, you have 2 script sections, each including their own EVENT_SAY. That suggests that you have 2 separate NPCs each using one of those EVENT_SAYs. If you do have 2 NPCs using these scripts, the second one will never recognize the qglobal, because you set it to 0, which means that only the NPC that gave the qglobal will ever recognize it. And, if that isn't the case and both of these script sections are on the same NPC, it is probably breaking because you aren't supposed to have more than 1 of each event type per NPC, including EVENT_SAY.
If you do have 2 NPCs, you will want to use either option 1 or option 5 for your qglobal btw. |
You might be looking for something like this:
Code:
sub EVENT_SAY { |
this what what im using now
[/ode] sub EVENT_SAY {
if ($text=~/hail/i) { if (!defined($qglobals{MM})) { quest::say("You must kill lord Mith Mar to talk to me $name."); }} if ($text=~/hail/i) { if (defined($qglobals{MM}) && ($qglobals{MM} == 1)) { quest::say("AHHH, So you defeated him would you like to go to The Ascent?"); } } if ($text=~/ascent/i && defined($qglobals{MM}) && ($qglobals{MM} == 1)) { quest::say("Have fun on your Journey"); quest::movepc(319,169,1027,44); } } } [/code] he responds to the first line even if u have the flag he wont go tot the second line the ahh so you defeated him part |
jkennedy, you have an extra brace at the bottom and you have two ($text=~/hail/i). If this did work you would get the contents of both 'hail' statements when 'MM' is set to 1. Try this:
Code:
sub EVENT_SAY HTH |
that still wont work
i have the flag which is set to an id then the charid is mine the npc id is 0 and zoneid is 0 name is MM value 1 and exp date is null and the npc is set to qglobal 1 so i have no clue why its not ready the qglobal its like skipping it |
As Trevius stated, you have the flag set to 0. Two NPCs will not be able to read that qglobal.
|
Code:
sub EVENT_SAY { |
can someone test this on there server for me and see if it works maybe its my server or plugins files or somthing
|
think i got it think since i was using the lowercase f it wouldnt saving right but i change to uppercase and works fine thanks again for all ur guys help
|
Ok, the code below worked for me. I changed the text it was looking for so that it did not work from 'hail'. I used an existing script and just added these lines to it. I walked up to the mob, typed 'haly', it told me I must go kill Mith Mar. I have it setting theqglobal right after it displays the kill Mith Mar text, this line would be removed from your script. I typed 'haly' again and it said I defeated him did I want to go to the ascent.
So the code works, your problem must lie elsewhere. Code:
|
All times are GMT -4. The time now is 03:46 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.