Hello & Welcome to our community. Is this your first visit? Register
Follow us on
Follow us on Facebook Follow us on Twitter Watch us on YouTube


MMOCoin

Likes Likes:  0
Results 1 to 7 of 7
  1. #1
    The Beautiful Abomination
    CthulhuFtagn's Avatar
    Join Date
    Jan 2010
    Location
    R'lyeh
    Posts
    526
    Post Thanks / Like
    Rep Power
    20
    Reputation
    397

    Arrow [MaNGOS] [C++] Talent Point Stone


    Register to remove this ad
    This custom item will reset your talents and give you 71, it can be edited to allow more or less Talent Points.

    Just edit this line:
    Code:
    pPlayer->SetFreeTalentPoints(71);
    How to Compile into ScriptDev2:
    Open ScriptDev2 and in solution explorer go down to scripts > custom



    Right-Click and Add > New Item...



    Choose C++ File (cpp) which is the default and name it item_talent_stone.cpp

    Code:
    #include "precompiled.h"
    
    bool ItemUse_item_custom_stone(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
    {
    if ( (pPlayer->isInCombat()) || (pPlayer->isInFlight()) || (pPlayer->isDead()))
    {
          pPlayer->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT,pItem,NULL );
            return false;
    }
          pPlayer->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
    {
          pPlayer->SetFreeTalentPoints(0);
          pPlayer->resetTalents(true);
          pPlayer->SetFreeTalentPoints(71);
          pPlayer->SendTalentsInfoData(false);
          pPlayer->DestroyItemCount(pItem->GetEntry(),1,true);
          return true;
    }
    }
    void AddSC_item_custom_stone()
    {
        Script *newscript;
    
        newscript = new Script;
        newscript->Name="item_custom_stone";
        newscript->pItemUse = &ItemUse_item_custom_stone;
        newscript->RegisterSelf();
    }
    Copy and Past the preceding code into this new file. Then click save.





    Then go to system > ScriptLoader.cpp and insert
    Code:
    extern void AddSC_item_custom_stone();
    under the first
    Code:
    // custom


    Collapse the - at the top of the script so that you see the following in the ScriptLoader.cpp window:



    Now place the code
    Code:
    AddSC_item_custom_stone();
    Under the second set of
    Code:
    // custom


    And save. Now you are ready to compile!

    SQL for a Talent Point Stone
    Code:
    INSERT INTO `item_template` (`entry`, `class`, `subclass`, `unk0`, `name`, `displayid`, `Quality`, `Flags`, `Faction`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `Duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`) VALUES (7, 15, 0, -1, 'Talent Point Stone', 12735, 1, 0, 0, 1, 0, 0, 0, 32, -1, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18282, 0, -1, -1, 1000, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 1, 'Gives you 71 Talent points.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 'item_custom_stone', 0, 0, 0, 0);
    Add in-game
    Code:
    .npc add 7



    › See More: [MaNGOS] [C++] Talent Point Stone



  2. Related Threads - Scroll Down after related threads if you are only interested to view replies for above post/thread

  3. #2
    Scout
    Sorena's Avatar
    Join Date
    Jan 2010
    Posts
    9
    Post Thanks / Like
    Rep Power
    15
    Reputation
    5
    Nice job bro.ur doing great!

  4. #3
    Grunt
    Flake's Avatar
    Join Date
    Feb 2009
    Posts
    33
    Post Thanks / Like
    Rep Power
    16
    Reputation
    29
    how about a way to have a chat comand to reset your talents and give you your required talent points?

  5. #4
    The Beautiful Abomination
    CthulhuFtagn's Avatar
    Join Date
    Jan 2010
    Location
    R'lyeh
    Posts
    526
    Post Thanks / Like
    Rep Power
    20
    Reputation
    397
    Code:
    .reset talents
    Code:
    .mod tp 71

  6. #5
    Beginner
    Playboy's Avatar
    Join Date
    Sep 2010
    Posts
    2
    Post Thanks / Like
    Rep Power
    15
    Reputation
    1

    Wink great guide

    hello, nice but:
    when u script an item u cannot set its Faction, as its an item (at least in my DB), so Faction column in Item:template table just doesnt exist, so it seems u need to delete it and delete its value.
    and
    to test the item in game, u cant write .npc add, bcoz its an item so u have to write .additem [itemID]
    however the guide is rly cool and i consider it an example for others, and these errors (IF those i find are errors, maybe just my DB is different) are not important, so GREAT JOB, hope u will continue taht way

    The player boy

  7. #6
    The Beautiful Abomination
    CthulhuFtagn's Avatar
    Join Date
    Jan 2010
    Location
    R'lyeh
    Posts
    526
    Post Thanks / Like
    Rep Power
    20
    Reputation
    397
    Is there a reason you are ressurecting a topic from January?

  8. #7
    Contributor
    Bing's Avatar
    Join Date
    Jul 2010
    Posts
    103
    Post Thanks / Like
    Rep Power
    16
    Reputation
    103

    Register to remove this ad
    Indeed, you've been infracted. I've made a warning about this in the past for people to stop.
    Leecher - 01/07/10!
    Active Member - 05/07/10!
    Moderator - 14/08/10!
    Contributor - 15/09/10!

 

 

Visitors found this page by searching for:

trinitycore c add talent point

reset talent trinitycore

mangos wow talent point database

talent stone in trinitycore

mangos starting talentpoints

talent reset c wow

wow talents C

stone of home trinitycore

mangos wow talents table

Trinity Core resetTalents(false);

ItemUse_item_custom_stone

add talent points mangos

mangos talent list

player->DestroyItemCount

mongos talentpoints

trinitycore talents database

talent

c talents

mangos reset talents

start talent points c

reset talents c

trinitycore talent reset

reset talents c trinitycore

reset talents trinitycore

c talent script for wow

trinitycore stone c

item_template c

mangos talents

mango wow skill point

mangos set talent point

mangos c

mangos talent point error

SEO Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -5. The time now is 05:23 AM.
Powered by vBulletin® Copyright ©2000-2024, Jelsoft Enterprises Ltd.
See More links by ForumSetup.net. Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
vBulletin Licensed to: MMOPro.org