PDA

View Full Version : Making Bilge Farfathom rare again


Angelox
07-25-2006, 12:51 PM
This is a bit of a whopper, but it works. I have posted all the PL files here also, for download;
http://www.nahunta.org/~angelox/ Note: you can use these pls as - is, but will have to make the NPC's and replace the NPC id numbers.
Dagnor's Cauldron (PEQ version) still needs a lot of work done - for starters, all the rats, snakes, skeltons are roamers - so are a lot of the goblins. A lot of the mobs roam from the island in the center, to the borders of the lake. The four NPC's at the npc camp you pass as you head for for the zone of unrest, call themselves the "Fabulous Four" one of them will heal you on request (Nyrien Lyrdarniel), and another Sigan Ilbirkun will "escort" you out whan properly asked. All four of them hate rats, snakes, gobbies, etc., and will gang up on them and kill if they cross their camp. A lot of mobs path through the Fab Four camp and get killed, this serves as a "safe zone" for players and helps "throw" the tracker-class pc types.
At one time, Bilge Farfathom and his "Pearl Kedge Totem" were very sought out - in the days when 1k pp meant something, the Totem had a big price tag on it for around 20K. I had a few friends who went on a "get rich fast" quest and thought they were going to drop Bilge quick. Most never even saw him. You could sit there for days, and never see him - usually, when he did show up, it was because people were playing in the zone, and not someone camping him. I camped him like crazy too for days, never saw him - but once passing through, I got him and another time got him just during normal play, when the zone had a lot of players. I think to this day, no one has never really figured out the Bilge Farfathom spawn pattern - they have a good idea where he spawns, but don't know what mob triggers the Bilge spawn.
Anyways, I figure the trigger must be in the water somewhere, as no one ever plays in the water because there's nothing to do there. heres what I did: made a loop of four spawns in the water;
MobA is outside the loop in the gobbie camp by unrest zone he's the loop starter.
(all are Event_Death)
MobA spawns normal off the eqemu / database.
mobA dies and spawns MobB , then flags himself not to spawn anymore npc's in
the loop when he respawns;
#Bilge Farfathom spawn
#npc - #aqua_goblin_mariner - randomly spawns 1 of 4 Bilge triggers around the zone)
#zone - Dagnors Cauldron

sub EVENT_DEATH{
my $a=70060; #npc - an_aqua_goblin_mariner starts the loop
if ($mdied==1){ #mariner died once
#quest::say("I already died once!");
}else{
#quest::say("Starting cycle");
quest::spawn2($a,5,0,-296.37,-122.31,-349.32,122);
$mdied=1; #mark mariner died once
}
}


rest are in the water ad different locations,
MobB is killed and spawns MobC 90%, and 10% Bilge Farfathom.
MobC is killed and spawns MobD 90%, and 10% Bilge Farfathom.
MobD is killed and spawns MobE 90%, and 10% Bilge Farfathom.
MobE is killed and spawns MobB 90%, and 10% Bilge Farfathom; MobE will start
at the top again.

#Bilge Farfathom spawn
#npc - #a_caulderon_rat (trigger for #Bilge_Farfathom 70059)
#zone - Dagnors Cauldron

sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=70059; #Bilge
my $b=70062; #npc - #an_undertow_skeleton
if($random_result<90){
quest::spawn2($b,6,0,-974.5,436.4,-343.8,29);
#quest::say("spawn skele");
}else{
#quest::say("Spawning Bilge Farfathom");
quest::spawn2($a,4,0,-1123.30,-1194.57,-98.32,122);
};
};



#Bilge Farfathom spawn
#npc - #an_undertow_skeleton (trigger for Bilge)
#zone - Dagnors Cauldron

sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=70059; #Bilge
my $b=70060; #npc - an_aqua_goblin_mariner
if($random_result<90){
quest::spawn2($b,6,0,-974.5,436.4,-343.8,29);
#quest::say("spawn mariner");
}else{
#quest::say("Spawning Bilge Farfathom");
quest::spawn2($a,4,0,-1123.30,-1194.57,-98.32,122);
};
};

