Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-21-2011, 07:45 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Accessing data from login2

I'd imagine it takes trust from stefan and permission, but this is what I'd need to translate specific global guild info per players request on a server correct? Is there any info on this stuff?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #2  
Old 03-21-2011, 07:56 PM
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
You can request some stuff, i.e.
HTML Code:
  temp.response = sendListerRequest("checkguildexists", temp.gName);
  if (temp.response[1][1] == true) {
    player.sendMessageBox(N_("That gang name can't be created, it exists on Graal already. Contact an admin if you're the owner of this gang."));
    return false;
  }
etc, research this stuff
__________________
Reply With Quote
  #3  
Old 03-21-2011, 08:32 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xAndrewx View Post
You can request some stuff, i.e.
HTML Code:
  temp.response = sendListerRequest("checkguildexists", temp.gName);
  if (temp.response[1][1] == true) {
    player.sendMessageBox(N_("That gang name can't be created, it exists on Graal already. Contact an admin if you're the owner of this gang."));
    return false;
  }
etc, research this stuff
As far as I know, sendListerRequest is not a built-in function. You would need to sendtext("lister", ...) and then get the result from onReceiveText.
__________________
Skyld
Reply With Quote
  #4  
Old 03-21-2011, 08:39 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Thanks yall.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #5  
Old 03-21-2011, 08:48 PM
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
Oh yeah, we made this together at skyld haha

HTML Code:
function sendListerRequest(temp.option, temp.params) {
  sendtext("lister", temp.option, temp.params);
  
  if (waitfor(this, "ReceiveText", 15)) {
    if (params[0] == "lister") {
      temp.returndata = params;
      temp.returndata.delete(0);
      
      return temp.returndata;
    }
      
    return false;
  }
  
  return false;
}
__________________
Reply With Quote
  #6  
Old 03-21-2011, 09:42 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Im probably going to end up asking this later so I'll just ask now. Is there a way to communicate with the server that guilds are stored on to send and recieve info. Of coarse, rights and such still applying. I just don't know where to even start which is why I'm asking.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #7  
Old 03-22-2011, 09:21 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
Here are some links

http://wiki.graal.net/index.php/Crea...v/Graal_v4_IRC
This explains how to use sendText

http://forums.graalonline.com/forums...hp?t=134258222
A list of sendText stuff

HTML Code:
sendText( "lister", "checkinguild", { str accountname, str guildname } ); - returns the players nick in the guild and the players guildrank - also returns if the guild is pending ! 
sendText( "lister", "checkguildexists", str guildname ); - returns true or false if the guildname exists - also returns true if the guild is pending !  
The only two I can find- but I think these will be all you need
__________________
Reply With Quote
  #8  
Old 03-23-2011, 01:41 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Appreciated.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #9  
Old 12-21-2011, 02:15 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I know this is a pretty old thread now, but I did have more questions.

So to use sendtext, even to just get info on guilds, I have to go through logging in on a dbnpc or wnpc serverside with an ircbot?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 12-21-2011, 02:31 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
Quote:
Originally Posted by sssssssssss View Post
So to use sendtext, even to just get info on guilds, I have to go through logging in on a dbnpc or wnpc serverside with an ircbot?
No.

IRCBots just use the sendtext function to communicate in the channel.
__________________
Quote:
Reply With Quote
  #11  
Old 12-21-2011, 02:47 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I know I'm not getting it, but here's what I got that doesn't work.

Ive simply tried
PHP Code:
player.chat sendText"lister""checkinguild", {findplayer(params[1]),findplayer(params[1]).guild} ); 
in a function im already using serverside, and it just puts "0".

I also tried in that same function putting
PHP Code:
sendText"lister""checkinguild", {findplayer(params[1]),findplayer(params[1]).guild} ); 
then serverside I put
PHP Code:
function onReceiveTexttemp.texttypetemp.textoptiontemp.textlines ) { 
  if (
texttype == "lister") {
    if (
textoption == "checkinguild") {
      
player.chat textlines;
    }
  }

and that doesnt do anything at all. I'm sure the params are correct, because I'm already bringing up other player info in that function, that way.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #12  
Old 12-21-2011, 02:54 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by sssssssssss View Post
then serverside I put
PHP Code:
function onReceiveTexttemp.texttypetemp.textoptiontemp.textlines ) { 
  if (
texttype == "lister") {
    if (
textoption == "checkinguild") {
      
player.chat textlines;
    }
  }

and that doesnt do anything at all. I'm sure the params are correct, because I'm already bringing up other player info in that function, that way.
There is no player object for the event, you should use echo(textlines); instead to ensure it's working.
Reply With Quote
  #13  
Old 12-21-2011, 02:56 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
There won't be a player accessible in that scope, use the function they provided above instead. Example:

PHP Code:
function onCreated() {
  
temp.pl findplayer("yourAccount");
  
temp.pl.chat sendListerRequest("checkinguild", {temp.pl.accounttemp.pl.guild});
}

function 
sendListerRequest(temp.optiontemp.params) {
  
sendtext("lister"temp.optiontemp.params);
  
  if (
waitfor(this"ReceiveText"15)) {
    if (
params[0] == "lister") {
      
temp.returndata params;
      
temp.returndata.delete(0);
      
      return 
temp.returndata;
    }
      
    return 
false;
  }
  
  return 
false;

__________________
Quote:
Reply With Quote
  #14  
Old 12-21-2011, 03:49 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Ok, so I need to break up the return data to check and print it out, and I've tried all I could think of, but its not go. Is it passible to client at all?

Ive tried doing
PHP Code:
temp.poo sendListerRequest("checkinguild", {temp.pl.accounttemp.pl.guild})[0]; 
and so on but it wont send in triggerClient.

Iv also done

PHP Code:
if (waitfor(this"ReceiveText"15)) {
    if (
params[0] == "lister") {
      
temp.returndata params;
      
temp.returndata.delete(0);
      
temp.guildcheck returndata[0];
      
temp.guildacct returndata[1][0];
      
temp.guildname returndata[1][1];
      
temp.guildnick returndata[1][2];
      
temp.guildrank returndata[1][3];
      echo(
guildcheck,guildacct,guildname,guildnick,guildrank);
      
//return {guildcheck,guildacct,guildname,guildnick,guildrank};
      
triggerClient("gui",name,"gotGuildInfo",guildcheck,guildacct,
      
guildname,guildnick,guildrank);
    } 
which has been the closest, but doing that trigger is useless too. Ive also tried to send the sendListerRequest function in the triggerClient itself as param2, then breaking it up clientside, but that didnt work either. I'm out of ideas. :/
When i echo the last one i posted, its all fine, just need to send it off to client.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #15  
Old 12-21-2011, 04:41 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Just to add it also will not let me set them as a clientr.var either. Does this information just show up and that's the end of it?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
Reply


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:15 AM.


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