
04-02-2011, 01:24 AM
|
|
Registered User
|
 |
Join Date: Nov 2005
Location: England
Posts: 2,919
|
|
Quote:
Originally Posted by Fulg0reSama
If I'm not mistaken, isn't this Tigairius's mousedrag?
(I'm probably mistaken but doesn't hurt to ask.)
|
I can confirm that it is Tigs.
Quote:
Originally Posted by Tigairius
PHP Code:
// NPC made by Tig function onStartDrag(control) { triggerclient("gui", name, "startDrag", control.account); } //#CLIENTSIDE function onCreated() { }
function onActionClientside(command, acct) { switch (command) { case "startDrag": onTimeout(); break; } }
function onTimeout() { temp.speed = 0.5; temp.c = findplayer(client.controller); if (temp.c.attr[20] == player.account) { temp.pos = (temp.c.attr[28].substring(1, temp.c.attr[28].length() -2)).tokenize(); }else { client.controller = ""; setTimer(0); return; }
if (temp.pos != NULL) { if (player.x + player.y != temp.pos[0] + temp.pos[1]) { temp.dist = {temp.pos[0] - player.x, temp.pos[1] - player.y}; temp.mx = dist[0] / (speed * 16); temp.my = dist[1] / (speed * 16); player.x += mx; player.y += my; } } setTimer(0.05); }
|
|
|
|
|