View Full Version : [SOLVED] [HELP] Custom Restricted Flight Area

12-04-2013, 05:44 PM
Hello everyone.

There are some zones that have a "Restricted Flight Area", which I want to custom into an already made zone, e.g.
Gurubashi arena Pit, so that when you enter the pit you get dropped off the mount and not being able to ride it again.

I thought of 2 possible ways, but i'm very unsure of them:

Add a custom entry to a possible DB file that includes the zones and their functions
Make the Free For All area (the pit) automaticly cast this SPELL (http://www.wowhead.com/spell=58600/) when you step in

I'd be greatful if anyone knows a possible working way of this.
Let me know if i'm missing any vital extra details.

Kind Regards,

12-04-2013, 05:59 PM
I wrote this in another thread, but it is here to help again:

newZone doesn't have to be used if you don't want it to be used.
newArea is what you're wanting though, so it is limited to that. I edited it to give more examples of more than just one area. The code is pretty straight forward and isn't difficult to understand.

class zone_teleport : public PlayerScript
zone_teleport() : PlayerScript("zone_teleport") { }

void OnUpdateZone(Player* player, uint32 newZone, uint32 newArea)
if (newArea == 3000 || newArea == 200) // Change to your areaId
player->CastSpell(player, 58600); // Restricted Flight
player->GetSession()->SendNotification("You aren't allowed to fly here!");

12-04-2013, 06:15 PM
Pardon me but, where do i include this? I must admit that i'm not that experienced with scripts.
Thank you for your fast and efficient solution though!

EDIT: I've found it. Thanks again for the code

12-04-2013, 06:29 PM
it is a c++ script.


Bah after i posted i seen your edit. Oh well.