• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[TC2] Level Stone 255

darksoke

OnTop500
Hey all this is an other simple release but effective :D as the title say this is a stone wich give you lvl 255 after you right click on it .. so here it is

Credits me for releasing the code
Tommy for fixing the script
Code:
class Level_item : public ItemScript
{
public: 
    Level_item() : ItemScript("Level_item") { }

    bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
    {
        if  (player->getLevel() == 255)
        {
            player->GetSession()->SendNotification("You already have lvl 255.");
            return false;
        }
        player->GiveLevel(255);
        player->DestroyItemCount(item->GetEntry(),1,true,false);
        player->GetSession()->SendNotification("Your level was set to 255.");
        return true;
    }
};
 
void AddSC_Level_item()
{
    new Level_item();
}

And here is the sql

Code:
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `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`, `flagsCustom`, `WDBVerified`) VALUES (60000, 0, 0, 0, 'Level 255 Token', 46787, 6, 0, 0, 1, 0, 0, 0, -1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1000, 0, 0, 18282, 0, 0, 0, 8000, 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, '|cff00FF00Use: You will recive 255 Level\'s|r', 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, 'Level_item', 0, 0, 0, 0, 0, 12340);

that's it :D

--------------------------------------------------------My Release--------------------------------------------------------
SQL
[Last rev/Last Commit] All Race All Class Combination Patch and SQL
Scrolls for learn Dual Wield and Titan's Grip
Item switch Human/Worgen + Runing Wild 3.3.5
Mount Hyjal Level Area 1-255
Aplications
Misc Item Creator
Scripts
Gold cap to Gold Bars
Level Stone 255
--------------------------------------------------------My Release--------------------------------------------------------​
 
Last edited:

Tommy

Founder
Thanks for the release! I did fix up the indentation seeing it will be a lot better to read. Also, you didn't have an open and close bracket on the "else". However, the "else" isn't really needed. One more thing, you don't need to include any of those headers unless you're using a very old version of TrinityCore's source.

Code:
class Level_item : public ItemScript
{
public: 
    Level_item() : ItemScript("Level_item") { }

    bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
    {
        if  (player->getLevel() == 255)
        {
            player->GetSession()->SendNotification("You already have lvl 255.");
            return false;
        }
        player->GiveLevel(255);
        player->DestroyItemCount(item->GetEntry(),1,true,false);
        player->GetSession()->SendNotification("Your level was set to 255.");
        return true;
    }
};
 
void AddSC_Level_item()
{
    new Level_item();
}

Either way, thanks!
 

darksoke

OnTop500
Thanks for the release! I did fix up the indentation seeing it will be a lot better to read. Also, you didn't have an open and close bracket on the "else". However, the "else" isn't really needed. One more thing, you don't need to include any of those headers unless you're using a very old version of TrinityCore's source.

Code:
class Level_item : public ItemScript
{
public: 
    Level_item() : ItemScript("Level_item") { }

    bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/)
    {
        if  (player->getLevel() == 255)
        {
            player->GetSession()->SendNotification("You already have lvl 255.");
            return false;
        }
        player->GiveLevel(255);
        player->DestroyItemCount(item->GetEntry(),1,true,false);
        player->GetSession()->SendNotification("Your level was set to 255.");
        return true;
    }
};
 
void AddSC_Level_item()
{
    new Level_item();
}

Either way, thanks!

oh ok i will fix in the main post :D
 
Top