#Bilge Farfathom spawn
#npc - an_aqua_goblin_mariner (trigger for #Bilge_Farfathom 70059)
#zone - Dagnors Cauldron

sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=70059; #Bilge
my $b=70061; #npc - #aqua_goblin_shaman
if($random_result<90){
quest::spawn2($b,6,0,-974.5,436.4,-343.8,29);
#quest::say("spawn shaman");
}else{
#quest::say("Spawning Bilge Farfathom");
quest::spawn2($a,4,0,-1123.30,-1194.57,-98.32,122);
};
};

#Bilge Farfathom spawn
#npc - #aqua_goblin_shaman (trigger for #Bilge_Farfathom 70059)
#zone - Dagnors Cauldron

sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=70059; #Bilge
my $b=70063; #npc - #a_cauldron_rat
if($random_result<90){
quest::spawn2($b,6,0,-974.5,436.4,-343.8,29);
#quest::say("spawn rat");
}else{
#quest::say("Spawning Bilge Farfathom");
quest::spawn2($a,4,0,-1123.30,-1194.57,-98.32,122);
};
};

If Bilge Farfathom happens to spawn, The loop will go on hold tell he dies -
when he dies, he restarts the loop with a 25% chance to any one of the four
above to spawn;

#Bilge Farfathom spawn
#npc - #Bilge_Farfathom - randomly spawns 1 of 4 Bilge triggers around the zone)
#zone - Dagnors Cauldron
#Angelox

sub EVENT_DEATH{
my $random_result = int(rand(100));
my $a=70060; #npc - an_aqua_goblin_mariner
my $b=70062; #npc - #an_undertow_skeleton
my $c=70061; #npc - #aqua_goblin_shaman
my $d=70063; #npc - #a_cauldron_rat
if($random_result<25){
#quest::say("Spawning mariner trigger1");
quest::spawn2($a,5,0,-296.37,-122.31,-349.32,122);
}elsif(($random_result>=25) && ($random_result<50)){
#quest::say("Spawning skeleton trigger2");
quest::spawn2($b,6,0,-974.5,436.4,-343.8,29);
}elsif(($random_result>=50) && ($random_result<75)){
#quest::say("Spawning shaman trigger3");
quest::spawn2($c,7,0,-848.3,-184.8,216.3,37.3);
}else{
#quest::say("Spawning rat trigger4");
quest::spawn2($d,8,0,612.6,625.2,209.0,175.6);
};
};

Also, you need to make the "Fab Four" group work, so they kill roamers and help keep the cycle covered, If you do, I could use the PLs you make too.
You'll notice that all these spawns eventually end up at the NPC camp, and should get killed.

Angelox
07-25-2006, 01:00 PM
Here's a problem I have; I would like to use variables across npc's. Another words - if npcid 1 raises a flag,a different npcid 2 can change or lower it.
I spent two days on just this problem, and none of the quest::* helped either. I don't think it can be done, if anyone does happen to know a way, please post.

bobbydole
07-26-2006, 04:27 AM
I've never used it but can you use
==========
Setglobal:
==========
[old quest format]
setglobal([varname],[value],[options],[duration]);

[perl format]
quest::setglobal([varname],[value],[options],[duration]); (perl format)

The setglobal command allows you to create or modify an existing global variable for the mob you are using the command on.

==========
targlobal:
==========
[old quest format]
targlobal([varname],[value],[duration],[npcid],[charid],[zoneid]);

[perl format]
quest::targlobal([varname],[value],[duration],[npcid],[charid],[zoneid]);

This is a way to "stick" a global variable to a mob. A quick and easy way to give information to a mob or communicate.

==========
delglobal:
==========
[old quest format]
delglobal([varname]);

