Likes: 0
Results 1 to 7 of 7
-
03-01-10, 10:18 PM #1
[C++] Anti PVP Script - Kick Players for PVP in Neutral Zones
Register to remove this adI know some players were looking for something like this, (its actually on our AUDB SVN Project :P )
Code:/* Modified Script of AntiPvP script for Banned Zones */ /* Original Author Unknown */ /* Modified By WHOS / Tekkeryole */ /* Coded for Aspire HearthStone */ /* Compatible with r1080+ */ #include "StdAfx.h" #include "Setup.h" #define MALL_ZONES 2 static uint32 MallZones[MALL_ZONES] = {394, 0}; void EventKillHandler(PlayerPointer pPlr, PlayerPointer pVictim) { AreaTable * at = dbcArea.LookupEntry(pPlr->GetMapMgr()->GetAreaID(pPlr->GetPositionX(), pPlr->GetPositionY())); for(uint32 i = 0; i < MALL_ZONES; i++) { if( at && at->ZoneId == MallZones[i] ) { char onkick[1024]; snprintf((char*)onkick, 1024, "%s was kicked from the server for PvPing in the mall.", pPlr->GetName()); sWorld.SendWorldText(onkick); pPlr->BroadcastMessage("You were kicked for PvPing in the mall."); pPlr->Kick(5000); return; } } } void SetupAntiPvPAtMall(ScriptMgr * mgr) { mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, &EventKillHandler); }
Arc Emu Users use this script:
Code:/* Modified Script of AntiPvP script for Banned Zones */ /* Original Author Unknown */ /* Modified By WHOS / Tekkeryole */ /* Coded for Arc Emu */ /* Compatible with latest Revisions */ #include "StdAfx.h" #include "Setup.h" #define MALL_ZONES 2 static uint32 MallZones[MALL_ZONES] = {394, 0}; void EventKillHandler(Player* pPlr, Player* pVictim) { AreaTable * at = dbcArea.LookupEntry(pPlr->GetMapMgr()->GetAreaID(pPlr->GetPositionX(), pPlr->GetPositionY())); for(uint32 i = 0; i < MALL_ZONES; i++) { if( at && at->ZoneId == MallZones[i] ) { char onkick[1024]; snprintf((char*)onkick, 1024, "%s was kicked from the server for PvPing in the mall.", pPlr->GetName()); sWorld.SendWorldText(onkick); pPlr->BroadcastMessage("You were kicked for PvPing in the mall."); pPlr->Kick(5000); return; } } } void SetupAntiPvPAtMall(ScriptMgr * mgr) { mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, &EventKillHandler); }
credits to tekkeryole
› See More: [C++] Anti PVP Script - Kick Players for PVP in Neutral Zones
-
09-01-10, 05:07 PM #2
-
27-03-10, 06:27 AM #3
The diffrence between ArcEmu scripts & Trinity scripts are mostly the pointers, which you have editted correctly.
But when you do not want them to PvP in a certain zone, you better work with defines. Or a restricted area.
Good job on releasing.
-
08-04-10, 02:25 PM #4
-
18-06-10, 11:45 AM #5
Nice script man
you seem skilled i wonder if you could make a anti GM Power well PvP flagged Ula/script
iv ben lookin for one ALL day could ya help me out? Thanks
-
18-06-10, 04:42 PM #6
Look closer nexttime banned..png
& he didnt make it, it was made by "tekkeryole"No touching please.
-
18-06-10, 04:49 PM #7
Register to remove this adok. my bad thanks