Jump to content
  • 0

PvP at all locations, except cities


Question

Posted

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

5 answers to this question

Recommended Posts

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

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

  • 0
Posted

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

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