New Credit System Using Quest Globals
This is a new system I made for a zone on my server. It isn't too complicated, but it took a little while to figure it all out and get it working. Anyone can use this and adjust it to do whatever they might like. Most of the stuff in it can be removed or changed where needed. There are 3 quest scripts for this system. The first one is the Mob script for the mobs that are killed. The second and is the quest NPC that gives rewards for the credits. And the 3rd is the NPC that gives out the initial globals to the character and explains a little about the zone.
All of the notes in GREEN are only comments and can be removed. I added them for this submission so people could easily see and understand exactly what is being done at each step of the scripts. There are 3 main points to using this system. The first one is to add in a new type of currency that can be used to purchase items or as part of another quest. The second part is to make a new way for characters to level above level 50 at an accelerated rate without having the zone abused for insanely fast AA leveling. The level rate can be adjusted to any rate desired. The 3rd reason is to have a zone that AE groups cannot abuse by using an Anti-AE check. The system can be used as-is or it can be modified however you see fit. I figured it might be useful to someone. And since it is fairly different from anything I have seen, I thought it would make a good quest submission. Here they are: Code:
################################################################### Code:
#################################################################### Code:
#################################################################### |
Thanks for posting this Trev, amazing work on some of the stuff on your server. I may try to use this on mine if I can make it work. Keep up the great work and thanks for sharing so much with the rest of us.
|
Can't seem to get this to work correctly on a global scale. I have it in eqemu/quests/default.pl
I have confirmed that my test char has the flags to get credits in my quest_globals table. When I kill mobs, nothing happens at all, any ideas what I overlooked or did wrong? :( Code:
sub EVENT_KILLED_MERIT { |
First, in order for you to earn credits, you first have to be flagged by the quest NPC for earning credits. The actual kills themselves don't flag you for that, because I didn't want it to do more work for every kill and I also didn't want to risk any possible reset of credits.
So, you need to use one of the other quests I posted here first. Also, for this to work on a global level, you have to edit the option in the globals to 5 instead of 1. So, note the following and see where I marked it in RED: Code:
quest::setglobal("exp_credits", $qglobals{exp_credits}+1, 1, "F"); Code:
quest::setglobal("exp_credits", $qglobals{exp_credits}+1, 5, "F"); |
Awesome Trev. I was trying to work out something like this about 2 weeks ago on my server but couldn't figure out how to make a variable a counter. I kind of gave up on the idea but I might go back and plug this in in my own way. I appreciate the work.
|
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.
|
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.
|
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 :(
|
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 { |
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. |
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.
|
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.
|
You would just need to compare the mob level to the userlevel. So, something like this at the top of the script right below the EVENT_MERIT line should work:
Code:
if($mlevel + 7 >= $ulevel) { Code:
if(($mlevel + 7 >= $ulevel)&&($mlevel - 7 >= $ulevel)) { |
Thanks again Trev, I'll try to leave ya alone for a while now ;p
|
Is there a way to make this work for player kills? I mean, killing players in PVP and having a script that gives them the points as a reward?
|
Since people have been testing my server I have had a few reports of this quest taking points and not giving the item. Every time I test it I get the item though. Anyone see something wrong with this? :(
Code:
sub EVENT_SAY { |
Just thought I would add on to your quest submission Trev just in case this is useful to someone. In this version the quest works on a global level and matches the con system. I'm sure there are better ways to do this, but meh it works.
Code:
sub EVENT_KILLED_MERIT { |
ok I lied, seems like the first if statement works, anyone over that level gets no xp...what did I do wrong?
|
I think there's 2 main issues:
I would highly recommend using tabs (vs spaces) to better visualize the opening & closing brackets: Code:
sub EVENT_KILLED_MERIT { Quote:
There's a lot of things I can think of that would trim the script down a LOT, but I think it would be better to understand where we're trying to get first. |
This is the script that tells mobs to give xp and points on my server. It works in every zone. I am basically trying to make only mobs that do not con green give xp and points.
Only thing in the quest that does not work correctly is all of the nested if statements up top, rest works perfectly. |
Quote:
Code:
if ((($ulevel <= 8) && ($mlevel + 3 >= $ulevel) ) Quote:
I'm not sure if this will actually work (unable to test syntax, etc), but it should work in theory: Code:
sub EVENT_KILLED_MERIT { Code:
sub EVENT_KILLED_MERIT { |
Thanks, for the help Andmetal, here is the working version in case someone could use it. All mobs that are not green will give xp now up to lvl 50. If you use this on a server that goes over 50 you're gonna have to do some testing and add in more levels.
Code:
sub EVENT_KILLED_MERIT { |
All times are GMT -4. The time now is 06:15 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.