ok im having a major problem i need to make the guards attack the people at the mall if they start to PvP so can anyone help me
P.S. im using LUA
ok im having a major problem i need to make the guards attack the people at the mall if they start to PvP so can anyone help me
P.S. im using LUA
I have no idea abotu lua, but i know there is a script for c++ if you would like it i can give it to you
This code will kill anyone pvping at the mall, just change the zone idCode://possible credit to zysus? //unsure, but codes are VERY VERY similar, so might as well #include "StdAfx.h" #include "Setup.h" #define NoPvPZone 493 //Moonglade void OnEnterCombat(Player *pPlayer, Unit *pUnit) { if (pPlayer->GetZoneId() == 493) pPlayer->BroadcastMessage("Don't Pvp In moonglad"); } } void SetupNoPvP(ScriptMgr* mgr){ mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, &OnEnterCombat); }credits to lilnate from ascent forums
![]()
yea on ascentemu there is a pvp script, ill post it later if no1 else has
If you need me you have my skype, if you don't have my skype then you don't need me.
You can't do this with LUA, only using C++.
Edit to make the snippet kick the player, and fixed the DEFINE, and syntax error. Don't define stuff you don't use later :P
Code:#include "StdAfx.h" #include "Setup.h" #define NOPVPZONE 493 //Moonglade void OnEnterCombat(Player *pPlayer, Unit *pUnit) { if (pPlayer->GetZoneId() == NOPVPZONE) { pPlayer->BroadcastMessage("Don't Pvp In moonglade"); pPlayer->Kick(); } } void SetupNoPvP(ScriptMgr* mgr){ mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, &OnEnterCombat); }
Last edited by TheSpidey; 03-22-2008 at 09:04 AM.
heh ^^ (filler)
i thought on enter combat didnt work
Use the player_kill one then![]()
ok then i have it what do i do with it and what type of file should it be im use to lua
im not joking idk where what to do with this all that i did was to put it notepad so what do i do next
ok i need to know how to make this work i saved it and i put it in the server but it wont compile will someone help
Read this
C++ Addons - Ascent Wiki
lol was about to post that hehe.