Graal Pastebin
New PastePasted on January 7, 2012.
View the raw file
function onActionServerSide() { switch (params[0]) { case "sendwarpdata": with(findplayer(params[3])) { player.x = params[1]; player.y = params[2]; } break; } } //#CLIENTSIDE function onCreated() { this.on = 0; setTimer(0.05); for (temp.pl : allplayers) { pl.client.selec = false; client.selec = false; } } function onKeyPressed(code, Key) { if (code == 160) { //shift key if (this.on == 0) { this.on = 1; player.chat = "(Mousewarp: ON)"; } else { this.on = 0; player.chat = "(Mousewarp: OFF)"; } } } function onMouseDown(mode) { if (mode == "left" && this.on == 1) { for (temp.p: players) { if (mousex in | temp.p.x - 1, temp.p.x + 3 | && mousey in | temp.p.y, temp.p.y + 2 | ) { if (p.client.selec == true) { player.chat = "[Selected by another player...]"; } else { client.sel = p.account; p.client.selec = true; player.chat = "[Selected" SPC p.account @ "(" @ p.client.selec @")]"; } } elseif(client.sel != NULL && client.sel == p.account) { triggerserver("gui", name, "sendwarpdata", mousex, mousey, p.account); p.client.selec = false; client.sel = NULL; } } } if (mode == "right" && client.sel != NULL) { client.sel = NULL; p.client.selec = false; player.chat = "[Cleared Selecion]"; } }