PDA

View Full Version : sub EVENT_AGRO_CLEARED


trevius
04-26-2008, 04:10 AM
The idea for this event is to allow for something to happen when an NPC loses agro. I think it could have multiple uses. The reason I thought of it is I would like to reset an event if players lose or if agro is cleared, but I can't find any other way to do it. I thought this could be helpful for anyone writing complex events, but it would probably be used mainly by custom servers.

I have an event that will banish characters away from a named if they haven't started the event. This would allow the event to be reset in the case that players lost the event.

I can probably find other ways to do it, but the best way would be if there was an event that occurred when agro was lost.

KLS
04-26-2008, 04:41 AM
You mean... like EVENT_COMBAT? Or are you looking for something that it can't do?

trevius
04-26-2008, 05:37 AM
Sorry, I am not familiar with that event. What does it do exactly? I have checked the quest lexicon and the wiki here:

http://www.eqemulator.net/wiki/wikka.php?wakka=QuestTutorial

But I didn't see anything that looked like it could do what I wanted. If event_combat will let me do something when the mob leaves combat, then that should work.

I need to have some NPCs set to send a signal to another NPC if they leave combat/lose agro.

KLS
04-26-2008, 06:49 AM
It basically is called when you initiate combat with a npc and leave combat. It exports $combat_state 1 for entering combat 0 for leaving combat. Or at least that is the idea.

cavedude
04-27-2008, 05:37 PM
Updated the wiki to include sub EVENT_COMBAT and the two new events in the new build.

trevius
05-05-2008, 04:56 AM
I finally got around to testing this and it worked just as I needed. I was curious if there was a way to use it to actually reset combat mode on an NPC. Something like this:

If ($signal == 1 ) { quest::combat_state (0); }

If not, no biggie though. I could only think of a few rare cases where that might be useful.

AndMetal
05-05-2008, 05:11 AM
I was curious if there was a way to use it to actually reset combat mode on an NPC.

Wouldn't that be the same as clearing all aggro? If so, you can use this:
$mob->WhipeHateList()

Angelox
05-05-2008, 07:52 AM
There's very little (if anything) that you "can't" do - especially with this emulator. I've always found a way to work around things even if it was not in the source.

A lot of things here are still left undone because some people think "it can't be done", so they went overlooked.

In the past few days I've discovered more about this than I have in the past months. Surprising how much simple stuff is still undone - almost like there was an "alien race" of Devs that were here before, and left all these things they started behind :)

Sakrateri
05-05-2008, 08:58 AM
There was no flash of white light, You do not remember anything of what you just said.

AndMetal
05-05-2008, 03:13 PM
In the past few days I've discovered more about this than I have in the past months. Surprising how much simple stuff is still undone - almost like there was an "alien race" of Devs that were here before, and left all these things they started behind :)

Hence why I've been working on the ST quests quite a bit :-)

Unfortunately, there are some issues I keep running into that mean I'll probably have to redo some of the spawns as "special" spawns for everything to work as intended, which I didn't really want to do.

There was no flash of white light, You do not remember anything of what you just said.

This is completely off topic, but I saw an X-Files movie poster at the movie theater on Saturday :-D
http://ia.media-imdb.com/images/M/MV5BMjEwMjI0OTUzNF5BMl5BanBnXkFtZTcwNTI2NDU2MQ@@._ V1._SY400_SX600_.jpg