EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Doing quests twice.. (https://www.eqemulator.org/forums/showthread.php?t=18909)

Kensh 06-28-2005 04:33 PM

Doing quests twice..
 
I know there's a way to make it so people can only do quests once, and it annoys me that i can't think of it right now. The best a person could come up with when i asked them was this, and i'm not sure if it would work..
Quote:

if((quest::flagclient(59,5) == false) &&...)
any insight from you guys?

oh and another question, when you're setting flags on characters, what if you need more than 59 flags.. isn't there a way to still somehow flag the character past this point so they can't re-do quests?

Cisyouc 06-28-2005 04:53 PM

http://eqemulator.net/forums/showthread.php?t=11730

Kensh 06-28-2005 05:24 PM

archive quests.. of course i dont look there. thanks Cisyouc

EDIT: oh btw.. i dont have a server to test this on up atm, so yould you see if this is the correct format for setting and using the global variable?
Code:

sub EVENT_SAY
{
        if($text =~/Hail/i && $lunch=="2")
                {
                quest::say(Thank you again for helping me return my lunch to my son.");
                }
        elsif($text =~/Hail/i)
                {
                quest::say("Hail, adventurer. I seem to be a bit [busy] at the moment, so if you could leave me alone i would be quite humbled.");
                quest::checkflag(59,5);
        if($text =~/busy/i)
                {
                quest::say("I'm glad you're interested in my problem, but i could not [ask] such a simple task of you.");
                }
        if($text =~/ask/i)
                {
                quest::say("Sigh, you seem to be unwavering about this decision. Fine, if i can't change your mind then here. My son Solerin has forgotten his lunch, it seems he took mine in his rush out of our house today, and i am far too busy to go give it to him. If you do not know [where] he is, then i would be happy to tell you.
                quest::summonitem(77769);
                }
        if($text =~/where/i)
                {
                quest::say("He usually hangs around that dirty beastlord Savarr, so you might start your search there.");
                }
}
sub EVENT_ITEM
{
        if($item1 == 77770 && $ulevel==1)
                {
                quest::say("I am glad to see that my son got the right lunch, please accept this as a small token of my gratitude, it's the least i can do.");
                quest::exp(110)
                quest::targlobal("lunch","2","Y7",699,$charid,4);
                }
        if($item1 == 77770 && $ulevel==2)
                {
                quest::say("I am glad to see that my son got the right lunch, please accept this as a small token of my gratitude, it's the least i can do.");
                quest::exp(770)
                quest::targlobal("lunch","2","Y7",699,$charid,4);
                }
        if($item1 == 77770 && $ulevel==3)
                {
                quest::say("I am glad to see that my son got the right lunch, please accept this as a small token of my gratitude, it's the least i can do.");
                quest::exp(2090)
                quest::targlobal("lunch","2","Y7",699,$charid,4);
                }
        if($item1 == 77770 && $ulevel==4)
                {
                quest::say("I am glad to see that my son got the right lunch, please accept this as a small token of my gratitude, it's the least i can do.");
                quest::exp(4070)
                quest::targlobal("lunch","2","Y7",699,$charid,4);
                }
        if($item1 == 77770 && $ulevel>=5)
                {
                quest::say("I am glad to see that my son got the right lunch, please accept this as a small token of my gratitude, it's the least i can do.");
                quest::exp(6710)
                quest::targlobal("lunch","2","Y7",699,$charid,4);
                }
}

thanks again

Cisyouc 06-29-2005 02:07 AM

It is used correctly, however, it might be better to use setglobal if its only for the same npc, not targlobal. And, another thing is, you didnt add a check for $lunch in EVENT_ITEM, so theoretically you could still do the quest again, the NPC just wont talk about it when you hail him. But he'll respond to all the other 'what [noun]'s


All times are GMT -4. The time now is 09:54 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.