Colby

Joined: 10th Feb 2011
Posts: 2283
bounty code help
Is there a bouty code out there like its a command and you can put bounty to kill some one if you do you get the bounty. Can some one help me get the code ad instal it thanks: D
14 years, 5 weeks ago
|
Re: bounty code help
Bottem line would be,command turns on world pk, then name is stored and compared in database.
EX: if(character_ptr->name == ( "what ever name)/* && character_ptr->hp == 0*/); add in pk function under if(character_ptr == 0)
{
character_ptr->bounty = false// need to add function in databse as string name
//from->serverMsg(announcing the bounty was collected);p
int reward = 1000;int item = 1; PacketBuilder builder(PACKET_ITEM, PACKET_GET);
if (from->AddItem(item, reward)) { builder.AddShort(0); // UID builder.AddShort(item);//should be item id builder.AddThree(reward);//should = bounty builder.AddChar(from->weight); builder.AddChar(from->maxweight); from->player->client->SendBuilder(builder); } }
14 years, 5 weeks ago
|
Colby

Joined: 10th Feb 2011
Posts: 2283
Re: bounty code help
insomniac posted: (7th May 2011 11:44 pm)
Bottem line would be,command turns on world pk, then name is stored and compared in database.
EX: if(character_ptr->name == ( "what ever name)/* && character_ptr->hp == 0*/); add in pk function under if(character_ptr == 0)
{
character_ptr->bounty = false// need to add function in databse as string name
//from->serverMsg(announcing the bounty was collected);p
int reward = 1000;int item = 1; PacketBuilder builder(PACKET_ITEM, PACKET_GET);
if (from->AddItem(item, reward)) { builder.AddShort(0); // UID builder.AddShort(item);//should be item id builder.AddThree(reward);//should = bounty builder.AddChar(from->weight); builder.AddChar(from->maxweight); from->player->client->SendBuilder(builder); } }
can not find it
14 years, 5 weeks ago
|
Re: bounty code help
K i rough drafted of te top of my head but, you would need to add bounty as a spot in your database or character.cpp/hpp save and load functions for example look at how it savesloads map numbers, then the code i wrote would be in map.cpp in attackpk function, I can load this in your server in
the next couple days if you want mr_ndg@hotmail.com is my email ( :
14 years, 5 weeks ago
|
Colby

Joined: 10th Feb 2011
Posts: 2283
Re: bounty code help
insomniac posted: (8th May 2011 12:04 am)
K i rough drafted of te top of my head but, you would need to add bounty as a spot in your database or character.cpp/hpp save and load functions for example look at how it savesloads map numbers, then the code i wrote would be in map.cpp in attackpk function, I can load this in your server inthe
next couple days if you want mr_ndg@hotmail.com is my email ( :
emailed
14 years, 5 weeks ago
|
Re: bounty code help
K sir tomorrow we will add this ill run some tests today ( :
14 years, 5 weeks ago
|
newguy
Joined: 13th Mar 2009
Posts: 665
Re: bounty code help
Like on my old server Orc vs Humans? ---
Love you too.
14 years, 5 weeks ago
|
Re: bounty code help
newguy posted: (8th May 2011 12:50 am)
Like on my old server Orc vs Humans?
Not trying to be a douche but what this got to do with his ? and if so why not hook nim up?
14 years, 5 weeks ago
|
newguy
Joined: 13th Mar 2009
Posts: 665
Re: bounty code help
Im wondering if that is what he wants, I will give him the full code when he responds. ---
Love you too.
14 years, 5 weeks ago
|
Colby

Joined: 10th Feb 2011
Posts: 2283
Re: bounty code help
newguy posted: (8th May 2011 12:55 am)
Im wondering if that is what he wants, I will give him the full code when he responds.
k
14 years, 5 weeks ago
|
newguy
Joined: 13th Mar 2009
Posts: 665
Re: bounty code help
k doesnt answer my question. Is that what you are looking for? ---
Love you too.
14 years, 5 weeks ago
|
Colby

Joined: 10th Feb 2011
Posts: 2283
Re: bounty code help
newguy posted: (8th May 2011 01:00 am)
k doesnt answer my question. Is that what you are looking for?
yes it is :)
14 years, 5 weeks ago
|
newguy
Joined: 13th Mar 2009
Posts: 665
Re: bounty code help
Put this in Map.cpp in map::AttackPk
https://tehsausage.com/paste/map-cpp-bounty
Put this in Talk.cpp
https://tehsausage.com/paste/bounty-talk-cpp
And make sure to go to character.hpp and character.cpp and add the integer value to the database.
---
Love you too.
14 years, 5 weeks ago
|
Colby

Joined: 10th Feb 2011
Posts: 2283
Re: bounty code help
newguy posted: (8th May 2011 01:17 am)
Put this in Map.cpp in map::AttackPk
https://tehsausage.com/paste/map-cpp-bounty
Put this in Talk.cpp
https://tehsausage.com/paste/bounty-talk-cpp
And make sure to go to character.hpp and character.cpp and add the integer value to the database.
does not work unless if you can not put bounty on your self
14 years, 5 weeks ago
|
Re: bounty code help
Nah thats not going to work!
14 years, 5 weeks ago
| | | | | | | | | | | | | | | |