Jump to content

Bounty Hunter


Guest marx123
 Share

Recommended Posts

http://www.fileuploadx.de/529084 ###this is my core part

http://www.fileuploadx.de/992506 ### this is the sd2 part, all work good, but if i want to set a bounty, the server send me the message, but after this, core crash and freeze. Can anyone help me find out whats wrong..

credits :TIM4

but mabye anyone can test or know, whats wrong if i try to complie, then i get:

1>..\\scripts\\custom\\bountyhunter_npc.cpp(90) : error C2039: 'DeleteBountys' : is not a member of 'Player'

1> c:\\mangos\\src\\game\\Player.h(1051) : see declaration of 'Player'

mabye anyone know whats the problem:D

thanks

Link to comment
Share on other sites

I believe the two compiler errors are due to not having DeleteBountys defined. From what I can see, the function DeleteBountys is not coded anywhere except for this one spot in the SD2 script, lines 88-93:

case GOSSIP_ACTION_INFO_DEF+4:

{

pPlayer->DeleteBountys();

pPlayer->CLOSE_GOSSIP_MENU();

break;

}

Instead, it looks like WIPE_BOUNTY is used in place of it. Try changing it to this:

case GOSSIP_ACTION_INFO_DEF+4:

{

pPlayer->WIPE_BOUNTY();

pPlayer->CLOSE_GOSSIP_MENU();

break;

}

However, I'm still early in my C++ studies. Can someone more knowledgeable confirm this?

You can make your code more easy to access by using a code hosting service like Pastebin.org or Paste2.org. This eliminates the need to use download sites that use timers, bandwidth throttling, and other gimmicks to persuade people to sign up for their premium pay services.

@michalpolko:

This does indeed appear to be a mod that allows players to set kill bounties on each other. PvP fanatics ought to love this!

Link to comment
Share on other sites

this mod does this:

What the bounty hunter does:

Places a bounty on any player online, for one of the 4 set amounts of currency.

Lists the bounties in game

Bounties can be cleared by a GM

Announces to the entire server about the new bounty that was placed

Sets an FFA PvP flag on the player

Rewards the currency to the person who kills the player with a bounty on them

and error fix what i got, but tim4 problem still exist

you have to add this-->> void DeleteBountys(); after-->> bool passChecks(Player *pPlayer, const char * name); in Player.h than this error is fixed. but my problem still exist....

pastebin links

http://pastebin.com/0GUh1PFa

http://pastebin.com/9jg65gqW

Link to comment
Share on other sites

hmm oke used tim4 fix but now i got

1>   Creating library ..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.lib and object ..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.exp
1>bountyhunter_npc.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::DeleteBountys(void)" ([email protected]@@QAEXXZ) referenced in function "bool __cdecl GossipSelect_npc_bountyhunter(class Player *,class Creature *,unsigned int,unsigned int)" ([email protected]@[email protected]@[email protected]@[email protected])
1>ScriptLoader.obj : error LNK2019: unresolved external symbol "void __cdecl AddSC_bountyhunter_npc(void)" ([email protected]@YAXXZ) referenced in function "void __cdecl AddScripts(void)" ([email protected]@YAXXZ)
1>..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.dll : fatal error LNK1120: 2 unresolved externals

Link to comment
Share on other sites

hmm oke used tim4 fix but now i got

1>   Creating library ..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.lib and object ..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.exp
1>bountyhunter_npc.obj : error LNK2019: unresolved external symbol "public: void __thiscall Player::DeleteBountys(void)" ([email protected]@@QAEXXZ) referenced in function "bool __cdecl GossipSelect_npc_bountyhunter(class Player *,class Creature *,unsigned int,unsigned int)" ([email protected]@[email protected]@[email protected]@[email protected])
1>ScriptLoader.obj : error LNK2019: unresolved external symbol "void __cdecl AddSC_bountyhunter_npc(void)" ([email protected]@YAXXZ) referenced in function "void __cdecl AddScripts(void)" ([email protected]@YAXXZ)
1>..\\..\\..\\..\\bin\\win32_release/mangosscriptR2.dll : fatal error LNK1120: 2 unresolved externals

go to your sd2 bounty script and comment out this -->>> DeleteBountys(); after you have done it looks like -->> // DeleteBountys();

the second error is that you dont have add the bountyscript.cpp to your scriptloader !!!

open scriptloader.cpp

and add this

1. on //customs its on the top of the file

extern void AddSC_npc_bountyhunter();

2. on //customs you have to scroll down than add this

AddSC_npc_bountyhunter();

This script dont work atm

Link to comment
Share on other sites

  • 2 months later...

Aside from you and tim, I know of nobody else that has worked upon this modification here in the forum.

It is very likely Bounty Hunter was adopted as a feature in several of the custom cores out there, like MaNGOS R2 or Infinity. You may try doing a search for "bountyhunter" at Github to find if anyone has fixed or improved your code.

I sincerely do hope you get this working correctly, marx123. This would be a very fun feature for PvP.

Link to comment
Share on other sites

  • 1 month later...

i'm trying to test it and help making it work if i can, i'm pretty new to mangos. the mod actually works, but a player flagged for ffa is attackable only by other players flagged for ffa, if i place a bounty on 2 player they see each other as enemy, but only if both of them is flagged for ffa, am i doing something wrong? correct me if i'm wrong

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use