Thanks for the reply. I got it working last night after setting the NPC to 1 in the qglobals of the NPC table.
I have seen quests written that way, but doing it that way is a little harder for me to read. It may be cleaner, but the way I have it right now seems to work fine for me. The actual quest has more "IF"s and might get a little complicated if I started trying to do elses and stuff to clean it up a little.
I may have modified it slightly after adding it in to tweak it a little, but this should be basically what I am using right now:
Code:
#Permanent De-Level Quest for access to PoTimeA
sub EVENT_SAY {
if($text=~/hail/i && $level_quest == undef && $ulevel <= 69){
quest::say("Hello, $name, if you are here to give me a Golden Ticket, please do. Otherwise scram and don't come back until you reach level 70.");
}
if($text=~/hail/i && $level_quest == undef && $ulevel == 70){
quest::say("Hello, $name, I have a type of quest for you that you have most likely never heard of before. Let's just say it doesn't come without a heavy [price].");
}
if($text=~/price/i && $level_quest == undef && $ulevel == 70){
quest::say("If you are willing to give up your seasoned level 70 experience to me, I can give you access to a place that normal adventures are unable to get to. There are treasures to be found there that cannot be found anywhere else. Your experience shall be added to mine to make me even more powerful than I am now! Would you like to hear [more]?");
}
if($text=~/more/i && $level_quest == undef && $ulevel == 70){
quest::say("If you are ready to make this great [sacrifice], just say the word and I will take your experience! If you would like to know more reasons of [why] you might want to de-level, I can tell you.");
}
if($text=~/why/i && $level_quest == undef && $ulevel == 70){
quest::say("De-leveling is mainly for players who like to solo often, or who prefer to level instead of raiding. If you find yourself getting bored here, you may want to give it a try. You won't be able to gain items that are the quality of raid items, but you can get fun things that may make you more efficient at soloing. Also, if you are planning to help level a friend or alt, de-leveling is a great way to do so, as it allows you to bring 1 friend with you.");
}
if($text=~/sacrifice/i && $level_quest == undef && $ulevel == 70) {
quest::say("You have made a great sacrifice! Hopefully the rewards prove to be well worth it.");
$client->Message(15, "You have received a flag to access the Plane of Time A");
quest::setglobal("level_quest", 1, 5, "F");
quest::summonitem(2242);
quest::selfcast(331);
quest::level(1);
}
if($text=~/hail/i && $level_quest == 1) {
quest::say("Hello again, $name! Anytime you wish to travel to the Plane of [Time] A, I will send you straight there. However, if you are looking for other De-Leveling services, you will need to speak with my sister right here next to me.");
}
if ($text =~/time/i && $level_quest == 1)
{
quest::say ("Few journey to the Plane of Time, but even fewer return. So be careful!");
$client->Message(6, "A beam of light surrounds your body, and particle by particle your entire being is relocated.");
quest::movepc(219, 0,0,3);
}
{
$level_quest=undef;
}
}
sub EVENT_ITEM {
if(plugin::check_handin(\%itemcount, 2242 => 1)) {
quest::say("The person who gave this to you has made a great sacrifice to get this item for you.");
$client->Message(15, "You have received a flag to access the Plane of Time A");
quest::setglobal("level_quest", 1, 5, "F");
}
else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}
{
$level_quest=undef;
}
}
Basically, the quest delevels a character from level 70 down to level 1 in exchange for access to a custom zone. It also gives them 1 tradeable token that they can give to anyone they want that can be turned in for a flag to the same zone. This way, a level 70 can de-level and bring an alt or friend to the zone with them and level up and get special gear with no level req that is much better than normal low level gear. The items there have clicky buffs that would even be useful for level 70 soloers. The main reason to go there is to level a friend or alt much quicker than normal and gear them up quickly. Just 1 more thing people can do if they get bored and would rather level characters than raid.