Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-31-2011, 02:33 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
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
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);


__________________
Reply With Quote
  #2  
Old 03-31-2011, 02:53 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
If you really scripted it, you would know the drag 'stops' at the return.

Please read the Scripting Subforum Rules.
__________________
Quote:
Reply With Quote
  #3  
Old 03-31-2011, 02:55 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
If I'm not mistaken, isn't this Tigairius's mousedrag?
(I'm probably mistaken but doesn't hurt to ask.)
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #4  
Old 03-31-2011, 05:42 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
He never said he scripted it
edit: just saw the //scripted by
Reply With Quote
  #5  
Old 04-02-2011, 12:55 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
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
__________________
Reply With Quote
  #6  
Old 04-02-2011, 01:03 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by Emera View Post
Did i even say i scripted it?
Yes.

Quote:
Originally Posted by Emera View Post

here is MouseC
PHP Code:
 //Scripted by Emera :D 
Reply With Quote
  #7  
Old 04-02-2011, 01:04 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Emera View Post
Did i even say i scripted it?
no now help or leave
Good luck getting help.
__________________
Reply With Quote
  #8  
Old 04-02-2011, 01:19 AM
Gothika Gothika is offline
Global News Team
Gothika's Avatar
Join Date: Mar 2006
Location: Newcastle, England
Posts: 2,425
Gothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to beholdGothika is a splendid one to behold
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.
__________________


Reply With Quote
  #9  
Old 04-02-2011, 01:24 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by Fulg0reSama View Post
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 View Post
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);

Reply With Quote
  #10  
Old 04-02-2011, 10:33 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Emera View Post
Did i even say i scripted it?
no now help or leave
ugh...

//Scripted by Emera
__________________
Reply With Quote
  #11  
Old 04-02-2011, 11:51 AM
AlexanderK AlexanderK is offline
Registered User
AlexanderK's Avatar
Join Date: Mar 2006
Location: Germany
Posts: 79
AlexanderK is on a distinguished road
Send a message via MSN to AlexanderK
I like how when I was on your server you said you scripted it with a friend.
Reply With Quote
  #12  
Old 04-02-2011, 12:55 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
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
__________________
Reply With Quote
  #13  
Old 04-02-2011, 05:27 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I hope one day you'll realize I pretty much told you where to put your snippet.
__________________
Quote:
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:26 AM.


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