packethandler
public static void checkforflag(gamestate client) { if (client.entity.guildid == 0) return; var list = client.map.npcs.values.where(i => i.type == enums.npctype.flag).tolist(); foreach (var item in list) { if (kernel.getdistance(item.x, item.y, client.entity.x, client.entity.y) <= 1) { client.entity.flagstamp = time32.now; client.send(program.world.ctf.generatetimer(60)); client.send(program.world.ctf.generateeffect(client)); capturetheflag.addexploits(3, client.asmember); capturetheflag.addscore(3, client.guild); client.entity.addflag(msgupdate.flags.ctf_flag, 60, true); capturetheflag.sendscores(); client.map.removenpc(item, true); msgactionproto action = new msgactionproto(); action.uid = item.uid; action.timestamp = (uint)time32.now.gethashcode(); action.id = msgaction_tata.removeentity; client.sendscreen(msgaction_tata.sendpacket(action), true); } else { program.world.ctf.aroundbase(client); } } }