[Release] Reputation Booster - NPC Script menu

User Tag List

Results 1 to 4 of 4
  1. #1
    nofix's Avatar Member
    Reputation
    5
    Join Date
    Feb 2008
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Reputation Booster - NPC Script

    Hello! About time to contribute!

    This script is a npc who boosts the players reputation with the most common factions.

    Funservers might find this usefull, where your players dont have to grind rep to use enchants etc.

    RepBooster.cpp

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    #ifdef WIN32
    #pragma warning(disable:4305)   
    #endif
    
    
    //-----------------------Start-------------------------------//
    
    
    
    
    class SCRIPT_DECL RepBooster: 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);
        GossipMenu *Menu;
        void Destroy()
        {
        delete this;
        }
    };
    void RepBooster::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
       
       objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
        	
    	if (Plr->GetTeam() == 1)
    	{
    	     Menu->AddItem(0, "Horde Factions", 2);
    	}
    
    	if(Plr->GetTeam() == 0)
    	{ 
    		 Menu->AddItem(0, "Alliance Factions", 3);
    	}
    	     Menu->AddItem(0, "Other Factions", 4);
             Menu->SendTo(Plr);
    }
    
    void RepBooster::GossipSelectOption(Object *pObject, Player *Plr, uint32 Id, uint32 IntId, const char *Code)
    {
       switch(IntId)
       {
    
    case 0:
        {
        }
    break;
    
    case 1:
       {
          objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    	
    	if (Plr->GetTeam() == 3)
    	{
    	     Menu->AddItem(0, "Horde Factions", 2);
    	}
    
    	if(Plr->GetTeam() == 2)
    	{ 
    		 Menu->AddItem(0, "Alliance Factions", 3);
    	}
    	     Menu->AddItem(0, "Other Factions", 4);
             Menu->SendTo(Plr);
        }
    break;
    
    
    case 2:
       {
    	   Plr->SetStanding(530, 5000000);
    	   Plr->SetStanding(729, 5000000);
    	   Plr->SetStanding(76, 5000000);
    	   Plr->SetStanding(911, 5000000);
    	   Plr->SetStanding(510, 5000000);
    	   Plr->SetStanding(941, 5000000);
    	   Plr->SetStanding(947, 5000000);
    	   Plr->SetStanding(81, 5000000);
    	   Plr->SetStanding(922, 5000000);
    	   Plr->SetStanding(68, 5000000);
    	   Plr->SetStanding(889, 5000000);
    	   Plr->Gossip_Complete();
       }
    break;
    
    
    case 3:
       {
    	   Plr->SetStanding(589, 5000000);
    	   Plr->SetStanding(69, 5000000);
    	   Plr->SetStanding(930, 5000000);
    	   Plr->SetStanding(54, 5000000);
    	   Plr->SetStanding(946, 5000000);
    	   Plr->SetStanding(47, 5000000);
    	   Plr->SetStanding(978, 5000000);
    	   Plr->SetStanding(890, 5000000);
    	   Plr->SetStanding(730, 5000000);
    	   Plr->SetStanding(72, 5000000);
    	   Plr->SetStanding(509, 5000000);
    	   Plr->SetStanding(471, 5000000);
    	   Plr->Gossip_Complete();
       }
    break;
    
    
    case 4:
       {
    	   Plr->SetStanding(529, 5000000);
    	   Plr->SetStanding(1012, 5000000);
    	   Plr->SetStanding(21, 5000000);
    	   Plr->SetStanding(910, 5000000);
    	   Plr->SetStanding(609, 5000000);
    	   Plr->SetStanding(942, 5000000);
    	   Plr->SetStanding(909, 5000000);
    	   Plr->SetStanding(577, 5000000);
    	   Plr->SetStanding(369, 5000000);
    	   Plr->SetStanding(92, 5000000);
    	   Plr->SetStanding(749, 5000000);
    	   Plr->SetStanding(989, 5000000);
    	   Plr->SetStanding(1011, 5000000);
    	   Plr->SetStanding(93, 5000000);
    	   Plr->SetStanding(1015, 5000000);
    	   Plr->SetStanding(1038, 5000000);
    	   Plr->SetStanding(470, 5000000);
    	   Plr->SetStanding(349, 5000000);
    	   Plr->SetStanding(1031, 5000000);
    	   Plr->SetStanding(1077, 5000000);
    	   Plr->SetStanding(809, 5000000);
    	   Plr->SetStanding(970, 5000000);
    	   Plr->SetStanding(932, 5000000);
    	   Plr->SetStanding(933, 5000000);
    	   Plr->SetStanding(990, 5000000);
    	   Plr->SetStanding(934, 5000000);
    	   Plr->SetStanding(935, 5000000);
    	   Plr->SetStanding(967, 5000000);
    	   Plr->SetStanding(59, 5000000);
    	   Plr->SetStanding(576, 5000000);
    	   Plr->SetStanding(270, 5000000);
    	   Plr->SetStanding(87, 5000000);
    	   Plr->SetStanding(70, 5000000);
    	   Plr->Gossip_Complete();
       }
    break;
    
    
    
      }
    
    };
    
    
    
    
    void  RepBooster::GossipEnd(Object * pObject, Player* Plr)
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupRepBooster(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new RepBooster();
    mgr->register_gossip_script(112231,gs);
    }
    The number in red is the entry id of the booster npc.


    Setup.cpp

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    #define SKIP_ALLOCATOR_SHARING 1
    #include <ScriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupRepBooster(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    Setup.h

    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupRepBooster(ScriptMgr * mgr);
    
    #endif
    Repbooster.sql

    Im using WhyDB so the sql might not work for you if you are using something else, but just create a new npc if it dont.

    Code:
    INSERT INTO creature_names
       (`entry`, `name`, `subname`, `info_str`, `Flags1`, `type`, `family`, `rank`, `unk4`, `spelldataid`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `unknown_float1`, `unknown_float2`, `civilian`, `leader`)
    VALUES
       (112231, 'Reputation Booster', '', '', 0, 0, 0, 3, 0, NULL, 2041, 0, 0, 0, 1, 1, 1, NULL);
    
    
    
    INSERT INTO creature_proto
       (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `attacktype`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `mountdisplayid`, `equipmodel1`, `equipinfo1`, `equipslot1`, `equipmodel2`, `equipinfo2`, `equipslot2`, `equipmodel3`, `equipinfo3`, `equipslot3`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`, `extra_a9_flags`)
    VALUES
       (112231, 100, 100, 35, 100000, 100000, 100, 1, 1, 1500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 1, 0, '0', 0, 0, 0, 0, 2.5, 8, 14, 0);

    Everything wrapped up in a rar file here:
    Download

    [Release] Reputation Booster - NPC Script
  2. #2
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice. Good job

    +rep

  3. #3
    soul02's Avatar Active Member
    Reputation
    33
    Join Date
    Mar 2008
    Posts
    168
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -·=»‡«=·- Soul02 -·=»‡«=·-


  4. #4
    nofix's Avatar Member
    Reputation
    5
    Join Date
    Feb 2008
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aww nice one there soul02!

    Yours is abit more advanced then mine.

    Not sure why i didnt find it when i searched for similar topics.

Similar Threads

  1. [Release][C++] Best Master NPC Script!
    By AzolexX in forum WoW EMU General Releases
    Replies: 22
    Last Post: 12-30-2008, 02:59 PM
  2. [Share/Releases] C++ Source Rep Booster NPC
    By soul02 in forum WoW EMU General Releases
    Replies: 5
    Last Post: 08-28-2008, 03:10 AM
  3. [Release] Rin'ji Boss Script || V1 - Includes Teleporter NPC -
    By Bapesy in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 06-06-2008, 06:00 PM
  4. [Release]City Teleport NPC for Antrix
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-18-2007, 08:38 AM
All times are GMT -5. The time now is 05:15 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