[perl format]
quest::delglobal([varname]);

This command is used to delete global variables when they are no longer needed. You can only delete global variables that belong to the mob the variable is for.

read more about it here:
http://www.projecteq.net/phpBB2/viewtopic.php?t=149

Angelox
07-26-2006, 05:54 AM
I've never used it but can you use

read more about it here:
http://www.projecteq.net/phpBB2/viewtopic.php?t=149

Thanks for your help, I've already tried all this with negative results ;

quest::setglobal is npc specific - If I try make two variables of the same name with different npc's, the database will add the two enties separatly and for the individual npc ids who made them.

quest::targlobal might have been intended to change another NPC's variable value, but all it does is crash the zone. If I use it on the same NPC that made the variable, it will work ok.

quest::delglobal seems to work ok, but useless to me, since the latter two can not apply

I have more success with "global quests" switched off and the regular Perl variables.

It appears these commands are more intented for the many quests in EQ, that require dealing with one npc at a time.

It would be helpful to be able to set a "global" variable that could be use by any npc in the game.

ylosh
07-26-2006, 06:54 AM
that's exactly what quest::setglobal() does with the different option sets.


+--------+---------+---------+----------+
| value | npcid | player | zone |
+--------+---------+---------+----------+
| 0 | this | this | this |
| 1 | all | this | this |
| 2 | this | all | this |
| 3 | all | all | this |
| 4 | this | this | all |
| 5 | all | this | all |
| 6 | this | all | all |
| 7 | all | all | all |
+--------+---------+---------+----------+

Angelox
07-26-2006, 07:37 AM
I see now, haven't tried it in that way - I'll try again, thanks

Angelox
10-15-2006, 01:18 PM
I'm working on the .pl's for the "Fabulous Four" in this zone, I already have them chatting and doing a few things - I still have to figure out how to get Mr Sigan to kill roamers that pass through the camp. In fact, when EQ was young, all four of them would kill roamers. If anyone knows how to do this, please post.
If anyone wonders how I get info for these PLs, I still have an account with EQ, which I use for stuff like this. I also go to allakhazam and see what I can find there. I think this method is almost 100% accurate.
You can get the quests at my web page.

mattmeck
10-15-2006, 01:20 PM
You can have him kill the mobs by using factions, just make them KOS to him.

Angelox
10-16-2006, 11:14 PM
You can have him kill the mobs by using factions, just make them KOS to him.
I've looked and set the factions to what I think would work, but still nothing. Is there any other special setting I need to make so he will see they are KOS?

John Adams
10-17-2006, 12:19 AM
Not only his faction, but did you set how he reacts to opposing factions? Attack, Assist, Neutral?

Aramid
10-17-2006, 12:47 AM
I've looked and set the factions to what I think would work, but still nothing. Is there any other special setting I need to make so he will see they are KOS?

Did you set the 'NPC Aggro' flag?

Angelox
10-17-2006, 12:52 AM
Not only his faction, but did you set how he reacts to opposing factions? Attack, Assist, Neutral?

Thanks, I see now where my mistake is ; But If I make the changes, would this apply to all the NPC's using that faction? or should I just make a new faction for NPC's that will attack other NPC's?

Angelox
10-17-2006, 12:54 AM
Did you set the 'NPC Aggro' flag?

Thanks for your help-
If you mean npc_aggro, yes

John Adams
10-17-2006, 12:57 AM
The data you are changing is in a tabled called npc_faction_entries.

Columns: npc_faction_id | faction_id | value | npc_value
Data: 4 | 106 | -30 | -1

That last bit, npc_value, is the NPCs aggro flad Aramid mentioned. It does look like it might effect all NPCs in that faction, but you can make a custom version of that faction for your NPC/Group that's tied to the base (faction_id). I think. It's early. And I have a 40 mi drive ahead of me. I'll check back later.

Angelox
10-17-2006, 01:21 AM
The data you are changing is in a tabled called npc_faction_entries.

