Jump to content
  • 0

Adding feature to @pk command


Question

Posted (edited)

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

10 answers to this question

Recommended Posts

  • 1
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
  • Upvote 1
  • 0
Posted (edited)

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
  • 0
Posted
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.
 

  • 0
Posted
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!

  • 0
Posted

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

  • 0
Posted

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

okay i finally tested it.

i think it should be better if the force pk will automatically after warping. they could actually sit there/spectate on pvp map area ex. new_1-1/@go 15

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

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

hello did you already fix this? 
and mind to share the diff? 
im having this problem too.

@Gidz Cross

 

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;
	}

@EveeX where should i put this?

Edited by Takuyakii

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...