Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-12-2009, 07:02 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
Gui Problems

Im having issues getting data from a dbnpc and putting it in gui, again. Im not sure why, but in this situation, all the values in the array in the dbnpc are showing up in the main window text on the gui. It should be splitting it up. Worked for a while, until I added some stuff in.

PHP Code:
function onCreated()
{
  
this.db findnpc("NpcChat");
}
function 
onActionServerSide(){
  if (
params[0] == "getText"){
    
triggerClient("weapon"this.name"getText"this.db.info);
  }

}
//#CLIENTSIDE
function onActionClientSide(){
  if (
params[0] == "getText"){
    
temp.setup params[1];
    
NpcChat_Window1.setText(temp.setup[0]);
    
NpcChat_Text1.setText(temp.setup[1]);
    
//temp.list = "";
    //temp.data = {params[1][2], params[1][3], params[1][4], params[1][5]};
    //for (temp.line: temp.data) {
    //  temp.list @= temp.line @ "\n";
    //}
    
NPC_Chat_ItemList.addrow(temp.setup[2]);
    
NPC_Chat_ItemList.addrow(temp.setup[3]);
    
NPC_Chat_ItemList.addrow(temp.setup[4]);
    
NPC_Chat_ItemList.addrow(temp.setup[5]);
    
temp.img temp.setup[6];
    
NpcChat_Image1.image temp.img;
  }

}
public function 
OpenWindowdata ){
  if (
NpcChat_Text1 != NULLNpcChat_Window1.destroy();
  
triggerServer("weapon"this.name"getText");
  new 
GuiWindowCtrl("NpcChat_Window1") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "211,231";
    
useOwnProfile true
    
profile.bitmap "guiarm_window.png"
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
text "Loading...";
    
309;
    
88;

    new 
GuiTextCtrl("NpcChat_Text1") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "";
      
width 42;
      
76;
    }
    new 
GuiScrollCtrl("NpcChat_MultiLine1_Scroll") {
      
profile GuiBlueScrollProfile;
      
useOwnProfile true
      
profile.bitmap "guiarm_scroll.png"
      
height 75;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 176;
      
19;
      
143;

      new 
GuiMLTextCtrl("NpcChat_MultiLine1") {
        
profile GuiBlueMLTextProfile;
        
height 32;
        
horizsizing "width";
        
text "Loading...";
        
width 151;
      }
      new 
GuiMLTextCtrl("NpcChat_MultiLine2") {
        
profile GuiBlueMLTextProfile;
        
height 66;
        
horizsizing "width";
        
text "Loading...";
        
width 151;
      }
      new 
GuiMLTextCtrl("NpcChat_MultiLine3") {
        
profile GuiBlueMLTextProfile;
        
height 32;
        
horizsizing "width";
        
text "Loading...";
        
width 151;
      }
      new 
GuiMLTextCtrl("NpcChat_MultiLine4") {
        
profile GuiBlueMLTextProfile;
        
height 32;
        
horizsizing "width";
        
text "Loading...";
        
width 151;
      }
    }
    new 
GuiScrollCtrl"Npc_Chat_Scroll" ) {
      
this.width 250;
      
this.height 330;
      
      
this.19;
      
this.143;
      
      
this.hScrollBar "alwaysOff";
      
this.vScrollBar "dynamic";
      
      new 
GuiTextListCtrl"Npc_Chat_ItemList" ) {
        
this.width 250;
        
this.height 330;
      }
    }
    new 
GuiShowImgCtrl("NpcChat_Image1") { 
      
9
      
partx 0;
      
party 60;
      
partw 50;
      
parth 36;
      
width 150
      
height 150
      
image "block.png"
    } 
  }

and in the dbnpc NpcChat as a flag:
PHP Code:
info"Ramerd","You like girls?","YOURE ***!","I'm ***","","NO WAY!""head22.png"
Like i said, the
PHP Code:
NpcChat_Window1.setText(temp.setup[0]); 
is showing up the entire array, and shouldnt be as far as I can see. None of the other texts or lines are getting any values at all.
__________________
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
 

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:19 PM.


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