In lua they have the OnEnterArea activation stuff but for some reason even after searching in the Lua engine i could not find out how to do do this
can anyone explain it to me or give me an example
In lua they have the OnEnterArea activation stuff but for some reason even after searching in the Lua engine i could not find out how to do do this
can anyone explain it to me or give me an example
Lunar Gaming - Reaching For The Stars
this might have some errors in it since I did this out of the top of my head. just ask and i'll check them laterCode:void example(Player * plr) { if (plr->GetMapId() == 1) // for mapid 1 { // do stuff here } } void Setupexample(ScriptMgr * mgr) { mgr->register_hook(SERVER_HOOK_EVENT_ON_ZONE, (void*)example); }
also it might be that the function is called GetZoneId instead of GetMapId
but overall it should work
Last edited by Aznex; 02-01-2009 at 01:50 PM.
that could work possibly but im trying to make it work for on enter area of a monster
Lunar Gaming - Reaching For The Stars
your understanding wrong lol......
i want it when the player enters the creatures area like the lua event OnEnterArea
Lunar Gaming - Reaching For The Stars
probably within like 50 yards
Lunar Gaming - Reaching For The Stars
you could probably use something like
pCreature->GetPositionX()
get pos y, get pos z and get map id and then expand that area by the amount u want and then check if a player enters that certain area by using while loops
but i'm not totally sure about that. AFK now tho but u can play around with it =]
k thanks for the helps +Rep
Lunar Gaming - Reaching For The Stars
Look in scriptmgr, (header file most likely) it should have all of the server hooks there.
I live in a shoe
i think i got it sorta?? i used the old ascent announce script where it checks if your in range and i made a small system of checks to make sure it doesn't over do anything but thanks for the help guys
Lunar Gaming - Reaching For The Stars