EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Non-Repeatable = No speak (https://www.eqemulator.org/forums/showthread.php?t=33027)

Expletus 02-09-2011 09:41 PM

Non-Repeatable = No speak
 
If I assign a task and complete it, the npc goes through the whole text up to the point of assigning the task. If I've already done it, and I don't want to make it repeatable, how do I disable that?

ChaosSlayerZ 02-09-2011 10:51 PM

put a check point in the script before entire dialog to see if task was completed

Expletus 02-10-2011 12:22 AM

O... :oops:

Expletus 02-14-2011 06:15 PM

So I've tried to add

if(!quest::istaskactive(223) && !quest::istaskcompleted(223))

I've added that above the initial hail, and not quite sure how to set that up. I've looked at other code, and they use the taskset along with it, which I don't want to do... Should it be seperate from the event_say section?

Code:

sub EVENT_SAY {
my$war = quest::saylink("war");
my$willing = quest::saylink("willing");
if ($text =~/Hail/i){
quest::say ("Hail, $name! I am here to warn you, the [$war] has spilled over to crushbone."); }

if ($text =~/war/i){
quest::say ("The invador is a Sarnak named Xalgoz who seeks to enslave the orcs. Please I beg of you, help my beloved Emperor Crush.. he has been taken prisoner deep within his castle. There is a scout atop the great pillar, seek him out if you are [$willing]!"); }

if ($text =~/willing/i){
quest::say ("Excellent! Please hurry up, time is most precious!");
quest::assigntask(223);
}
}


sorvani 02-14-2011 06:54 PM

I think (not real strong at quests yet) this is what you want
Code:

sub EVENT_SAY {
my$war = quest::saylink("war");
my$willing = quest::saylink("willing");
if (($text =~/Hail/i) && (!quest::istaskactive(223) && !quest::istaskcompleted(223)){
quest::say ("Hail, $name! I am here to warn you, the [$war] has spilled over to crushbone."); }

if (($text =~/war/i) && (!quest::istaskactive(223) && !quest::istaskcompleted(223)){
quest::say ("The invador is a Sarnak named Xalgoz who seeks to enslave the orcs. Please I beg of you, help my beloved Emperor Crush.. he has been taken prisoner deep within his castle. There is a scout atop the great pillar, seek him out if you are [$willing]!"); }

if (($text =~/willing/i) && (!quest::istaskactive(223) && !quest::istaskcompleted(223)){
quest::say ("Excellent! Please hurry up, time is most precious!");
quest::assigntask(223);
}
}


Expletus 02-14-2011 08:48 PM

Didn't work, gets disabled w/that script. Tried to move some stuff around, unfortunatly i suck at coded (and spelling ha ha)

joligario 02-14-2011 10:04 PM

Could be the my variables are messed up and the parenteses are not matched.

trevius 02-15-2011 04:22 AM

I think this should work:

Code:

sub EVENT_SAY {

        my $war = quest::saylink("war");
        my $willing = quest::saylink("willing");

        if (quest::istaskactive(223) || quest::istaskcompleted(223))
        {
                quest::say("I have already told you all that I can.");
        }
        else
        {
                if ($text =~/Hail/i)
                {
                        quest::say("Hail, $name! I am here to warn you, the [$war] has spilled over to crushbone.");
                }

                if ($text =~/war/i)
                {
                        quest::say("The invador is a Sarnak named Xalgoz who seeks to enslave the orcs. Please I beg of you, help my beloved Emperor Crush.. he has been taken prisoner deep within his castle. There is a scout atop the great pillar, seek him out if you are [$willing]!");
                }

                if ($text =~/willing/i)
                {
                        quest::say("Excellent! Please hurry up, time is most precious!");
                        quest::assigntask(223);
                }
        }

}

Also, if you don't want a task to be repeatable, there is an option to in the DB (or in the Task Master tool) to disable them from being repeatable if you set it.

Expletus 02-15-2011 12:48 PM

Thanks Trev ill check this when I get home. I got the taks down with kls system and the peq editor. I just suck at the quest system and where things go in the script. Task sets I'm sure will be the next issue.

ChaosSlayerZ 02-15-2011 12:56 PM

yeah the Trev's way is how I would do it.
Not tested thought, I don't have access to my tools atm

Expletus 02-15-2011 06:56 PM

worked perfectly! Thank you Trev!

revloc02c 02-16-2011 12:27 AM

My thanks as well.


All times are GMT -4. The time now is 05:54 AM.

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