Bounty Hunter menu

User Tag List

Results 1 to 11 of 11
  1. #1
    Corruptedwow's Avatar Member
    Reputation
    13
    Join Date
    Dec 2007
    Posts
    57
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bounty Hunter

    Created By ME aka lilNate22 of Ac-DB
    visit ACDB for more fun scripts
    Orginal idea by Legend (not here any more)

    WARNING this script is tested, and works fine on my hope pc (running winxp) HOWEVER on my WS 2003 SE it crashes server, im still wondering why

    Bounty Inserter
    Code:
    /*/Bounty Hunter NPC ftw BITCHES
    By:AcDB Aka LilNate22 visit ac-db.info for more
    */
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
      //Start of Script
    class SCRIPT_DECL HunterNPC : 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 HunterNPC::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
        {
        if(Plr->CombatStatus.IsInCombat()){    
        Plr->BroadcastMessage("You are in combat!");    
        return;
        }
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 30013, Plr);
            Menu->AddItem(1, "I want to hire an Assasin for 100g to kill some one!",1,1);
            Menu->AddItem(2, "I want to put a bounty on some one for 50g!", 2,1);
            
            
    
    
               if(AutoSend)
                Menu->SendTo(Plr);
        }
    //Defining Cases
    void HunterNPC::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            GossipMenu * Menu;
            uint32 plrid;
        
            switch(IntId)
            {
            case 1: //Service Center
                {
                    uint32 price = 1000000;
                    uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
                    if(currentgold>=price)
                    {
                    int32 newgold = currentgold - price;
                    Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
                    QueryResult*namecheck=WorldDatabase.Query("select `guid` from `characters` where `name`='%s';",Code);
                    if(namecheck){
                    plrid=namecheck->Fetch()[0].GetUInt32();
                    WorldDatabase.Query("replace into `assasin` (`hunted`,`GUID`) Values ('1','%u');",plrid);
                    }
                    
                    delete namecheck;
                    }
                    else
                        Plr->BroadcastMessage("You Dont Have enough gold!");
                    Plr->Gossip_Complete();
                }break;
    
            case 2: //bounty
                {
                    uint32 price = 1000000/2;
                    uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
                    if(currentgold>=price)
                    {
                    int32 newgold = currentgold - price;
                    Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
                    QueryResult*namecheck=WorldDatabase.Query("select `guid` from `characters` where `name`='%s';",Code);
                    if(namecheck)
                        {
                          plrid=namecheck->Fetch()[0].GetUInt32();
                          WorldDatabase.Query("replace into bountyhunts (`name`, `plrid`) VALUES ('%s','%u');",Code,plrid);
                        }
                    }
                    
                    Plr->Gossip_Complete();
                    
               
               
               }break;
    
        
                
            
                
            
    
            }
    };
    
    void HunterNPC::GossipEnd(Object * pObject, Player* Plr)
    
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupHunterNPC(ScriptMgr * mgr)
    
    {
    GossipScript * gs = (GossipScript*) new HunterNPC();
    mgr->register_gossip_script(30015, gs);     
    
    }

    Bounty Informant

    Code:
    /* Scripted By LilNate22 of AC-DB
    **** you leeching queers+haters
    */
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
      //Start of Script
    class SCRIPT_DECL BHNPC : 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 BHNPC::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
        {
        if(Plr->CombatStatus.IsInCombat()){    
        Plr->BroadcastMessage("You are in combat!");    
        return;
        }
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 30013, Plr);
            QueryResult*bountyresult=WorldDatabase.Query("select `name` from `bountyhunts`;");
        if( bountyresult )
            {
                int x=bountyresult->GetRowCount();
                /*if(x==1)
                {   
                    const char *name=result->Fetch()[0].GetString();
                    Menu->AddItem->(1,name,1);
                    return;
                }*/
                if(x!=1){
                 do
                {
                 const char * name =bountyresult->Fetch()[0].GetString();
                 Menu->AddItem(1,name,1);
    
                } while (bountyresult->NextRow());
                }
                else{
                    const char * name =bountyresult->Fetch()[0].GetString();
                 Menu->AddItem(1,name,1);
                }
                    
                
    
            delete bountyresult;
        }
        else
        {
            Plr->BroadcastMessage("There are no Bounties");
        }
            
    
    
               if(AutoSend)
                Menu->SendTo(Plr);
    }
    //Defining Cases
    void BHNPC::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            GossipMenu * Menu;
            uint32 plrid;
        
            switch(IntId)
            {
            case 1:
                Plr->BroadcastMessage("Go kill that Basterd!");
                Plr->Gossip_Complete();
            }
    
        
                
            
                
            
    
            
    };
    
    void BHNPC::GossipEnd(Object * pObject, Player* Plr)
    
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupBHNPC(ScriptMgr * mgr)
    
    {
    GossipScript * gs = (GossipScript*) new BHNPC();
    mgr->register_gossip_script(30017, gs);    
    }
    Bounty PvP
    Code:
    /*/Bounty Hunter NPC ftw BITCHES
    By:AcDB Aka LilNate22 visit ac-db.info for more
    */
    
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    void onPVPBounty(Player*hunter, Player*bounty)
    {
    
    
        QueryResult*victimcheck=WorldDatabase.Query("select `name` from `bountyhunts` where `plrid`='%u';",bounty->GetGUID());
        bool bountycheck=false;
        if(victimcheck)
        bountycheck=true;
    
        if(bountycheck==true)
        {
            hunter->BroadcastMessage("Target...|CFFFF66FF Assasinated |r");
            QueryResult*clearbounty=WorldDatabase.Query("Delete from `bountyhunts` WHERE `plrid`='%u';",bounty->GetGUID());
            ItemPrototype *proto = ItemPrototypeStorage.LookupEntry(94);
                                    SlotResult slotresult;
                                    slotresult = hunter->GetItemInterface()->FindFreeInventorySlot(proto);
                                    //hunter->BroadcastMessage("|CFFFF00FF Greater PvP Token|r Recieved");
                                if(!slotresult.Result)
                                {
                                hunter->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
                                hunter->BroadcastMessage("Bag Full!");
                                }
                                else
                                    {
                                    Item *itm = objmgr.CreateItem(94, hunter);
                                    itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
                                    hunter->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
                                    //hunter->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
                                    
                                    
                                    }
        delete victimcheck;
        delete clearbounty;
        
        }
    }
    
    
    
    
    
    void SetupBountyPVP(ScriptMgr * mgr)
    {
        //GossipScript * gs = (GossipScript*) new BountyNPC();
        /* Teleporter List */
         //mgr->register_gossip_script(100001, gs);          // Nega
         mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPVPBounty);
    }
    Assasin-this is safe
    Code:
    /* Assasin System
    Created by: Ac-Db (lilnate22) so suck it you cunts from mmowned
    License: GNuGPLv3
    Additional: leave credits or die::::Dedicated to Kristen
    */  
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
    
    void AssasinSystem (Player* plr){
    
    char checking[200];
    int faction=plr->GetTeam();
    int killerfaction;
    CreatureSpawn * sp = new CreatureSpawn;        
            sprintf(checking,"SELECT `hunted` FROM `assasin` WHERE `GUID`='%i';", plr->GetGUID());
            QueryResult*check=WorldDatabase.Query(checking);
            uint32 hunt=0;
            
            if(!check)
            {return;}
            
            //Not sure if i need to do this 2x...prolly not...but to be safe...
            
            else//the player is hunted
            {
            if(check)
            {
                Field*hunted=check->Fetch();
                hunt=hunted[0].GetUInt32();
                
            }
            }//else::if!check bracket
            
            //We need the opposite of the players faction
            if (faction==0)                  
            {killerfaction=2;}
            else
            {killerfaction=1;}
            /////////////////////////////////////////////
            if(hunt>0)
            {
            uint32 entry=123455;
            plr->BroadcastMessage("Theres an |CFF33CC33 Assasin after you|r!");
            plr->PlaySoundToSet(10178);
             CreatureInfo * info = CreatureNameStorage.LookupEntry(123455);
            info->GenerateModelId(&sp->displayid);
        sp->entry = entry;
        sp->form = 0;
        sp->id = objmgr.GenerateCreatureSpawnID();
        sp->movetype = 0;
        sp->x = plr->GetPositionX();
        sp->y = plr->GetPositionY();
        sp->z = plr->GetPositionZ();
        sp->o = plr->GetOrientation();
        sp->emote_state =0;
        sp->flags = 0;
        sp->factionid = killerfaction;
        sp->bytes=0;
        sp->bytes2=0;
        //sp->respawnNpcLink = 0;
        sp->stand_state = 0;
        sp->channel_spell=sp->channel_target_creature=sp->channel_target_go=0;
    
    
        Creature * p = plr->GetMapMgr()->CreateCreature(entry);
        ASSERT(p);
        p->Load(sp, (uint32)NULL, NULL);
        p->PushToWorld(plr->GetMapMgr());
        
        uint32 x = plr->GetMapMgr()->GetPosX(plr->GetPositionX());
        uint32 y = plr->GetMapMgr()->GetPosY(plr->GetPositionY());
    
        // Add spawn to map
        /*plr->GetMapMgr()->GetBaseMap()->GetSpawnsListAndCreate(
            x,
            y)->CreatureSpawns.push_back(sp);*/
        }
    }
        void Assasin(ScriptMgr * mgr)
    {
        mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, AssasinSystem);
    }
    Assasin Unit - also safe
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define PvP_Guard 123455
    
    class PvPGuard : public CreatureAIScript
    {
    
    public:
    ADD_CREATURE_FACTORY_FUNCTION(PvPGuard);
    
    PvPGuard(Creature* pCreature) : CreatureAIScript(pCreature)
    {
    }
    
    void OnTargetDied(Unit *mTarget)
    {
    if(mTarget->IsPlayer())
    {
    //random code to do something when the mob kills a player?
        QueryResult*reseting=WorldDatabase.Query("delete from `assasin` WHERE `GUID`='%u';",mTarget->GetGUID());
    _unit->Despawn(1,0);
    }
    }
    
    };
    
    
    void SetupPvPGuards(ScriptMgr * mgr)
    {
    mgr->register_creature_script(PvP_Guard, &PvPGuard::Create);
    }

    The end

    again, there are probably alot easier way to do this, but this is how i did it.
    if some one cares to tell me why it crashes on my win SE...do tell

    now i shall be waiting for the usual ass****s to scream "omg u stole this, from me, even though i didnt code this"

    Bounty Hunter
  2. #2
    Ickybad's Avatar Contributor
    Reputation
    214
    Join Date
    Apr 2008
    Posts
    904
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nicely done mate. But why cussing. /cry

  3. #3
    Synris's Avatar Active Member
    Reputation
    70
    Join Date
    Mar 2008
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how do we insert these? are they just SQL's?

  4. #4
    Chrispee's Avatar The True Repacker


    Reputation
    686
    Join Date
    Mar 2007
    Posts
    931
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    those are need to be compiled




  5. #5
    kate1's Avatar Member
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no realmslayer! its 100% not sql, you will have to compile it! search for a guide about how to compile.


    Graphic designer for crossfire-entertainment! And thx to Brightchild for my great sig

  6. #6
    badboy92's Avatar Member
    Reputation
    1
    Join Date
    Apr 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow nice hope this works.

  7. #7
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll compile these for the latest revs and post my setup files.

  8. #8
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What does this really do? I don't get it. Also Sector, how do you make setup files?

    Bapes

  9. #9
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll tell you later. I'm going to school.

  10. #10
    Bapes's Avatar Banned
    Reputation
    16
    Join Date
    Feb 2008
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm at school in science class watching people talk about planets -.-.

    Bapes

  11. #11
    Cursed's Avatar Contributor
    Reputation
    270
    Join Date
    Jun 2007
    Posts
    1,380
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Loved that line


    Created by: Ac-Db (lilnate22) so suck it you cunts from mmowned

Similar Threads

  1. Replies: 0
    Last Post: 12-07-2011, 12:45 PM
  2. [Share] Bounty Hunter Script +SQL
    By y2kss66 in forum WoW EMU General Releases
    Replies: 10
    Last Post: 03-27-2009, 04:37 PM
  3. [Bounty Hunter]
    By ucigashu in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 01-05-2008, 03:16 PM
  4. [Release] Bounty Hunter Npc
    By Cursed in forum World of Warcraft Emulator Servers
    Replies: 48
    Last Post: 12-24-2007, 07:06 PM
  5. [help] Bounty Hunter Problem.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 17
    Last Post: 12-18-2007, 03:25 PM
All times are GMT -5. The time now is 07:12 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