function talk($glob, $mess, $destinatair = 0) { if ($destinatair == 0) { $destinatair = 'all'; } $glob['msg_c']++; $line = $glob['del'] . $glob['id_f'] . $glob['del'] . $glob['equipe'] . $glob['del'] . $glob['msg_c'] . $glob['del'] . $glob['lvl'] . $glob['del'] . $destinatair . $glob['del'] . $mess . $glob['del']; $line = 'broadcast ' . $line; send_msg_to_serv($glob, $line); return $glob; }
function init_message($glob) { $line = xfgets($glob); if ($line == "BIENVENUE") { aff_client("Nous sommes connecte"); } send_msg_to_serv($glob, $glob['equipe']); $glob['num_client'] = xfgets($glob); $arr_map = explode(' ', xfgets($glob)); $glob['map_x'] = $arr_map[0]; $glob['map_y'] = $arr_map[1]; return $glob; }
function drop_thystame($glob) { send_msg_to_serv($glob, "pose thystame"); return $glob; }
function avance($glob) { send_msg_to_serv($glob, "avance"); return $glob; }
function inventaire($glob) { send_msg_to_serv($glob, "inventaire"); return $glob; }
function get_thystame($glob) { send_msg_to_serv($glob, "prend thystame"); return $glob; }
function send_repeat($glob) { send_msg_to_serv($glob, $glob['repeat']); return $glob; }
function incantation($glob) { send_msg_to_serv($glob, "incantation"); return $glob; }