Jump to content
  • 0

PvP at all locations, except cities


nikita54421

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  05/06/17
  • Last Seen:  

Hello, friends!
Where can I find an open pvp script behind cities at a specific time here?

For example, pvp only works at night, at all locations except cities

The search did not help me!
Thank you

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

1 hour ago, nikita54421 said:

Hello, friends!
Where can I find an open pvp script behind cities at a specific time here?

For example, pvp only works at night, at all locations except cities

The search did not help me!
Thank you

https://github.com/rathena/rathena/blob/master/conf/battle/misc.conf

// PK Server Mode.  Turns entire server pvp(excluding towns). Experience loss is doubled if killed by another player.
// When players hunt monsters over 20 levels higher, they will receive 15% additional exp., and 25% chance of receiving more items. 
// There is a nopvp.txt for setting up maps not to have pk on in this mode.  Novices cannot be attacked and cannot attack.
// Normal pvp counter and rank display are disabled as well.
// Note: If pk_mode is set to 2 instead of 1 (yes), players will receive a 
//   manner penalty of 5 each time they kill another player (see manner_system 
//   config to adjust how this will affect players)

pk_mode: 0

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

To add up because I didn't read your post carefully: (not tested)

-	script	nighttime#pvp	-1,{
OnInit:
	if(isnight())
		setBattleFlag "pk_mode",1,true;
	else if (isday()) 
		setBattleFlag "pk_mode",0,true;
	end;
}

@nikita54421

Edited by pajodex
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  31
  • Reputation:   0
  • Joined:  05/06/17
  • Last Seen:  

3 minutes ago, pajodex said:

To add up because I didn't read your post carefully: (not tested)


-	script	nighttime#pvp	-1,{
OnInit:
	if(isnight())
		setBattleFlag "pk_mode",1,true;
	else if (isday()) 
		setBattleFlag "pk_mode",0,true;
	end;
}

@nikita54421

Thank you so much!
It helped me

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

You should also move these lines on the day/night script. Without it it will only set's the pk when the server starts or at @reloadscript.

Regards,

Chris

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

@llchrisll is right.. I just made the code right away without thinking xd. As long as you get the main point @nikita54421

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