[HELP]Anti PvP System menu

Shout-Out

User Tag List

Results 1 to 5 of 5
  1. #1
    Mizuki90's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP]Anti PvP System

    So erm .... can someone help me ? Why does this not work ?
    It compiles perfectly fine :s
    This is an old script I tried to fix :S ... but I cant .... please help ....
    Code:
        void OnEnterCombat(Player *pPlayer, Unit *pTarget); //Function Header
    
        #define NOPVPGUARD 800000 //ID for the anti PVP creature {YES !!! U CHANGE THIS TO THJE GUARDS ID!!!}
        #define MAX_DISTANCE 70.0 //Distance they must be within for the guard to agro
        #define KILL_SPELL 5 //The spell used when they get agro - death touch {THOSE WHO DONT KNOW ... Death touch ... you can change this to anything :D ... net spell works nice
        #define UNIT_INSTANT true //Instant cast spell? true or false
        #define ZONE 357 //
    
        void OnEnterCombat(Player *pPlayer, Unit *pTarget)
        {
            bool InZone = false;
           
                if (pPlayer->GetZoneId() == ZONE) {InZone = true;}
    
            if (InZone == false) {return;}
            Creature *pCreature = pPlayer->GetMapMgr()->GetSqlIdCreature(NOPVPGUARD);
            if (!pCreature) {return;} //No creature found, handle gracefully and return
            float dist = pCreature->CalcDistance(pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ());
    
                Unit *pUnit = (Unit *)pPlayer; //Cast the pointer to a Unit object
                pCreature->GetAIInterface()->AttackReaction(pUnit,0,0); //Attack! (not sure about the second and third params here, set to 0 to be safe
                if (KILL_SPELL != NULL)
                    pCreature->CastSpell(pUnit,KILL_SPELL,UNIT_INSTANT);
    
        }
    
        void SetupPVP(ScriptMgr * mgr)
        {
           mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, (void*) OnEnterCombat);
        }
    I really gotta get people to stop PvPing in the shoping centre :s Thanx alot guys

    [HELP]Anti PvP System
  2. #2
    TheZaronz's Avatar Active Member
    Reputation
    97
    Join Date
    Dec 2007
    Posts
    567
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure if this is needed at all, where is the Mall ?

  3. #3
    CodeDemon's Avatar Member
    Reputation
    36
    Join Date
    Jun 2008
    Posts
    175
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can go into navi cat or heidisql or whatever you use and go into like zone or something I forgot and change it to a sanctuary like Shatt so nobody could kill eachother

  4. #4
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The hook:
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, (void*) OnEnterCombat);
    doesn't work.
    Life Puzzler WoW - Website | Forums

  5. #5
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made a guide for this kind of stuff... Maybe it is what you are looking for

    Edit: Link

Similar Threads

  1. Anti-PvP Guard script help
    By gimmeurlife in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 06-16-2009, 12:32 AM
  2. Need help c++ pvp system
    By atersi in forum World of Warcraft General
    Replies: 1
    Last Post: 08-14-2008, 03:31 AM
  3. [Help] Disable PvP in a certain area?
    By MisterEMU in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 05-24-2008, 12:21 PM
  4. [Help] Custom PvP area.
    By kanqaz in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 01-10-2008, 11:44 AM
  5. help me pvp?
    By lilsluger4837 in forum WoW PvP & Battlegrounds
    Replies: 16
    Last Post: 09-28-2007, 09:28 AM
All times are GMT -5. The time now is 09:57 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search