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
  #3  
Old 11-24-2009, 04:17 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
Ill post the code its using in pieces. I tried some of those, they didnt work.
The gui weapon:

PHP Code:
function onCreated() {
  
this.db findnpc("db_registeredguilds");
}

function 
onActionServerSide(actionacton) {
  if (
temp.action == "getImage"){
    
triggerclient("weapon"this.name"getFlag"this.db.getGuildFlag());
  }
}
//#CLIENTSIDE
function onActionClientSide(cmddatadata2) {
  if (
cmd == "getFlag"){
    
Stan_Window_Image_.image temp.data;  
    
this.guildflag temp.data;
    
player.chat temp.data;
  }
}
function 
onCreated(){
  
triggerserver("weapon"this.name"getImage");
}
new 
GuiWindowCtrl("Stan_Window") {
    
profile "GuiBlueWindowProfile";
    
useOwnProfile true
    
extent "495 300";
    
50;
    
50;
    
text "Guild Registration Lobby";
    
visible true;
    
canResize false;
    new 
GuiShowImgCtrl("Stan_Window_Image") { 
      
12
      
50
      
width 150
      
height 150
      
image ""
    } 

PHP Code:
DBNPC
public function getGuildFlag() {
  return 
this.guilds.(@player.guild).flag;

the flag is
PHP Code:
guilds.guildname.flag="block.png" 
also tried the flag w/o quotes.

in the set for the image on the action clientside ive tried:
setImage,
setImg,
and using a variable then putting the variable in the gui image = section.
With the code that is posted, all that shows up is a big "0" (zero) when I use
PHP Code:
this.guildflag 
if i use it blank as shown, it shows up nothing.
i put player.chat and its saying "block.png" when i use so I know it shouldnt be empty, its just not setting.

If im doing this completely wrong, can someone show an example and please explain how it works? really wish graal.net worked. :/
__________________
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:19 AM.


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