Jump to content
  • 0
Gidz Cross

Adding feature to @pk command

Question

What is @pk command? ~ its like a @battleignore but only for Players. Refer to this 

Anyway i have that src into my trunk. It works alright. But there are limitation to it. My server setup is PK type. Even tho its PK type im opting to have the @pk command for the newbies. Anyways. What i was trying to accomplish is to have some function/checker to set/force the pk state into 1(if they @pk off) when they got into selected maps.

Selected maps?
~ Yes. Selected maps. Like PVP Room for example. Imagine player set his pk state to off and warp to pvp room. Players wont be able to attack that guy.

To put it simply. When players warped to selected maps their pk state should be force to on or normal state.


Can someone help me make a checker for @pk command? Or make some script to the the pk state into 1. Thanks!

my discord question snapchat from rA's discord.

image.png

Edited by gidzdlcrz
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Try putting this in pc.cpp function in pc_setpos

	if (strncmp(mapdata->name, "map", strlen(mapdata->name)) == 0) { // in "map" choose the map what you prefeer
			sd->state.pk = 1;
	}
Edited by EveeX
.
  • MVP 1
Link to comment
Share on other sites

  • 0
On 11/30/2020 at 8:23 AM, Gidz Cross said:

Can someone help me make a checker for @pk command? Or make some script to the the pk state into 1. Thanks!

 

On 11/30/2020 at 8:23 AM, Gidz Cross said:

Selected maps?
~ Yes. Selected maps. Like PVP Room for example. Imagine player set his pk state to off and warp to pvp room. Players wont be able to attack that guy.

I already revamp change the script of this base on your explanation if you need just notify me.
 

Link to comment
Share on other sites

  • 0
On 1/22/2021 at 10:06 PM, Cookie-rae said:

 

I already revamp change the script of this base on your explanation if you need just notify me.
 

Wow! Can i check? Ive been away to ragnarok scene for 2 months now. ♥ But i want to check good sir!

Link to comment
Share on other sites

  • 0
On 3/2/2021 at 12:27 AM, Gidz Cross said:

Wow! Can i check? Ive been away to ragnarok scene for 2 months now. ♥ But i want to check good sir!

i implement it to mapflag on it. 

Link to comment
Share on other sites

  • 0
On 3/12/2021 at 1:36 PM, Cookie-rae said:

i implement it to mapflag on it. 

How?

Link to comment
Share on other sites

  • 0

will this be available on public?

On 12/23/2020 at 2:46 PM, EveeX said:

Try putting this in pc.cpp function in pc_setpos

	if (strncmp(mapdata->name, "map", strlen(mapdata->name)) == 0) { // in "map" choose the map what you prefeer
			sd->state.pk = 1;
	}

where should i exactly put this? i want to try it out

Link to comment
Share on other sites

  • 0
Posted (edited)

Sorry for late share.

I think this is the one you are looking for. I already added the feature you like.
https://github.com/coookie1010/Server-Patches/commit/02498a59983d7c1fdbfd56a69b33297e73320b14

 

 

On 12/23/2020 at 2:46 PM, EveeX said:

Try putting this in pc.cpp function in pc_setpos

	if (strncmp(mapdata->name, "map", strlen(mapdata->name)) == 0) { // in "map" choose the map what you prefeer
			sd->state.pk = 1;
	}

This method is so much harder than the mapflag function.


you can force a map with mapflag function for example
prontera mapflag pkarea
 

Edited by Cookie-rae
Link to comment
Share on other sites

  • 0

thanks for the great share! i try it on my free time

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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.