Columns: npc_faction_id | faction_id | value | npc_value
Data: 4 | 106 | -30 | -1

That last bit, npc_value, is the NPCs aggro flad Aramid mentioned. It does look like it might effect all NPCs in that faction, but you can make a custom version of that faction for your NPC/Group that's tied to the base (faction_id). I think. It's early. And I have a 40 mi drive ahead of me. I'll check back later.

In this case, here in Cauldron, there's a "double" reason for these npc's to kill roamers; one is, it's a place for players to hang out for protection; I'm not finished with Cauldron yet, but the true Dagnor's Cauldron has 90% of the mobs roaming, and can be real dangerous to a new player - the Fab4 camp can be a real safe-haven, if you're playing "straight".
And there's also the issue with Bilge Farfathom spawn: his placeholder eventually ends up in the Fab4 camp and gets killed (so does Bilge, if he spawns and no one takes him). This effect increases the Bilge mystery, as he will appear out of nowhere and no one need really be camping him.

Angelox
10-17-2006, 05:51 AM
The data you are changing is in a tabled called npc_faction_entries.

Columns: npc_faction_id | faction_id | value | npc_value
Data: 4 | 106 | -30 | -1

That last bit, npc_value, is the NPCs aggro flad Aramid mentioned. It does look like it might effect all NPCs in that faction, but you can make a custom version of that faction for your NPC/Group that's tied to the base (faction_id). I think. It's early. And I have a 40 mi drive ahead of me. I'll check back later.
well, nothing seems to work for me atm - which leads me to a question; does anyone know of any guards or any npc that kills roamers? I could use that as a template, or maybe it just doesn't work?

John Adams
10-17-2006, 07:02 AM
Have you checked how city guards do it? Or those Freeport guards out in WC? If they do... I do not recall.

bufferofnewbies
10-17-2006, 10:17 AM
This is how i set a faction to kos to a group of npcs.
Kind of a rough work around on some parts.
Note: I use dark rogue's database editor also. I am certain there is an easier way of doing this, but as I am still in the baby steps phase of dbase moding: this is how i do it.

If you dont have any NPC ID numbers, start here to find them:

1. Go to your database, in faction_list, find the name of the factions you want from Name field. (Note: you need at least 2 values here: One of the creature to react to, and one of the creature that is reacting)
2. In Dark Rogue's Database editor: Goto Tools, Faction Table editor, edit faction table
3. Type faction name (from step 1) into the search, and select the appropriate one (if more than one is similar)
4. This will show you their Primary_Faction_ID.
5. Right click in the center area to add the faction name (from faction_list: step 1 again) of the npcs you want to react to. This won't accept a 0 value for now, but we will correct that so you dont actually get a faction hit later.
6. Save this after changes are added.
7. Any npc with this faction will be listed in Table_ID number (under NPC_factions in dBase)
8. Goto Tools, NPC editor, edit npcs (in dark rogue dbase editor)
9. Type in the name of the npc you want to add to this faction.
10. Goto Tables fields at the bottom, add the faction ID(from step 4) to this npc.

If you have the ID numbers for both the creature you are changing and the creature you are reacting to: Start here

11. Goto dbase, NPC_faction_entries (right click on this and chose to open with a larger number than default or you might not see what you need: select something like 50000 to see them all *no idea what the limit is.. so i pick a BIG number to make sure*) -- this may take awhile to finish loading.
12. npc_faction_id actually the Table_ID number (from step 7 above). -- this will change for all the npcs associated with this number, not just a single npc. (example: this is the faction ID of the guards outside Qeynos that just wait for the gnoll pups to get too close)
13. faction_id in the second column is the npcs this first value will react to. (example: this is the gnoll pup that the guard swings at when it hits the gate)
14. Find the npc_faction_id of the creature you want to change, then find the faction_id that is associated with the npc_faction_id of the creature you want it to react to. (example: make sure you are looking at the gnoll pups in the section associated with the Qeynos Guards)
15. If you dont want a faction hit to show. Set value = 0. (This is the 3rd field in this table)
16. set npc_value to -1 if you want the creature to attack, set to 1 if you want them to assist that faction_id. (This is the 4th field of the table)

