Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-25-2009, 06:21 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Passing a list of NPCs from clientside to serverside

Maybe I was being too specific last time;
all I really need is to send a list of NPCs to the server. I got the triggeraction all worked out no problems, but how do I send a list of NPCs that the server can do something with?
I can make a comma-delimited string of npc.ids, but the server can't do anything with just npc.ids apparently.
I can make a comma-delimited string of npc.names, but the client can't get npc.name.
I can make a comma-delimited string of npc objects, but as npcs are not themselves strings they collapse when added to a string list.

Is there a way to concatenate an NPC-object onto a list of NPC-objects, and wind up with the equivalent of the NPC-list you get with findareanpcs? That might work. That or a way to get an npc's name clientside or findnpcbyid serverside.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #2  
Old 02-26-2009, 01:28 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
It is possible to send clientside<->serverside data.

I don't know if it helps, at all.

PHP Code:
function getMyData() {
  return 
this.name;
}
//#CLIENTSIDE
function onCreated() {
  
join("triggercontrol_class");
}
function 
dataPlease() {
  
this.data serverfunction2(null"getMyData");

__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
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 12:56 AM.


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