[Release] Tome of Experience menu

User Tag List

Results 1 to 9 of 9
  1. #1
    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)

    [Release] Tome of Experience

    This is a [Tome of Experience] item, that will grant either levels, xp, or set you to a predefined level.
    The idea belongs to Otixa, who originally made it to get you instantly to level 70. I rewrote it to enable selection of either xp, levels, or set level.

    Code:
    //Title: Tome of Experience
    //Description: Either levels you X levels, gives you Y experience, or levels you to level Z.
    //Author: Spidey
    //Credits: Otixa is the original author, I added more features.
    #include "StdAfx.h"
    #include "Setup.h"
    
    //TomeType:
    //	0 = Gives LEVEL levels
    //	1 = Gives XP based on the FORMULA
    //	2 = Levels you to NLEVEL
    static uint8 TomeType = 0;
    #define LEVEL		1
    #define FORMULA		Plr->getLevel() * 150 * sWorld.getRate(RATE_XP)
    #define NLEVEL		60
    //Item entry:
    #define TOME		12345
    
    class SCRIPT_DECL TomeOfExp : public GossipScript
    {
    public:
    	void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
    	void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    	void GossipEnd(Object * pObject, Player* Plr);
    	void Destroy()
    	{
    		delete this;
    	}
    };
    
    void TomeOfExp::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
    	GossipMenu *Menu;
    	objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 99000, Plr);
    	Menu->AddItem(3, "[Read the tome]", 1);
    	Menu->AddItem(1, "[Put it back in your bag]", 2);
    	if(AutoSend)
    		Menu->SendTo(Plr);
    }
    
    void TomeOfExp::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
    	GossipMenu * Menu;
    	switch(IntId)
    	{
    		case 0:
    		{
    			GossipHello(pObject, Plr, true);
    		}
    
    		case 1:
    		{
    			switch(TomeType)
    			{
    				case 0:
    				{
    					if(Plr->getLevel() + LEVEL > sWorld.m_levelCap)
    					{
    						LevelInfo * Info = objmgr.GetLevelInfo(Plr->getRace(), Plr->getClass(), sWorld.m_levelCap);
    						Plr->ApplyLevelInfo(Info, sWorld.m_levelCap);
    					}
    				}break;
    
    				case 1:
    				{
    					Plr->GiveXP(FORMULA, Plr->GetGUID(), true);
    				}break;
    
    				case 2:
    				{
    					LevelInfo * Info = objmgr.GetLevelInfo(Plr->getRace(), Plr->getClass(), NLEVEL);
    					Plr->ApplyLevelInfo(Info, NLEVEL);
    				}break;
    			}
    			Plr->GetItemInterface()->RemoveItemAmt(TOME, 1);
    			Plr->BroadcastMessage("You have learned much from this ancient tome.");
    		}break;
    	}
    	Plr->Gossip_Complete();
    }
    
    void TomeOfExp::GossipEnd(Object * pObject, Player* Plr)
    {
    	GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupTomeOfExp(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new TomeOfExp();
    	mgr->register_item_gossip_script(TOME, gs);
    }
    I'll add an sql statement later if you need it.

    [Release] Tome of Experience
  2. #2
    Bapesy's Avatar Banned
    Reputation
    35
    Join Date
    May 2008
    Posts
    126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool!

    Bapes

  3. #3
    ledz14's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    82
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SQL please? and do I put this is scripts, or scripts_bin?
    turn up the volume and break out the LED.

  4. #4
    warsheep's Avatar Contributor
    Reputation
    184
    Join Date
    Sep 2006
    Posts
    1,216
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love contributions like this;
    New - they are not a repost
    Needed - They are actually needed, not another town
    Well done - Not just shit that doesn't work.

    And, well, this checks all of those...
    So, +Rep
    FOR A MOMENT, NOTHING HAPPENED. THEN, AFTER A SECOND OR SO, NOTHING CONTINUED TO HAPPEN.

  5. #5
    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)
    Originally Posted by ledz14 View Post
    SQL please? and do I put this is scripts, or scripts_bin?
    SQL will follow shortly, I need to find my ADE :P

    And you need to compile this

  6. #6
    Greeko's Avatar Banned
    Reputation
    47
    Join Date
    Feb 2008
    Posts
    366
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, +Rep if i can ;]

  7. #7
    ledz14's Avatar Member
    Reputation
    6
    Join Date
    Feb 2008
    Posts
    82
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lols, idk how to compile

    a guide on how to compile would help lol

    -Ledz
    turn up the volume and break out the LED.

  8. #8
    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)
    Should I include a guide on how to open VC++ as well?
    Seriously. Search.

  9. #9
    Matis02's Avatar Contributor CoreCoins Purchaser
    Reputation
    154
    Join Date
    Mar 2007
    Posts
    378
    Thanks G/R
    2/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well done mate, nice contribute.


Similar Threads

  1. [Release] Herbs to flag
    By Dave-evad in forum World of Warcraft Model Editing
    Replies: 9
    Last Post: 11-26-2006, 03:31 PM
  2. anti-warden Release #1
    By zhPaul in forum World of Warcraft Bots and Programs
    Replies: 40
    Last Post: 10-21-2006, 01:40 AM
  3. Exploaterus - Some Exploits based on my own experience + some tips
    By Wilderness in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 08-31-2006, 03:31 AM
  4. Easy Experience (Level 8 - Nightelf)
    By =sinister= in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 07-12-2006, 04:11 PM
  5. Massive Experience for low levels
    By Matt in forum World of Warcraft Exploits
    Replies: 17
    Last Post: 06-06-2006, 05:59 AM
All times are GMT -5. The time now is 04:49 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