I hope that was what you were asking for. If not, please ignore me. If it is, then Im certain someone can trim that down alot to a more useable list.

Angelox
10-17-2006, 01:23 PM
This is how i set a faction to kos to a group of npcs.
Kind of a rough work around on some parts.
Note: I use dark rogue's database editor also. I am certain there is an easier way of doing this, but as I am still in the baby steps phase of dbase moding: this is how i do it.

If you dont have any NPC ID numbers, start here to find them:

1. Go to your database, in faction_list, find the name of the factions you want from Name field. (Note: you need at least 2 values here: One of the creature to react to, and one of the creature that is reacting)
2. In Dark Rogue's Database editor: Goto Tools, Faction Table editor, edit faction table
3. Type faction name (from step 1) into the search, and select the appropriate one (if more than one is similar)
4. This will show you their Primary_Faction_ID.
5. Right click in the center area to add the faction name (from faction_list: step 1 again) of the npcs you want to react to. This won't accept a 0 value for now, but we will correct that so you dont actually get a faction hit later.
6. Save this after changes are added.
7. Any npc with this faction will be listed in Table_ID number (under NPC_factions in dBase)
8. Goto Tools, NPC editor, edit npcs (in dark rogue dbase editor)
9. Type in the name of the npc you want to add to this faction.
10. Goto Tables fields at the bottom, add the faction ID(from step 4) to this npc.

If you have the ID numbers for both the creature you are changing and the creature you are reacting to: Start here

11. Goto dbase, NPC_faction_entries (right click on this and chose to open with a larger number than default or you might not see what you need: select something like 50000 to see them all *no idea what the limit is.. so i pick a BIG number to make sure*) -- this may take awhile to finish loading.
12. npc_faction_id actually the Table_ID number (from step 7 above). -- this will change for all the npcs associated with this number, not just a single npc. (example: this is the faction ID of the guards outside Qeynos that just wait for the gnoll pups to get too close)
13. faction_id in the second column is the npcs this first value will react to. (example: this is the gnoll pup that the guard swings at when it hits the gate)
14. Find the npc_faction_id of the creature you want to change, then find the faction_id that is associated with the npc_faction_id of the creature you want it to react to. (example: make sure you are looking at the gnoll pups in the section associated with the Qeynos Guards)
15. If you dont want a faction hit to show. Set value = 0. (This is the 3rd field in this table)
16. set npc_value to -1 if you want the creature to attack, set to 1 if you want them to assist that faction_id. (This is the 4th field of the table)

I hope that was what you were asking for. If not, please ignore me. If it is, then Im certain someone can trim that down alot to a more useable list.

This is what I was looking for - I'm working on understanding the whole deal though. Thanks for the help :)

GeorgeS
10-17-2006, 01:36 PM
Good explanation, I think I may have to add this capability to my editor...


GeorgeS

bufferofnewbies
10-17-2006, 05:21 PM
oh btw. One major setback to this might be the fact that most mobs are not setup on a faction in DC (at least on my server atm). Most of your time will be spent makeing sure all roamers are actually set to a faction before you can set them to be kos to the Fab Four. That's the real reason I kept the first part of my text in there, if your dBase is anything like mine you will be busy.

I LOVE ordered chaos!
:roll:

Oh george, if you do add this in, could I beg a favor? Make it so a value of 0 can be set to faction levels. It's a real timekiller to have to go back into the dBase atm and reset all my 'fake faction hits' to 0 there. I use 123 as mine, so i can see them quickly now but it sure does slow down my faction work.

/salute

