[UPDATED RELEASE]Mr Free Free menu

User Tag List

Results 1 to 4 of 4
  1. #1
    pepsi1x1's Avatar Member
    Reputation
    26
    Join Date
    Jul 2007
    Posts
    58
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [UPDATED RELEASE]Mr Free Free

    Ok ive decided to post a slightly modified version of my Mr Free Free Script
    ive simply added checks to make sure you dont get your gold bugged out and stop you players from saving properly to the db when they have too much money

    Also im posting this because Utsjtimmie from the PS db team said the script he had gave him errors - so here it is working for the stable branch

    Code:
    // A satirical NPC with Gossip Menu and Emotes that gives away free money
    // Scripted by Pepsi1x1
    // Do as you like with this, just scripted for fun, credit me if you like.
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    class SCRIPT_DECL FreeMoneyNPC : 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 FreeMoneyNPC::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    	{
    		GossipMenu *Menu;
    	objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 30021, Plr);
    		Menu->AddItem(0, "1 Gold", 1);
    		Menu->AddItem(0, "10 Gold", 2);
    		Menu->AddItem(0, "100 Gold", 3);
    		Menu->AddItem(0, "1000 Gold", 4);
    		Menu->AddItem(0, "10000 Gold", 5);
    		Menu->AddItem(0, "Greedy Phat B4stard Gold", 6);
    	if(AutoSend)
    		Menu->SendTo(Plr);
    	}
    
    void FreeMoneyNPC::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    	{
    	Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
    	if(pCreature==NULL)
    		return;
    
    	switch(IntId)
    	{
    		case 1:
    		{
    			if (currentgold >= 899999999)
    				{
    				Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,990000000);
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Money is the root of all evil, you must be BAD...real BAD!");
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I have set your gold at a reasonable level!");
    				}
    			else
    			{
    			uint32 amount = 10000;
    			uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    			int32 newgold = currentgold + amount;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Dont spend it all in one shop!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    			}
    		}
    		break;
    		case 2:
    		{
    			if (currentgold >= 899999999)
    				{
    				Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,990000000);
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Money is the root of all evil, you must be BAD...real BAD!");
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I have set your gold at a reasonable level!");
    				}
    			else
    			{
    			uint32 amount = 100000;
    			uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    			int32 newgold = currentgold + amount;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "A modest choice my friend!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    			}
    		}
    		break;
    		case 3:
    		{
    			if (currentgold >= 899999999)
    				{
    				Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,990000000);
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Money is the root of all evil, you must be BAD...real BAD!");
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I have set your gold at a reasonable level!");
    				}
    			else
    			{
    			uint32 amount = 1000000;
    			uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    			int32 newgold = currentgold + amount;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Go forth my friend and spend!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    			}
    		}
    		break;
    		case 4:
    		{
    			if (currentgold >= 899999999)
    				{
    				Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,990000000);
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Money is the root of all evil, you must be BAD...real BAD!");
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I have set your gold at a reasonable level!");
    				}
    			else
    			{
    			uint32 amount = 10000000;
    			uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    			int32 newgold = currentgold + amount;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Have a bag o' sand!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    			}
    		}
    		break;
    		break;
    		case 5:
    		{
    			if (currentgold >= 899999999)
    				{
    				Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,990000000);
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Money is the root of all evil, you must be BAD...real BAD!");
    				pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "I have set your gold at a reasonable level!");
    				}
    			else
    			{
    			uint32 amount = 100000000;
    			uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    			int32 newgold = currentgold + amount;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "A big sack of cash!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    			}
    		}
    		break;
    		case 6:
    		{
    			uint32 amount = 990000000;
    			Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,amount);
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "WOW, but...im considerably richer than yow!");
    			pCreature->Emote(EMOTE_ONESHOT_CHEER);
    		}
    		break;
    	}
    };
    
    
    void FreeMoneyNPC::GossipEnd(Object * pObject, Player* Plr)
    {
    	GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupFreeMoneyNPC(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new FreeMoneyNPC();
    	mgr->register_gossip_script(30021, gs);
    }


    and the setup.cpp

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    extern "C" SCRIPT_DECL uint32 _exp_get_version()
    {
    	return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
    }
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    	SetupFreeMoneyNPC(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
    	return TRUE;
    }
    
    #endif

    and the setup.h

    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupFreeMoneyNPC(ScriptMgr * mgr);
    
    #endif

    enjoy

    [UPDATED RELEASE]Mr Free Free
  2. #2
    King Shaun's Avatar Member
    Reputation
    419
    Join Date
    Dec 2007
    Posts
    1,305
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I love all your releases mate, keep it up!

    Also add me on MSN: [email protected]

    Thanks!


    Threads of the Week: [Errage] [Blizzard] [Rapidshare]

  3. #3
    Froddy's Avatar Banned
    Reputation
    1
    Join Date
    Jan 2007
    Posts
    138
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do u add this to ur server?

  4. #4
    King Shaun's Avatar Member
    Reputation
    419
    Join Date
    Dec 2007
    Posts
    1,305
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What an idiot, as he clearly states, this is a c++ code, you compile it yourself.

    kthnx


    Threads of the Week: [Errage] [Blizzard] [Rapidshare]

Similar Threads

  1. [RELEASE] WARgremlin, Free WAR bot
    By suicidity in forum MMO Exploits|Hacks
    Replies: 71
    Last Post: 04-10-2009, 08:30 PM
  2. [RELEASE] Unlimited Free Playtime
    By eSko in forum World of Warcraft Exploits
    Replies: 132
    Last Post: 12-23-2008, 07:29 AM
  3. [Release] Nice & Free WoW Skin For Vbulletin
    By MysterioussouL in forum Art & Graphic Design
    Replies: 13
    Last Post: 03-02-2008, 01:05 AM
All times are GMT -5. The time now is 06:32 PM. 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