Welcome to AC Web.
Results 1 to 6 of 6

Thread: Zone creating

  1. #1


    Join Date
    Aug 2010
    Location
    Slovak Republic
    Posts
    260

    Zone creating


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Solved
    Last edited by fullhouser; 03-02-2020 at 02:27 PM.

  2. #2
    Quote Originally Posted by fullhouser View Post
    Hello, can I create a custom zone for example in hyjal (not the raid one) which will only be accessible when you have specific item ?
    You can place an Invisible (to players) NPC that checks units entering to his Sight, check if that unit is a player and has the item, otherwise kill him, teleport him.....

  3. #3


    Join Date
    Aug 2010
    Location
    Slovak Republic
    Posts
    260
    Quote Originally Posted by molinita View Post
    You can place an Invisible (to players) NPC that checks units entering to his Sight, check if that unit is a player and has the item, otherwise kill him, teleport him.....
    it's that easy ?

  4. #4
    Would be easier to do and more efficient with areatriggers but seems don't work on 3.3.5 (hardcoded)

    I Guess there is more ways tho,
    You can check for an spell that is only casteable there

  5. #5
    PlayerScript is always an option too

    Code:
    uint32 zone_hyjal = zone_id // (use .gps in-game to find this)
    uint32 area_hyjal = area_id // (use .gps in-game to find this)
    uint32 item = item_id // item.template entry
    uint32 item_amount = quanity // how much of this item required
    
    void OnPlayerUpdateZone(Player * player, uint32 newZone, uint32 newArea)
    {
    	if (newZone = zone_hyjal) || newArea == area_hyjal) // if the zone OR the area is hyjal (really only need one of these)
    	{
    		if (!player->HasItemCount(item, ITEM_AMOUNT)) // if the player does NOT have the item
    		{
    			player->GetSession()->SendAreaTriggerMessage("You need a Hyjal Token to enter this zone!"); // sends message in the middle of players screen
    			player->TeleportTo(mapId, x, y, z, o); // teleports the player to specified coords (use .gps in-game to find this)
    		}
    	}
    }

  6. #6


    Join Date
    Aug 2010
    Location
    Slovak Republic
    Posts
    260

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Quote Originally Posted by Biologicall View Post
    PlayerScript is always an option too

    Code:
    uint32 zone_hyjal = zone_id // (use .gps in-game to find this)
    uint32 area_hyjal = area_id // (use .gps in-game to find this)
    uint32 item = item_id // item.template entry
    uint32 item_amount = quanity // how much of this item required
    
    void OnPlayerUpdateZone(Player * player, uint32 newZone, uint32 newArea)
    {
    	if (newZone = zone_hyjal) || newArea == area_hyjal) // if the zone OR the area is hyjal (really only need one of these)
    	{
    		if (!player->HasItemCount(item, ITEM_AMOUNT)) // if the player does NOT have the item
    		{
    			player->GetSession()->SendAreaTriggerMessage("You need a Hyjal Token to enter this zone!"); // sends message in the middle of players screen
    			player->TeleportTo(mapId, x, y, z, o); // teleports the player to specified coords (use .gps in-game to find this)
    		}
    	}
    }
    thanks

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •