Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 11-21-2009, 06:04 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, ive got it working when it echos in the rc, but having problems showing it up in the gui.

I have this in a weapon, under clientside. Ill only be posted whats appropriate to the code needed.

PHP Code:
function onActionClientSide(cmddatadata2) {
  if (
cmd == "theAbyss"){
    
Stan_WindowText.setText(@ temp.data);
  }

To change the text on the actionclientside, using and

PHP Code:
public function Stan_Window_Leave.onAction(){
  
Stan_WindowText.setText("Top 5 in The Abyss:");
  
onCreated();
  
triggerserver("weapon"this.name"getAbyss");

to trigger the server to grab the info from the dbnpc, and this serverside
PHP Code:
function onActionServerSide(actionacton) {
  if (
temp.action == "getAbyss") {
    
triggerclient("weapon"this.name"theAbyss"this.db.getTopAbyss());
  }

Then in the dbnpc,

PHP Code:
public function getTopAbyss(){
  
// Initialize Array and Kills Structure 
  
temp.guildzname getGuildList(); 
  
// Loop and Display Kills 
  
for (temp.gtemp.guildzname) { 
    
temp.kills this.guilds.(@temp.g).kills
    
temp.data temp."'s kills: " temp.kills
  } 
  return 
temp.data;

All i can get it to show in the gui is the last of all the guilds and its kills, cant figure out why, if the echo in rc worked fine.
__________________
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
 


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 05:31 PM.


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