Angelox
10-17-2006, 10:52 PM
What I have in mind is to set up a new, server-wide "mob-killer" faction. This could be used as a temporary solution, until, or if I decide to go back and fine tune factions. I say "server wide" , so I can apply it in any zone when needed. Factions aside, the zone just doesn't look or feel right with out these features, and here I am 2 days later, looking for a solution to this
Do you think this can be done?
.

Aramid
10-18-2006, 12:20 AM
What I have in mind is to set up a new, server-wide "mob-killer" faction. This could be used as a temporary solution, until, or if I decide to go back and fine tune factions. I say "server wide" , so I can apply it in any zone when needed. Factions aside, the zone just doesn't look or feel right with out these features, and here I am 2 days later, looking for a solution to this
Do you think this can be done?
.

If you look at West Freport, there is a faction called 'Noobie Monster KOS to Guards'. These are setup on the Guards as aggressive and on mobs such as snakes, beetles, rats etc... as their primary faction. This makes the guards attack them when they are in range. Now, they also kill the Orcs, but that because those individual factions are setup.

You HAVE this as I am using your database and the PEQ Editor and it's all already in there.

So, I think if you just use that as a Template, you'll have what you need, but it may take more than just ONE Faction to get it to work as you need it too, unless you can identitfy which mobs will actually wander thru the Fab Four's camp based on the existing pathing setup and give them your Server Wide faction providing they aren't needed for anything else, like the noobie mobs.

Angelox
10-18-2006, 01:59 AM
I finally figured it out, it was too easy , I just always do things the "hard way". Thanks for all your help, I wouldn't have been able with out it.

Angelox
10-19-2006, 01:18 PM
I've been reading around and also remembering, and in the original Fab 4 camp, all NPC's attack roamers. I was thinking to set this, but I noticed that when two of the Fab4 npcs fight the same mob and after it's killed, they then proceed to fight each other.
Would this be a bug or is there something else I need to change?

bufferofnewbies
10-19-2006, 01:20 PM
make sure you have their 'assist' set for +1 and not -1, and also that they are not useing AE spells.

btw: i first noticed the assist agro problem when I was testing some coding outside CT. The lizards that spawn out there would hit others with the AE and if i backed up.. they would start in-fighting. I had to go and remove some AEs from the caster spell lists. (as well as that damned Flash of light line.. I never liked how it blanked out the whole screen) ahh, but not this is just me rambling..

Angelox
10-19-2006, 02:04 PM
make sure you have their 'assist' set for +1 and not -1, and also that they are not useing AE spells.

btw: i first noticed the assist agro problem when I was testing some coding outside CT. The lizards that spawn out there would hit others with the AE and if i backed up.. they would start in-fighting. I had to go and remove some AEs from the caster spell lists. (as well as that damned Flash of light line.. I never liked how it blanked out the whole screen) ahh, but not this is just me rambling..

Thanks, this was the problem - there is a cleric, wizard, ranger in the group - I removed their spells just to see, and they stopped fighing each other. In the morning, I'll make some new spell sets, special for these situations.

bufferofnewbies
10-19-2006, 02:16 PM
I'd honestly prefer to see some coding changes that allow a caster's AE spells/ song to ignore any npc above indifferent con. That would prevent alot of 'side agro' issues across the board.

But as it isnt live-like. I don't expect it to be done without doing it myself.
And I code like a one eyed man playing darts.

fathernitwit
10-21-2006, 05:20 PM
will one of you please put a reasonable guide to NPC guard-style aggro up on the wiki as this thread will get lost.

Angelox
10-22-2006, 01:13 AM
will one of you please put a reasonable guide to NPC guard-style aggro up on the wiki as this thread will get lost.
Here's one problem I found with the guards and aggro, And have been trying to find a "work- around" for it;
Guard Brookrock says 'For the defense of Kelethin!!'
Guard Brookrock says 'For the protection of all Fier'Dal, there shall be no mercy for your kind.
that was the Gfay guards quote when they kill off mobs for you.

