Find
You are looking at a command called setfriend
setfriend {player} to {option}
Options:
friend - allows them to goto you even if you are set for privacy
enemy - gives you a special warning when they login
kos - kill on sight, you will automatically attack them if they arrive near you. also gives you a warning when they login.
clear - clear just that player's friend setting
setfriend clear
Related:
read the material called friend
read the command called setprivate
read the material called private
This clears the whole friend list.
Created by
thorn
, last updated 14 Dec 2008
Code
get $target,$rel,$text in $loc;
if $target > 0 then checkplayer else try2;
##try2:
get $target,$rel,$text;
if $target > 0 then checkplayer else badtarget;
##checkplayer:
if $target's class ne 'player' then notplayer else checktext;
##notplayer:
sayto $init_obj,"invalid: only players can be on your friend list";
##badtarget:
get $text;
if $text == 'clear' then clearlist else badtarget2;
##badtarget2:
sayto $init_obj,"invalid: bad target";
##checktext:
getgender $init_obj;
print "[$init_obj] edits $hisher friend list.";
$material = $init_obj's material;
swap $material add _friend_;
$matvals = $init_obj's matvals;
manipulate $matvals get friend to $friend;
$ftarg = "f$target";
if $text == 'clear' then setclear else check2;
manipulate $matvals set friend to $friend;
set $init_obj's material to $material;
set $init_obj's matvals to $matvals;
##setclear:
manipulate $friend set $ftarg to "" by 2;
##check2:
$valid = "=friend=enemy=kos=";
$testval = "=$text=";
if $valid like $testval then setit else invalid;
##setit:
$ftarg = "f$target";
manipulate $friend set $ftarg to $text by 2;
##invalid:
sayto $init_obj,"Invalid parameter: setfriend {target} to either clear friend enemy or kos";
##clearlist:
$material = $init_obj's material;
$matvals = $init_obj's matvals;
swap $material take _friend_;
manipulate $matvals set friend to "";
set $init_obj's material to $material;
set $init_obj's matvals to $matvals;
sayto $init_obj,"Friend list cleared.";