Log in

View Full Version : Help with making a quest level requirement


paaco
10-08-2008, 12:55 AM
I don't see a thing wrong with this, it does not work correctly though. If anyone sees something broken please point it out for me. This quest is only supposed to send you if you are level 50 or above. On my tests it appears to send you no matter what level though :(
sub EVENT_SAY {

if($text=~/Hail/i) {

quest::say("Hail, $name. You look much stronger than you did last time we spoke. Maybe you can [help] me."); }
if($text=~/help/i) {
quest::say("I am glad you are willing to help, be warned this is no easy task, Luana, The God of Life has asked me to find adventurers that can take care of a problem for us. She assured me that whoever can complete what she requires will be made more powerful than they can imagine. Are you sure you are interested? ");
}
if($text=~/yes/i) {
quest::say("Very well, there is a being that was banished some time ago by the gods to the darkest place in all the lands. Before he was banished he took something from Luana, she now wants it back. Kill him and bring her lost items back and she will reward you.? I can send you there, I only require one thing, a sceptre dropped by the one that the frogloks worship.");
}
}

sub EVENT_ITEM {
if ((plugin::check_handin(\%itemcount, 4776 => 1))&&($ulevel <= 50)){
$client->Message(14, "Cinean holds out her hand to you, as you grab it you feel yourself start to fade away." );
quest::movegrp(184, -110.82, 65.53, -115.9);

}

}

trevius
10-08-2008, 01:03 AM
$ulevel <= 50

That means less than or equal to 50, which is everyone if your server caps at 50 :P

Try this:

$ulevel >= 50

paaco
10-08-2008, 01:05 AM
Yeah that was a typo in the first version, caught it right after posting, changed to your suggestion and it still sends me at lvl 1 :(

Also just a question, does movegrp work? Seems like I remember last time I used it, which was like a year ago. It was broken.

trevius
10-08-2008, 01:08 AM
I use both movegrp and movepc at the same time. The problem with movegrp is that I think it forgets to send the initiator, so movepc will fix that.

Are you sure you did a #reloadquest after saving your quest with the fix in it? That should work just fine.


If it still doesn't try this:

sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 4776 => 1)) {
if($ulevel >= 50) {
$client->Message(14, "Cinean holds out her hand to you, as you grab it you feel yourself start to fade away." );
quest::movegrp(184, -110.82, 65.53, -115.9);
quest::movepc(184, -110.82, 65.53, -115.9);
}
}
}

paaco
10-08-2008, 01:13 AM
Figured out what was wrong...Man I'm a noob lol. It seems if you have the GM flag up, it will ignore the >= 50 and send you anyways hehe ;p Turned GM off and did a reloadpl and it no longer sends you.

Thanks for the quick help Trev, sorry it was a false alarm :)