PDA

View Full Version : Quest not working - Can't find the issue


Swedgamer
06-18-2012, 07:38 PM
Hey guys, I've just starting sniffing to quest scripting so my knowledge is very small.

I'm trying to make an epic 2.0 quest npc who checks if player has epic 1.5 to start the conversation and if not then an alternate conversation

sub EVENT_SAY {
if((plugin::check_hasitem($client, 60321)) ||
(plugin::check_hasitem($client, 77631)) ||
(plugin::check_hasitem($client, 9955)) ||
(plugin::check_hasitem($client, 52952)) ||
(plugin::check_hasitem($client, 52911)) ||
(plugin::check_hasitem($client, 18398)) ||
(plugin::check_hasitem($client, 62863)) ||
(plugin::check_hasitem($client, 19092)) ||
(plugin::check_hasitem($client, 61025)) ||
(plugin::check_hasitem($client, 62581)) ||
(plugin::check_hasitem($client, 64031)) ||
(plugin::check_hasitem($client, 62627)) ||
(plugin::check_hasitem($client, 52347)) ||
(plugin::check_hasitem($client, 50003)) ||
(plugin::check_hasitem($client, 12665)) ||
(plugin::check_hasitem($client, 57400)) ||
(plugin::check_hasitem($client, 62627)))
if($text =~/Hail/i)
quest::say("Greetings $name! I see you have found yourself a weapon of great power. You know there's a way to make it even more powerful, no? Would you be [interested] in knowing more about it?");

}
if($text =~/interested/i){
quest::say("Excellent! First of all you will need to find a map that reveals the source of the powerful spirit which is used to infuse your weapon. It was stolen by soldiers of discord during the last war. I heard rumors that they keep it in one of their [temples]. You will also need something to hold the map together and only the strongest and most delicate [adhesives] will do the job! Please let me know when you're ready to [proceed]");
}
if($text =~/temples/i){
quest::say("The forces of Discord have many temples but the most prominent is the one in Ferubi. It lies in the center of their outposts. The map is held by the soldiers who found it but they have likely split it amongst each other. Find all the pieces and bring the map back to me.");
}
if($text =~/adhesives/i){
quest::say("The only adhesive I know of that would be able to do the job, is one made by a woman named Rhianna O'Mieden. She's currently staying at a camp in Natimbi. Go talk to her and see if she can help you.");
}
if($text = /proceed/i){
quest::say("Take this container and combine the map pieces with the adhesive. Once you're done bring the map back to me!");
quest::SummonItem("8775");
}
}
else($text =~/Hail/){
quest::say("I'm sorry $name, but I cannot help you at this time. Come see me when you have obtained a weapon of power!");
}
}

Caryatis
06-18-2012, 08:21 PM
If you are new to perl then realize there are a ton of tutorials for perl which will help you even though they have nothing to do with EQ.

You don't seem to be enclosing your if statements properly. As a newbie you should not be jumping so many steps at once. Try to get each stage working before you move on(ie its not important that it works for all epics until it works for a single one, then you can scale it up).

Swedgamer
06-18-2012, 08:38 PM
Thanks for the advice! -And you're right!

When I get excited about something I tend to try running before walking hehe!

Swedgamer
06-18-2012, 10:15 PM
Going step by step I got it to work in 10 mins! Thanks again for the great advice!