[C++] Trinitycore Duel Reset Script menu

User Tag List

Results 1 to 13 of 13
  1. #1
    Exactly's Avatar Active Member
    Reputation
    25
    Join Date
    Apr 2009
    Posts
    21
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Trinitycore Duel Reset Script

    Info

    This script resets a players health and cooldowns when they accept a duel.


    How to apply

    To apply this script to your core
    1. go to C:\Trinitycore\src\server\game\Server\Protocol\Handlers\
    2. find a script called DuelHandler.cpp and open it
    3. find the line that says
    Code:
    pl->SendDuelCountdown(3000);
    plTarget->SendDuelCountdown(3000);
    4. right under that line copy and paste this into the script
    Code:
    pl->RemoveAllSpellCooldown();
    plTarget->RemoveAllSpellCooldown();
    pl->SetHealth(pl->GetMaxHealth());
    pl->SetPower(POWER_MANA, pl->GetMaxPower(POWER_MANA));
    plTarget->SetHealth(plTarget->GetMaxHealth());
    plTarget->SetPower(POWER_MANA,  plTarget->GetMaxPower(POWER_MANA));
    4. now your it should look like this
    Code:
    pl->SendDuelCountdown(3000);
    plTarget->SendDuelCountdown(3000);
    pl->RemoveAllSpellCooldown();
    plTarget->RemoveAllSpellCooldown();
    pl->SetHealth(pl->GetMaxHealth());
    pl->SetPower(POWER_MANA, pl->GetMaxPower(POWER_MANA));
    plTarget->SetHealth(plTarget->GetMaxHealth());
    plTarget->SetPower(POWER_MANA,  plTarget->GetMaxPower(POWER_MANA));
    You could replace
    Code:
    RemoveAllSpellCooldown
    with
    Code:
    RemoveAllArenaSpellCooldown
    If you want only arena cooldowns reset (nothing above 10min)

    5. save the script and recompile your core
    6. your done!

    You can also add
    Code:
    pl->RemoveAura(ID);
    plTarget->RemoveAura(ID);
    to remove certain buffs/debuffs before the duel starts

    This is what I currently have
    Code:
    pl->RemoveAllSpellCooldown();
    plTarget->RemoveAllSpellCooldown();
    pl->RemoveAura(41425); // Remove Hypothermia Debuff
    plTarget->RemoveAura(41425);
    pl->RemoveAura(25771); // Remove Forbearance Debuff
    plTarget->RemoveAura(25771);
    pl->RemoveAura(57724); // Remove Sated Debuff
    plTarget->RemoveAura(57724);
    pl->RemoveAura(57723); // Remove Exhaustion Debuff
    plTarget->RemoveAura(57723);
    pl->RemoveAura(66233); // Remove Ardent Defender Debuff
    plTarget->RemoveAura(66233);
    pl->RemoveAura(11196); // Remove Recently Bandaged Debuff
    plTarget->RemoveAura(11196);
    pl->SetHealth(pl->GetMaxHealth());
    pl->SetPower(POWER_MANA, pl->GetMaxPower(POWER_MANA));
    plTarget->SetHealth(plTarget->GetMaxHealth());
    plTarget->SetPower(POWER_MANA,  plTarget->GetMaxPower(POWER_MANA));


    stop copy pasta newfasgas
    reythe baws
    Last edited by Exactly; 02-21-2013 at 10:26 AM.

    [C++] Trinitycore Duel Reset Script
  2. #2
    hax0rz's Avatar Member
    Reputation
    5
    Join Date
    Aug 2007
    Posts
    40
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wouldn't "RemoveArenaSpellCooldowns" be better so people dont use lay on hands or huge 10 minute+ cds every duel?

  3. #3
    Holysymbol's Avatar Established Member
    Reputation
    78
    Join Date
    Jan 2007
    Posts
    234
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hax0z I wub u.

    +rep

  4. #4
    WiePasta's Avatar Member
    Reputation
    1
    Join Date
    Mar 2008
    Posts
    88
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is awsome for a Pvp server tehre people duel alot so they doint have to sit waiting out there CD's before they can duel again

  5. #5
    lasoto's Avatar Member
    Reputation
    1
    Join Date
    Dec 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does it 3.3.5

  6. #6
    Facerolling's Avatar Contributor
    Reputation
    116
    Join Date
    Mar 2007
    Posts
    307
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +rep'd, thank you for this.

  7. #7
    Exactly's Avatar Active Member
    Reputation
    25
    Join Date
    Apr 2009
    Posts
    21
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes this works for 3.3.5a
    Last edited by Exactly; 11-07-2011 at 01:50 PM.

  8. #8
    jameyboor's Avatar Private
    Reputation
    6
    Join Date
    Aug 2011
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am now on a trinity core but i dont see duelhander.cpp file please help me

  9. #9
    EveronMightbane's Avatar Master Sergeant
    Reputation
    13
    Join Date
    May 2011
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice, thanks. +rep

  10. #10
    Exactly's Avatar Active Member
    Reputation
    25
    Join Date
    Apr 2009
    Posts
    21
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also add
    Code:
    pl->RemoveAura(ID);
    plTarget->RemoveAura(ID);
    to remove certain buffs/debuffs before the duel starts

    This is what I currently have
    Code:
    pl->RemoveAllSpellCooldown();
    plTarget->RemoveAllSpellCooldown();
    pl->RemoveAura(41425); // Remove Hypothermia Debuff
    plTarget->RemoveAura(41425);
    pl->RemoveAura(25771); // Remove Forbearance Debuff
    plTarget->RemoveAura(25771);
    pl->RemoveAura(57724); // Remove Sated Debuff
    plTarget->RemoveAura(57724);
    pl->RemoveAura(57723); // Remove Exhaustion Debuff
    plTarget->RemoveAura(57723);
    pl->RemoveAura(66233); // Remove Ardent Defender Debuff
    plTarget->RemoveAura(66233);
    pl->RemoveAura(11196); // Remove Recently Bandaged Debuff
    plTarget->RemoveAura(11196);
    pl->SetHealth(pl->GetMaxHealth());
    pl->SetPower(POWER_MANA, pl->GetMaxPower(POWER_MANA));
    plTarget->SetHealth(plTarget->GetMaxHealth());
    plTarget->SetPower(POWER_MANA,  plTarget->GetMaxPower(POWER_MANA));
    added to the top
    Last edited by Exactly; 11-07-2011 at 11:23 AM.

  11. #11
    marek's Avatar Member
    Reputation
    2
    Join Date
    Feb 2007
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice one ...its working for mangos to

  12. #12
    evilwhynot's Avatar Member
    Reputation
    4
    Join Date
    May 2009
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet thanks!

  13. #13
    dopexfd's Avatar Member
    Reputation
    2
    Join Date
    Sep 2021
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    player->RemoveArenaSpellCooldowns();
    plTarget->RemoveArenaSpellCooldowns();
    player->SetHealth(player->GetMaxHealth());
    player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
    plTarget->SetHealth(plTarget->GetMaxHealth());
    plTarget->SetPower(POWER_MANA, plTarget->GetMaxPower(POWER_MANA));

    only for
    The-Cataclysm-Preservation-Project . GitHub

Similar Threads

  1. Duel Everyone (ever canceling noobs) script
    By Phygar in forum WoW EMU Programs
    Replies: 6
    Last Post: 04-01-2013, 12:37 PM
  2. [Script Sale] The Judgment Arena [Duel Gambling System] - Trinitycore
    By Xees in forum General Trading Buy Sell Trade
    Replies: 6
    Last Post: 08-01-2012, 05:03 PM
  3. [Repack] [Release]x32 - Custom Stable UltraCore - 3.3.5a [Duel reset]
    By chronicman in forum WoW EMU General Releases
    Replies: 14
    Last Post: 10-03-2010, 07:05 PM
  4. [Release] Talents Reset Script
    By Ballwinkle in forum WoW EMU General Releases
    Replies: 10
    Last Post: 12-11-2008, 03:35 PM
  5. Force start a duel script
    By soholy in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 04-09-2008, 06:10 AM
All times are GMT -5. The time now is 10:52 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search