fodev.net
FOnline Development => Questions and Answers => Topic started by: chenzo on November 01, 2022, 02:14:23 am
-
Me and a couple of mates have been messing around with our own server using aftertimes as a base. Not doing any serious changes.. just adding missions and a few maps.
We have run into an issue though and cant get our heads around it. We wanted to disable PVP in random encounters and make it so the only place pvp can happen is town control towns... alternatively, make it so players cant randomly bump into eachother whilst traveling. Can anyone shed any light on ways to do either of these things?
-
maybe just add to combat.fos@CombatAttack something like that
if(loc.IsEncounter() && target.IsPlayer() && cr.IsPlayer())
return;
or
import bool IsTCTown(Map@ map) from "town";
if(!IsTCTown(map) && target.IsPlayer() && cr.IsPlayer())
{
cr.Say(SAY_NETMSG, "Can't Attack here.");
return;
}
-
Thank you. really helped me figure this out :)