FOnline Development > Questions and Answers

question about anti pvp server setup


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
--- Code: ---if(loc.IsEncounter() && target.IsPlayer() && cr.IsPlayer())
--- End code ---

--- Code: ---import bool IsTCTown(Map@ map) from "town";

if(!IsTCTown(map) && target.IsPlayer() && cr.IsPlayer())
        cr.Say(SAY_NETMSG, "Can't Attack here.");

--- End code ---

Thank you. really helped me figure this out :)


[0] Message Index

Go to full version