Tally count w 2 zone pop-up?
I'm looking to create a script that keeps tally of 2 races. Gnolls and orcs. I want it to pop-up a count of gnoll/orc deaths every time one is killed and broadcast either globally or in 2 specified zones. I'm not gonna be picky, so if it is a combined script that works to. Also was hoping their was a way to keep track of player records as far as who killed the most gnolls/orcs. Any help or direction would be appreciated.
|
This is what Ive got so far, however the $counts do not show in the emote...
Code:
sub EVENT_DEATH_COMPLETE{ Code:
sub EVENT_DEATH_COMPLETE{ |
Nevermind I just realized I never turned on the mobs Qglobals so of course the count would not exceed 1. Also the counter started working after I did that. Im curious as to if I put this in the player.pl and set a range of npc ID's if this would work for every orc death, and does anyone know of an easy way to do that rather than add 200 id's individually?
|
Why not just add a small script to the orc/gnoll death that increments the counter?
|
It does increment the counter with every death. I was hoping there was an easy way within the player.pl to do a sub EVENT_DEATH_COMPLETE if death is between npc id 58000 and 58100 then add 1 global. This would be the zones player pl and not the global one. Would be kinda neat to add a "-" hit to any death that is NOT an NPC death, just to keep it more competitive
|
Code:
sub EVENT_KILLED_MERIT Code:
$killed |
Yeah, there's probably a global event you could use that provides the npc that was killed. Then you could just: (pseudo-code, not actual Perl)
Code:
if ($npc->GetRace() == 458) { Not sure which event would work best, though, that would provide the $npc and $client that killed 'em. Maybe someone else can chime in. |
right now I have it tied to an orc centurion (58000.pl) and the script is functional and working as intended, but rather than have 100 different PL's for all the npc id's id like to know if there was a way to make it easier... one script that accounts for all the orcs in thus said zone, crushbone.
I do like the one you posted Shen that would work awesomely in a mixed race zone or in the global PL to account for all orcs not just specified zones.. Ghanja I wouldn't know how to incorporate what you posted into a script and have it be functional... im still a newb when it comes to this stuff. |
If you want to separate out tallies by zone, you just use a different setting in the qglobal. :) You could still have the tally logic in one single global place.
Could even tally separately by other things, like whether the npc's name starts with # to indicate a named or something. |
Yea that tally system is currently working in both zones, im just trying to figure out how to simplify this down to one script per zone. For instance, I don't want to have a 58001.pl, 58002.pl 58003.pl etc etc for every single mob in the zone... im wondering if there is a better place or better way to handle this... I tried adding it in the player.pl I created for the zone, all I need now is the proper coding. so that when a orc dies the counter goes up, when a player dies counter goes against it.... ill post what I have in a second.
|
Code:
sub EVENT_DEATH_COMPLETE{ |
If you want it triggering off NPC's in the zone.
Run it off the default.pl That runs the code on every NPC in zone that doesn't have a specific .pl file You don't need to set the global to a client, just use a type 7 global on the NPC that will save it across all zones and can be accessed by anything. |
And if you change the qglobal's type to 3 instead of 7, it'll track the tallies separately for each zone the script runs in.
http://wiki.eqemulator.org/p?How_To_Use_Quest_Globals |
I saved it to "default.pl" and threw all the other scripts for the zone into a folder. It will not work now. Do you have an example of how to set a global w.o assigning it to a client by any chance?
|
default.pl has to be in EQEmuServer\quests. Setting the qglobal type to 7 (as you have it) and to 3 both set it for all clients and not just the one that triggered the event.
Check out that wiki page on qglobals and this one on quests in general: http://wiki.eqemulator.org/p?Ultimate_Perl_Reference |
All times are GMT -4. The time now is 11:55 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.