|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Custom Custom Quests here |

09-13-2008, 12:49 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Still doesn't work for me. I changed what you posted. Hailed the NPC for the flags. It says I got them. Zoned to gukbottom and killed something. All I get is normal xp. Do you have to have aaxp on for the quest to work at all or will it work anyways? On my server all I have is old school eq enabled. No kunark or anything, even if I #lvl myself to 51 it doesn't let me turn aa on. Thats the only thing I can come up with that may be breaking it.
|

09-13-2008, 03:55 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I haven't really messed with default or player.pl files much yet. Maybe try putting the quest directly on a certain NPC and try it that way first.
|

09-13-2008, 11:27 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
I still can't get it to work. I copy and pasted your quest to one zone and made no mods to it at all. I get the flag when I hail an NPC. Then kill the NPC that I have the kill script set too...I get normal xp...so now I'm totally at a loss. All other quests on the server work...it just seems to hate this one haha :(
|
 |
|
 |

09-14-2008, 02:55 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
Man this is about to drive me frikken crazy, I copied your quest directly from this page into a file called a_gnoll.pl in the blackburrow folder. I also have the quest that gives the flags on an NPC. I hail, it says I have the flag. I kill a gnoll...I get normal xp....why does my server hate me :( Can anyone see anything wrong with this script?
Code:
sub EVENT_KILLED_MERIT {
#Checking if the anti-AE global is defined to stop credits from being earned if it is
if (!defined($qglobals{anti_ae})) {
#Optional code to randomly spawn a named NPC when the target dies.
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
my $named = quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50);
if ($named == 50) {
quest::unique_spawn(quest::ChooseRandom(2700667,2700670,2700673,2700676,2700683,2700685),0,0,$x,$y,$z);
$named = undef;}
#Checking if the exp_credit global is defined for this character
if (defined($qglobals{exp_credits})) {
#Making sure the character is not already level 70+
if ($ulevel <= 69) {
#Adding 1 point/credit to the exp_credits global
quest::setglobal("exp_credits", $qglobals{exp_credits}+1, 5, "F");
#Checking the character's level range
if ($ulevel >= 1 && $ulevel <= 55) {
#Variable to define how many exp_credits are needed to level in this level range.
my $exp_req = 24;
if ($qglobals{exp_credits} >= $exp_req) {
quest::level($ulevel+1);
#subtract the actual exp_credits global points. Note that this has to be 1 more than the exp_req global is set to.
quest::setglobal("exp_credits", $qglobals{exp_credits}-25, 5, "F");
}
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
}
#same thing as above, but for the next higher level range
if ($ulevel >= 56 && $ulevel <= 60) {
my $exp_req = 29;
if ($qglobals{exp_credits} >= $exp_req) {
quest::level($ulevel+1);
quest::setglobal("exp_credits", $qglobals{exp_credits}-30, 5, "F");
}
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
}
if ($ulevel >= 61 && $ulevel <= 65) {
my $exp_req = 34;
if ($qglobals{exp_credits} >= $exp_req) {
quest::level($ulevel+1);
quest::setglobal("exp_credits", $qglobals{exp_credits}-35, 5, "F");
}
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
}
if ($ulevel >= 66 && $ulevel <= 69) {
my $exp_req = 39;
if ($qglobals{exp_credits} >= $exp_req) {
quest::level($ulevel+1);
quest::setglobal("exp_credits", $qglobals{exp_credits}-40, 5, "F");
}
my $exp_needed = ($exp_req - $qglobals{exp_credits});
$client->Message(5, "You currently need $exp_needed experience credits for your next level.");
}
}
#If the character is level 70+, delete the exp_credit global for them since it is no longer needed.
if ($ulevel >= 70) {
quest::delglobal("exp_credits");
}
}
#Checking if the new_credits global is defined for this character
if (defined($qglobals{new_credits})) {
#Adding 1 point/credit to the new_credits global
quest::setglobal("new_credits", $qglobals{new_credits}+1, 5, "F");
#Setting the anti_ae global after all credits are applied.
quest::setglobal("anti_ae", 1, 7, "S5");
my $total_credits = ($qglobals{new_credits} + 1);
$client->Message(5, "You currently have $total_credits Credits.");
}
}
}
|
 |
|
 |

09-14-2008, 05:17 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Every NPC that uses qglobals in a script HAS to have the qglobal setting in the NPC_Types table set to 1 (default is 0 which ignores globals completely).
You can set these easily for an entire zone by using GeorgeS NPC Loot Editor and changing 1 of the NPCs to have qglobal set to 1 and then use the field tool menu to "propagate the field" or whatever it is called. That will set all NPCs in the zone to the same setting.
That should resolve your issue.
|

09-15-2008, 12:31 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
I have never messed with global quests so didn't catch that at all. Many thanks Trev, you're the man. Works perfectly after this change.
|

09-15-2008, 12:33 AM
|
Discordant
|
|
Join Date: Jan 2005
Posts: 320
|
|
One more question, and I'm sorry to keep bugging you, but I really do appreciate you helping out. Is there any way to make mobs only within 7 levels give points? Since this is global, it would be way too easy to lvl on my server at like 40 killing in qeynos hills haha.
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:56 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |