PDA

View Full Version : Quest from 2012 not working with updated db/source


Astal
06-17-2014, 04:00 PM
Im just wondering if anyone could look over this, I cant test it at the moment cause im waiting to be able to compile zone on my pc and cant do that till i get windows 7.

I know the task numbers are correct for sure. The quest used to work, when i ran my server back in 2012 i know it took a good while to get it working also.

People are saying hail doesnt work on him actually now that i look at it, it would have be because the players task isnt set to 1 correct? If anyone can look it over lemme know k

s#The Hunt For Gollum
sub EVENT_SPAWN {
#initiate progress
$inprogress = 0;
}


sub EVENT_SAY {

#Task 504 The Hunt For Gollum
my $who = quest::saylink("I was sent by Lord Elrond", 0, "who");
my $check = quest::saylink("Ok.", 0, "Check");

if(quest::istaskactive(504)) {

if(quest::istaskactivityactive(504,1)) {

if($text=~/Hail/i && $inprogress == 0) {
quest::say("ughhhhh....who....$who are you?");
}

if($text=~/I was sent by Lord Elrond/i) {
quest::say("I SAW HIM!!...i saw ugghhh Gollum before i was ambushed by orcs. $check in that tower up there.");
}

#when player hits ok, and the quest is not in progress set the quest in progress and spawn gollum
if($text=~/Ok./i && $inprogress == 0) {
quest::say("uuugggghhhhhhhh......");
quest::spawn(999303,0,0,-876.6,350.9,90.3);
$inprogress = 1;
quest::settimer(1, 3600);
$client->Message(315, "You have one hour to complete this quest");
}

#if the player hails and the quest is inprogress tell him
if($text=~/Hail/i && quest::istaskactivityactive(504,0) && $inprogress == 1) {
$client->Message("There is quest in progress, you must wait until its finished");
}

if($text=~/reset gollum quest/i && quest::istaskactivityactive(504,1) && $inprogress == 1) {
$inprogress = 0;
quest::shout2("The Hunt For Gollum Timer Has Been Reset");
}
}
}
}

sub EVENT_TIMER {
$inprogress = 0;
}

demonstar55
06-17-2014, 04:54 PM
VS2010 compile issue should be fixed.

joligario
06-17-2014, 05:23 PM
s#The Hunt For Gollum
This will probably break your script from the get-go.

Some other tid-bits:
$text=~/Ok./i
This will force them to have a period in there to work.

Timers will reset on their own when they hit 0 if you don't stop them.

Astal
06-17-2014, 07:07 PM
lmao i see that, thats why i wanted someone to look at it for me hhahaha ty

and no compile issue is still there