Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   MouseC Help (https://forums.graalonline.com/forums/showthread.php?t=134262624)

Emera 03-31-2011 02:33 AM

MouseC Help
 
Hey guys i have been using a drag script on Emera and i have suceeded in making it enable player chat to say "Being Dragged..." when him/her is being dragged. But i would like some help on where to put
PHP Code:

player.chat "Stopped Drag"

here is MouseC:confused:
PHP Code:

 //Scripted by Emera :D
function onStartDrag(control) {
triggerclient("gui"name"startDrag"control.account);
}
//#CLIENTSIDE

function onCreated() {
}

function 
onActionClientside(commandacct) {
switch (
command) {
case 
"startDrag":
onTimeout();
player.chat "Being Dragged...";
break;
}

}

function 
onTimeout() {
temp.speed 0.5;
temp.findplayer(client.controller);
if (
temp.c.attr[20] == player.account) {
temp.pos = (temp.c.attr[28].substring(1temp.c.attr[28].length() -2)).tokenize();
}else {
client.controller "";
setTimer(0);
return;
}

if (
temp.pos != NULL) {
if (
player.player.!= temp.pos[0] + temp.pos[1]) {
temp.dist = {temp.pos[0] - player.xtemp.pos[1] - player.y};
temp.mx dist[0] / (speed 8);
temp.my dist[1] / (speed 8);
player.+= mx;
player.+= my;
}
}
setTimer(0.001);




fowlplay4 03-31-2011 02:53 AM

If you really scripted it, you would know the drag 'stops' at the return.

Please read the Scripting Subforum Rules.

Fulg0reSama 03-31-2011 02:55 AM

If I'm not mistaken, isn't this Tigairius's mousedrag?
(I'm probably mistaken but doesn't hurt to ask.)

Cubical 03-31-2011 05:42 AM

He never said he scripted it
edit: just saw the //scripted by

Emera 04-02-2011 12:55 AM

Quote:

Originally Posted by fowlplay4 (Post 1640224)
If you really scripted it, you would know the drag 'stops' at the return.

Please read the Scripting Subforum Rules.

Did i even say i scripted it?
no now help or leave :)

cyan3 04-02-2011 01:03 AM

Quote:

Originally Posted by Emera (Post 1640640)
Did i even say i scripted it?

Yes.

Quote:

Originally Posted by Emera (Post 1640215)

here is MouseC:confused:
PHP Code:

 //Scripted by Emera :D 



cbk1994 04-02-2011 01:04 AM

Quote:

Originally Posted by Emera (Post 1640640)
Did i even say i scripted it?
no now help or leave :)

Good luck getting help.

Gothika 04-02-2011 01:19 AM

If it is Tig's script it is free to use so fair enough. But taking someone elses script and editting it slightly or adding too it does not give you the right to replace his name with yours. Give the original scripter credit where due.

cyan3 04-02-2011 01:24 AM

Quote:

Originally Posted by Fulg0reSama (Post 1640227)
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 (Post 1477626)
PHP Code:

// NPC made by Tig
function onStartDrag(control) {
  
triggerclient("gui"name"startDrag"control.account);
}
//#CLIENTSIDE
function onCreated() {
}

function 
onActionClientside(commandacct) {
  switch (
command) {
    case 
"startDrag":
      
onTimeout();
    break;
  }
}

function 
onTimeout() {
  
temp.speed 0.5;
  
temp.findplayer(client.controller);
  if (
temp.c.attr[20] == player.account) {
    
temp.pos = (temp.c.attr[28].substring(1temp.c.attr[28].length() -2)).tokenize();
  }else {
    
client.controller "";
    
setTimer(0);
    return;
  }

  if (
temp.pos != NULL) {
    if (
player.player.!= temp.pos[0] + temp.pos[1]) {
      
temp.dist = {temp.pos[0] - player.xtemp.pos[1] - player.y};
      
temp.mx dist[0] / (speed 16);
      
temp.my dist[1] / (speed 16);
      
player.+= mx;
      
player.+= my;
    }
  }
  
setTimer(0.05);




xAndrewx 04-02-2011 10:33 AM

Quote:

Originally Posted by Emera (Post 1640640)
Did i even say i scripted it?
no now help or leave :)

ugh...

//Scripted by Emera :D

AlexanderK 04-02-2011 11:51 AM

I like how when I was on your server you said you scripted it with a friend.

Emera 04-02-2011 12:55 PM

Oh yah sorry must have been there when i set it in gui RC and no alex i never 0o. Sorry tig FULL CREDIT TO TIG apologize to tig sorry :(

fowlplay4 04-02-2011 05:27 PM

I hope one day you'll realize I pretty much told you where to put your snippet.


All times are GMT +2. The time now is 06:22 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.