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 07-05-2012, 06:50 PM
Fanty Fanty is offline
Registered User
Join Date: Mar 2012
Posts: 7
Fanty is on a distinguished road
Reconnect System Help please!:)

I have a problem with a reconnect system i want if the player says /reconnect he reconnects but in my script something failed,i'll show you.

PHP Code:
if (tokens[0] == "/reconnect") {
    
this.canuse = {"Graal773341"};
    if (
player.account in this.canusetriggerserver("gui"name"recall");
  }

help plz thanks.
__________________
Orangina Lovers not welcome.
Reply With Quote
  #2  
Old 07-05-2012, 06:50 PM
Fanty Fanty is offline
Registered User
Join Date: Mar 2012
Posts: 7
Fanty is on a distinguished road
it reconnects all players instead of one...
__________________
Orangina Lovers not welcome.
Reply With Quote
  #3  
Old 07-05-2012, 07:01 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
What does it look like on the serverside part of the code?
__________________
Testbed user: I figured since I can never find any scripters it was time to take desperate measures...and...TEACH MYSELF 0.0
Reply With Quote
  #4  
Old 07-05-2012, 07:07 PM
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
To reconnect a player, you need to call serverWarp(servername); clientside. If the player is the one doing the reconnecting, there's no reason to go serverside at all; just handle it in a clientside script instead in ChatBar.onAction or onPlayerChats.
__________________
Reply With Quote
  #5  
Old 07-05-2012, 08:26 PM
Fanty Fanty is offline
Registered User
Join Date: Mar 2012
Posts: 7
Fanty is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
To reconnect a player, you need to call serverWarp(servername); clientside. If the player is the one doing the reconnecting, there's no reason to go serverside at all; just handle it in a clientside script instead in ChatBar.onAction or onPlayerChats.
So it needs to be:
PHP Code:
//Clientside
if onPlayerChat=/reconnect
serverWarp
(servername); 
I'm new in scripting so
__________________
Orangina Lovers not welcome.
Reply With Quote
  #6  
Old 07-05-2012, 09:41 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
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/reconnect") {
    
serverwarp(servername);
  }

That'll work.
__________________
Reply With Quote
  #7  
Old 07-05-2012, 11:24 PM
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 Fanty View Post
So it needs to be:
PHP Code:
//Clientside
if onPlayerChat=/reconnect
serverWarp
(servername); 
I'm new in scripting so
If you're interested in learning, this is a good place to start.
__________________
Reply With Quote
  #8  
Old 07-06-2012, 08:27 AM
skillmaster19 skillmaster19 is offline
Registered User
Join Date: Oct 2010
Posts: 392
skillmaster19 will become famous soon enough
I would personally recommend using twinny's guide to learn the very basics, then fp4's to learn more advanced stuff.
Reply With Quote
  #9  
Old 07-06-2012, 08:53 AM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
Here is the link to Twinny's guide if you need it; click me
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #10  
Old 07-06-2012, 01:28 PM
Fanty Fanty is offline
Registered User
Join Date: Mar 2012
Posts: 7
Fanty is on a distinguished road
Thanks everyone,your so nice guys <3 thxxxx emera too
__________________
Orangina Lovers not welcome.
Reply With Quote
  #11  
Old 07-19-2012, 06:45 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Quote:
Originally Posted by Fanty View Post
PHP Code:
//Clientside
if onPlayerChat=/reconnect
serverWarp
(servername); 
tf

Once www.graal.net comes online again, I'd suggest checking the development section out, along with both Twinny's and FP4's guide to scripting.
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 10:14 PM.


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