And this,
"It's bashing time!!"
is a quote from Sigan Ilbirku at Cauldron, as he kills off a mob for you.

Well, Sigan's attach quote works fine, but the guards in GFay remain silent - I tried everything (EVENT_ATTACK, EVENT_AGRRO, EVENT_SLAY) with the same results. I realized the the NPC will not say anything, unless you hit him first. In Dagnors, Sigan always has to fight it out a while, so they hit back and we get the "It's bashing time!!" text. But with the guards, they kill so fast, the mob never hits back, so they never say anything. I guess EVENT_SLAY is for when a PC dies and not an NPC, because it didn't work either. If I'm right and there is no method for an NPC to quote when he attacks, then it would be nice to have one of these events fixed (in the code) to that. for example EVENT_SLAY could apply to PC's and NPC's, or EVENT_AGGRO could add on when the Guard goes to help a PC.
I've been thinking of a way to get the guards to talk in a situation like that but so far, haven't been able to.


If someone would wiki - post anything that's worth while from me, I would appreciate it - My problem with doing this is my health; I'm cursed with arthritis, and try to avoid sitting/typing over long periods of time - which I do anyways, but Wiki would just add to sitting time.

fathernitwit
10-22-2006, 02:37 AM
we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.

as im looking at EVENT_ATTACK, the code is only doing it when the NPC is attacked, as you stated. Im almost wondering if that functionality mihgt be useful to somebody sometime... so im thinking about adding an EVENT_COMBAT which would trigger when an NPC starts "combat" mode, which would be defined as somebody attacking the NPC, or being attacked by the NPC in any manner, or the NPC having somebody on their hate list (in case they are running away or something), and would wear off like 12 seconds after neither of those actions were true... what do you think?

Angelox
10-22-2006, 03:08 AM
we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.
This is nice - I'm working off an old Lexicon manual, this wasn't there at they time it was made I guess. I'll try it out in a while.

as im looking at EVENT_ATTACK, the code is only doing it when the NPC is attacked, as you stated. Im almost wondering if that functionality mihgt be useful to somebody sometime... so im thinking about adding an EVENT_COMBAT which would trigger when an NPC starts "combat" mode, which would be defined as somebody attacking the NPC, or being attacked by the NPC in any manner, or the NPC having somebody on their hate list (in case they are running away or something), and would wear off like 12 seconds after neither of those actions were true... what do you think?
This would be a great idea - In my case EVENT_NPC_SLAY is a solution, but the real answer would be something like EVENT_COMBAT.

Also, while working on big events I noticed I couldn't get the mob to make a zone wide "ooc" or emote. example;
# Raid event for #Garudon (109107)
# Angelox


sub EVENT_SAY {
if($text=~/Hail/i){
quest::say("Traveler, you must help me. I have been tortured in this city for generations. The mark of Kylong adorns the walls of the theater that houses my remains. These markings are preventing me from passing into the theater and rejoining with my body so that I may pass on in peace. If you can reclaim four samples and return them to me, it may be enough to draw power from. With this power I will pass into the theater and rejoin my body and rest in peace. You do this for me, the torture of eternal capture is more than I can bear.");
}
}

sub EVENT_ITEM {
if ($itemcount{65574} == 4){
quest::spawn2(109107,0,0,-142.884,-120.265,18.226,189.875);
quest::me("As you place the remains of the dragon on the ground, a cold draft fills the air. Suddenly in a great vortex, the bones begin to rise up and move carried by the wind. They jut through the air and come down inside of the nearby theater. You hear the faint sound of bones clanking together, which is then followed by a massive moan. A sharp bolt of fear trickles up your spine as you feel anticipation fill the air.");
quest::depop();
}
}

# EOF zone: Veksar NPCs:#Garudon (109107)



