FOnline Development > Questions and Answers
question about anti pvp server setup
(1/1)
chenzo:
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?
kompreSor:
maybe just add to combat.fos@CombatAttack something like that
--- Code: ---if(loc.IsEncounter() && target.IsPlayer() && cr.IsPlayer())
return;
--- End code ---
or
--- Code: ---import bool IsTCTown(Map@ map) from "town";
if(!IsTCTown(map) && target.IsPlayer() && cr.IsPlayer())
{
cr.Say(SAY_NETMSG, "Can't Attack here.");
return;
}
--- End code ---
chenzo:
Thank you. really helped me figure this out :)
Navigation
[0] Message Index
Go to full version