Hi Emudevs, this is my first script and my first own idea. (I'm learning C++ and i know my code can be optimized but i want to share)
I just did this because i want the players can do Raid/Dungeons between factions without:
- Use at_login Change Faction (and because if you use it then the players will need to buy and relog everytime they want to play with other facction)
- Use ALLOW_TWO_SIDE_INTERACTION_GROUP (because some Dungeons and raids has no support for this)
And because i want to learn more.
What the script does?
When you use the item change your facction to the enemy faction and apply an aura (Horde Flag - Alliance Flag) to recognize who players has the item.
The item has duration of 1 Hour (you can change this on your DB -> item_template -> duration -> put in seconds), players can not delet the item and when item expire they will be teleport to the zone you define here:
And remove aura and restore faction.
// Define la zona donde el jugador sera teletransportado si -> el Item expira o esta en una zona restringida
// Define your zone to player will be teleported if -> Item expire or is in restricted zone
// value: MapId, X, Y, Z, Orientation
#define zone 1, -8531.564f, 2010.638f, 100.7205f, 0.380013f
So here is: (The script has Spanish and english Announce for the players so if you want any one just comment and uncomment)
http://pastebin.com/kGCj2ABR <- SQL Items Spanish - Espaņol
http://pastebin.com/yjZsJrkG <- SQL Items English - Ingles
http://pastebin.com/9ciM9t6J <- Script Item Horde (English and Spanish) - (Ingles y Espaņol)
http://pastebin.com/GmrQiz7z <- Script Item Alliance (English and Spanish) - (Ingles y Espaņol)
The reason why i post first here is because i like this community, especially Tommy, Parranoia, Rotchet2 and slp13at420 because you guys help everyone on what you can and know, you are not like other communities who said "Do by yourself" when we are noobs and just want to learn, i hope this does no become like that :)
hope you like it and please tell me if something is bad ("something" all is bad :'( xD)