View Full Version : Grumbo'z Mall Warz

03-05-2015, 05:07 PM
Grumbo'z Mall Warz.

Ever wanted the Ally/Horde teams to fight for control over your custom PvP item's mall and its vendors? Or you want to setup a small mall for just your custom PvP items Vendors that the factions must control to use?

Well look no farther.

Now a team must take control of your mall to be able to use the vendors.
this script will start with a neutral flag that the teams must tag. first team to tag the neutral flag will take control of the mall and all its vendors. The flag will re-spawn at the same location. the re-spawned flag will represent the controlling team. i.e. horde/ally. Once the flag has re-spawned the apposing team can attempt to invade and tag the flag to take control of the mall.

Re-spawn time is random and can be adjusted in the script (minimum/maximum).
The supplied Vendor Template by default is non-attackable by using (unit_flags=7).
For attackable vendors set creature_template (unit_flags=0).
Default location: GM Island.

Flag sizes adjusted to fit screen shots.
Neutral Flag:

Alliance Flag:

Horde Flag:

Above you can see how a non-attackable vendor is friendly to Horde and agro to Alliance but wont attack.

Demo video with attackable vendors showing how a vendor changes agro as the controlling team changes:


Some assembly required:
But a fairly simple system to setup. <WIP>

choose your existing mall vendors or create a new set of vendors and set them up in a location that allows pvp between factions or open the location to pvp in the dbc file.
Set vendors `unit_flags` to '0' and they will attack any intruders or '2' so they wont attack intruders.
add the npc id's to the table named `NPC` line 31 in the script. e.g. NPC = {100, 101, 102, 103, 108, 231, 6767};. this script will automaticly adjust the npc's faction based on the controling team.
add the Map,Zone and area ID's to the table `Zone_MALL` entries starting at line 60 in the script along with a name for the mall at line 59.
select a location for you Mall FLag to be spawned (all flags will spawn at the same location). type the command ".store mall flag" to set your mall flags.these flags will despawn but 1 will stay spawned at any time based on the controlling team.

if you ever choose to move this mall delete the 3 gameobject flags before relocating the system.

If your mall covers multiple locations then you can use the `Global` variable to allow this script to control the vendors in the `NPC` table outside the stored location in the table `Zone_MALL` but this will efffect them EVERYWHERE in the realm.

Ownership isn't permanent. a reload/restart will reset the system.

>> Grumbo'z Mall Warz (https://github.com/BlackWolfsDen/Eluna-Grumboz-Mall-Warz.git) <<

Blood and dead bodies NOT included.

!! Yea Noob'z !!
I brought PvP to a

03-14-2015, 04:57 PM
Hi and ty again for this but i have a little bug the flag doesn't respawn after capture gives me this error in log pls some help with this

2015-03-14_13:48:25 ERROR lua_scripts/Grumboz_Mall_Warz.lua:68: calling 'Respawn' on bad self (GameObject expected, got pointer to nonexisting (invalidated) object (userdata). Check your code.)

03-14-2015, 05:19 PM
hmmmm strange. do you get the world announcement when tagged? "The Xteam have claimed the Xname" ?

whats weirder is line 68 :

if(team_id == 1)then return 0; end

step by step how and where did you setup.

also maybe try re-cloning. I have been doing some touchups today.

I tested with Shattrath and set the flags on the second floor. using a horde char I tagged the flag and it announced and later re-spawned wih a spawning annoucement.

did some updating to it , Now it can support the ".reload eluna" command so flags will continue to re-spawn but it will still reset the system.