To Owned Emu menu

Shout-Out

User Tag List

Thread: To Owned Emu

Results 1 to 6 of 6
  1. #1
    soul02's Avatar Active Member
    Reputation
    33
    Join Date
    Mar 2008
    Posts
    168
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    To Owned Emu

    Code:
    void OnEnterCombat(Player *pPlayer, Unit *pTarget); //Function Header
    #define NOPVPGUARD 55555
    #define MAX_DISTANCE 70.0
    #define KILL_SPELL 5
    #define UNIT_INSTANT true
    #define ZONE 530 //
    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 SetupOnEnterCombat(ScriptMgr * mgr)
    {
    mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_COMBAT, (void*) OnEnterCombat);
    }
    #define NOPVPGUARD 55555 <-- npc id
    #define ZONE 530 <-- map

    u need to fix some stuff cos OnEnterCombat doesnt work

    i got the script from ascenemu ages ago
    -·=»‡«=·- Soul02 -·=»‡«=·-


    To Owned Emu
  2. #2
    doublehex's Avatar Member
    Reputation
    34
    Join Date
    Mar 2007
    Posts
    385
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the problem wiht this script is 2 things that i see, 1) yea onentercombat doesnt work
    2) its not detemining who is attacker and who is victim, so if someone runs around an starts hitting people, pulling htem into pvp then the people who were forced into pvp will die too, which is why you should use an onpvpkill hook, then say revive the victim, and kick the killer


  3. #3
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by doublehex View Post
    the problem wiht this script is 2 things that i see, 1) yea onentercombat doesnt work
    2) its not detemining who is attacker and who is victim, so if someone runs around an starts hitting people, pulling htem into pvp then the people who were forced into pvp will die too, which is why you should use an onpvpkill hook, then say revive the victim, and kick the killer
    Can you help me whit that ?

  4. #4
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aren't you a C++ scripter?

  5. #5
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not 100%..

  6. #6
    doublehex's Avatar Member
    Reputation
    34
    Join Date
    Mar 2007
    Posts
    385
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its not a hard script... pretty basic stuff really:

    Code:
    void antipvp(Player* killer, Player* victim)
    {
    if(killer->GetMapId() == id) 
    {
    killer->_Kick();
    victim->ResurrectPlayer();
    }
    }
    void Setupantipvp(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)antipvp);
    }


Similar Threads

  1. Your Own Emu Server, A complete guide on making YOUR Repack YOUR way
    By Dryice in forum WoW EMU Guides & Tutorials
    Replies: 19
    Last Post: 12-08-2007, 12:43 PM
All times are GMT -5. The time now is 06:53 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