I was hoping for the quest::me to go out zone wide, but it stays as a "say". Again, I tried the other commands i found in the Lexicon, but I guess it's outdated and maybe theres something I can use?

Angelox
10-22-2006, 04:49 AM
we added EVENT_NPC_SLAY a while back for when an NPC kills another NPC, so that would prolly cut it.

I tried this, and it doesn't seem to work either - anyone have any luck with this?

Angelox
10-22-2006, 01:32 PM
Sooo... anyways, heres' what I have come to realize about the Perl quests;
They are all PC, NPC inclined - anotherwords, you are doing interaction as a PC to an NPC or vice-versa, all will work fine. but if you want NPC's to inter-act with each other, then the "little problems" start.
Some of the stuff does not work as intended; for example "sub EVENT_NPC_SLAY" does not work as I thought it would(at least for me).
I've been reading fathernitwit's WIKI on this (yess, I found it!)
I think a working command for npc to npc inter-action (maybe with some options) is needed, as even little things like guards killing noobie mobs and saying text, help the EqEmu to look more "EQ-live like" . But, if not, I finally landed a solution;
#npc - Orc Death
#zone - Gfaydark
#by Angelox

sub EVENT_DEATH {
my $a = $name;
if ($a =~ /Fireblight/i){
quest::signal(54099,1);
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Rainstrider/i){
quest::signal(54098,1);
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Brookrock/i){
quest::signal(54124,1);
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Pineshade/i){
quest::signal(54118,1);
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}elsif($a =~ /Fayfear/i){
quest::signal(54096,1);
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}else{
quest::say("You shall have all the Crushbone orc legions on your tail for my death!!");
}
}
And the guards;
#npc - Gfaydark Guard Protectors
#zone - Gfaydark
#by Angelox

sub EVENT_SIGNAL {
quest::say("For the defense of Kelethin!!");
quest::say("For the protection of all Fier'Dal, there shall be no mercy for your kind.");
}

sub EVENT_ATTACK {
quest::say("For the defense of Kelethin!!");
quest::say("For the protection of all Fier'Dal, there shall be no mercy for your kind.");
}

If you use these codes and make pl's for each guard at the three lifts, it will work. But you would need to make "signal" scripts for bats and what ever else the guards kill.
I'll have them all made up in a day or two.

$mobid would have been better, but for some reason, it would return a strange three digit number, that would not relate to the attacker-guard. $name returns the spawn2 npc name, and I can get some relationship to the guard there.

The only problem I have with these scripts is, the text comes out in this order;

orc pawn says 'You shall have all the Crushbone orc legions on your tail for my death!

Guard Brookrock says 'For the defense of Kelethin!!'
Guard Brookrock says 'For the protection of all Fier'Dal, there shall be no mercy for your kind.'

It should come out with the guards first;

Guard Brookrock says 'For the defense of Kelethin!!'
Guard Brookrock says 'For the protection of all Fier'Dal, there shall be no mercy for your kind.'

orc pawn says 'You shall have all the Crushbone orc legions on your tail for my death!

Minor problem, but it bugs me, and really is not like it should be - if someone already knows how to put in a delay of a few seconds before the orc says, please save me some headache and post.

Angelox
10-23-2006, 02:48 AM
Snip from the latest binary release;

==10/22/2006
FatherNitwit: added EVENT_COMBAT triggered when an NPC engages any form of
FatherNitwit: combat and when combat is over. $combat_state signals which.
FatherNitwit: Hopefully fixed d_meele_texture
FatherNitwit: Cleaned up a lot of const related issues (attrs, AAs, and more)
FatherNitwit: Moved a lot of NPC specific stuff from Mob into NPC
FatherNitwit: Reworked special attacks a bit (monk, kick, backstab):
FatherNitwit: they now use the standard combat hit chance forumals based on offense/defense instead of always hitting
FatherNitwit: they are now subject to damage avoidance (parry, riposte, etc.) like normal attacks

I can't wait to try this one out!