Jump to content
  • 0

PK experience and other changes


LithiumFire

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

I've searched a while with the help of google without much luck. I'm thinking about setting up a PK server with some not-very-common features like:

  • Getting experience from killed players on PK mode (not PVP) (The higher the level of the player killed, the higher the experience)
  • A chance for players to obtain one piece of equipment/weapon from the player they killed (percentage customizable). (Not duping, it would delete the item from the killed player's inventory and add it to the killer's inventory).
  • A protection command in case players want to hunt some monsters in search for equipment and money. This command would also prevent them from attacking others of course.
  • Experience from monsters completely disabled, the only way of leveling up would be killing players.

I think most of those changes (if not all) require source modifications. May I get some help with these? Maybe there are already source projects that accomplish any of those customizations, I'd like to know about them.

Thanks in advance.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

  1. Perform an SQL query for base_level of killedrid, then calculate EXP accordingly (not too difficult).
  2. You could use the 'nightmare' mapflag, no? Seems more efficient than running a script, but could be better written in source.
  3. Not sure about this one.
  4. A simple database edit:
    UPDATE `mob_db` SET EXP = 0, JEXP = 0;


Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

Sounds fine, just some questions.

1. Wouldn't be this a little heavy for a server with many players? I mean, it would be a query for every single kill event, and the server is meant to be a 24-hour player killing madness (or at least it's my vision of the server).

2. Nightmare flag seems to make you drop any item in your inventory -correct me if I'm wrong-. Players could exploit this by stuffing their inventories with loads of rubbish. I need them to drop only equipment and weapons,

3. I suppose this would require the creation of a custom command in the source.

4. I was trying to avoid a hard modification to the database but... if there's nothing else... it could be ok.

Edited by VicThor
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

1. You could do attachrid(killedrid) to get BaseLevel - not sure how that compares to query_sql, though.

2. The 'nightmaredrop' mapflag includes a 'type' parameter:

//= pvp_nightmaredrop    id,type,percent
//=   id: Drop a specific item ID or "random"
//=   type: "inventory", "equip", or "all"
//=   percent: Rate of item drop.

4. 'noexp' mapflags everywhere?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

1. I'll test this

2. Awesome!

4. Sounds great, I hope it doesn't block experience gain from point #1 hehe

Thanks, I think I have enough information to run some tests. I'll keep looking for point #3 although it actually isn't a critical modification,

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

PK mode [ON/OFF] this should solve #3.

No, point #3 should apply only to the user that uses it. Setting that up affects the whole server.

Edited by VicThor
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I don't know what your reading, but to me that says, the ' indivisual ' who uses the command will enable/disable PK mode for themselves. Thus, effectively, making themselves invulnerable/unable to attack others(when off) and vulnerable/able to attack others(when on).

But, i mean don't take my word for it, all i did was read the entire topic, and the other topic linked inside...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

I don't know what your reading, but to me that says, the ' indivisual ' who uses the command will enable/disable PK mode for themselves. Thus, effectively, making themselves invulnerable/unable to attack others(when off) and vulnerable/able to attack others(when on).

But, i mean don't take my word for it, all i did was read the entire topic, and the other topic linked inside...

Oh I'm embarrased... I never noticed it was a link. I thought it was only a highlighted text. I'll take a look at it, sorry.

I just took a look at the link you posted, GmOcean,

Isn't that command exploitable? Lets say, if a player is being attacked, he could use the command to protect himself anytime. I'd like to avoid that kind of abuse.

Players should only use it for hunting monsters, I'm thinking of a way this could be accomplished...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

simple, you don't give players the ability to use the command. Instead you make an NPC use it for them. This way they will have to go back to town to enable/disable PK mode.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

set PK enable in conf\battle\misc.conf

in the source, its the same as making ALL maps become a pvp map

and the nopvp mapflag is the one responsible to make the map non-pvp

just read that file and you'll know which configuration you have to make

1.

OnPCKillEvent:

if ( killedrid == getcharid(3) ) end;

attachrid killedrid;

set .@level, baselevel;

attachrid killerrid;

set baseexp, baseexp + xxx ...

2. pvp_nightmaredrop mapflag ...

3.

4.

... they already answered

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   3
  • Joined:  08/06/12
  • Last Seen:  

Get it!, Thanks everyone, I'll start running tests this afternoon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...