View Single Post
  #13  
Old 12-03-2009, 12:22 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, now back to the original reason for this topic. It's a large amount of code, but im going to post it all, except some unnecessary text. I'm not the best, obviously, so please, dont comment on my messyness, I already know, and I know a ton of stuff in unnecessary. The player.chat = temp.data2[7] says the right thing, but the image still wont set.
PHP Code:
function onCreated() {
  
this.db findnpc("db_registeredguilds");
}
function 
onActionServerSide(actionacton) {
  if (
temp.action == "getRegisteredGuilds") {
    
triggerclient("weapon"this.name"guildList"this.db.getGuildList());
  }
  else if (
temp.action == "getGuildList") {
    
this.g1 this.db.getGuildRank(player.guild);
    
this.g2 this.db.getGuildKills(player.guild0);
    
this.g3 this.db.getGuildDeaths(player.guild0);
    
this.g4 this.db.getGuildLevel();
    
this.g5 this.db.getGuildRupees();
    
this.g6 this.db.getGuildEc();
    
this.g7 this.db.getGuildMessage(player.guild);
    
this.g8 this.db.getGuildFlag();
    
temp.data2 = {this.g1this.g2this.g3this.g4this.g5this.g6this.g7this.g8};
    
triggerclient("weapon"this.name"memberList"this.db.getMembersList(), temp.data2);
  }
  else if (
temp.action == "registerGuild") {
    
this.db.RegistersdeServer();
  }
  else if (
temp.action == "sendTheTextMes") {
    
this.db.guilds.(@player.guild).message temp.acton;
  }
  else if (
temp.action == "sendTheTextAdd") {
    
this.db.AddMemRegGuildServer(temp.acton);   
  }
  else if (
temp.action == "sendTheTextDel") {
    if (
temp.acton != this.db.guilds.(@player.guild)[0]){
      
this.db.DelMemRegGuildServer(temp.acton);
    }
  }
  else if (
temp.action == "getAbyss") {
    
triggerclient("weapon"this.name"theAbyss"this.db.getTopAbyss());
  }
  else if (
temp.action == "getTop") {
    
triggerclient("weapon"this.name"getTop"this.db.getTopGuild());
  }
}
//#CLIENTSIDE
function onActionClientSide(cmddatadata2) {
  if (
cmd == "memberList"){
    
temp.list = "";
    for (
temp.linetemp.data) {
      
temp.list @= temp.line "\n";
    }
    
//show up all the myguild stuff here. This code is only showing access
    
temp.newVar data2;
    
temp.guildAcc "Members with Access: " temp.data;
    
temp.guildName "Guild: " player.guild;
    
temp.guildLeader "Guild Leader: " temp.data[0];
    
temp.guildRating "Guild Rating: " temp.newVar[0];
    
temp.guildWins "Guild Wins: " temp.newVar[1];
    
temp.guildLosses "Guild Losses: " temp.newVar[2];
    
temp.guildControl "Guild Control: " temp.data2[3];
    
temp.guildRupees "Guild Rupees: " temp.data2[4];
    
temp.guildEC "Guild EC: " temp.data2[5];
    
temp.guildFlag "";
    
temp.guildMessage "Guild Message: " temp.data2[6];
    if (
player.guild != ""){
      
player.chat temp.data2[7];
      
Stan_Image1.image temp.data2[7];
      
Stan_WindowText.setText();
    }else{
      
Stan_WindowText.setText("Please put on your guild tag!");
    }

  }
}
function 
onCreated(){
}
public function 
OpenWindow(){
  new 
GuiWindowCtrl("Stan_Window") {
    
profile "GuiBlueWindowProfile";
    
useOwnProfile true
    
profile.bitmap "guiarm_window.png"
    
extent "495 300";
    
50;
    
50;
    
text "Guild Registration Lobby";
    
visible true;
    
canResize false;  
    new 
GuiScrollCtrl("Stan_Window_Scroll") {
      
profile "GuiBlueScrollProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_scroll.png"
      
extent "300 250";
      
Stan_Window.width 2;
      
Stan_Window.height 1;
      
visible true;
      
hscrollbar "alwaysOff";
      
vscrollbar "dynamic";
    }
    new 
GuiButtonCtrl("Stan_Window_Buy") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "5 23";
      
text "List";
    }
    new 
GuiButtonCtrl("Stan_Window_Sell") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "98 25";
      
position "101 23";
      
text "Top 5";
    }
    new 
GuiButtonCtrl("Stan_Window_Leave") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "198 23";
      
text "The Abyss";
    }
    new 
GuiButtonCtrl("Stan_Window_Register") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "294 23";
      
text "Register Guild";
    }
    new 
GuiButtonCtrl("Stan_Window_Addm") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "200 245";
      
text "Add Access";
    }
    new 
GuiButtonCtrl("Stan_Window_Delm") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "307 245";
      
text "Remove Access";
    }
    new 
GuiButtonCtrl("Stan_Window_Myg") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "97 25";
      
position "390 23";
      
text "MyGuild";
    }
    new 
GuiButtonCtrl("Stan_Window_GMessage") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "105 25";
      
position "85 245";
      
text "Change Message";
    }  
    new 
GuiButtonCtrl("Stan_Window_RegisterDone") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "105 25";
      
position "85 245";
      
text "Register";
    } 
    new 
GuiButtonCtrl("Stan_Window_DelAcc") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "105 25";
      
position "85 245";
      
text "Remove Access";
    } 
    new 
GuiButtonCtrl("Stan_Window_AddAcc") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "105 25";
      
position "85 245";
      
text "Add Access";
    } 
    new 
GuiButtonCtrl("Stan_Window_SubMes") {
      
profile "GuiBlueButtonProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_button.png"
      
extent "105 25";
      
position "85 245";
      
text "Submit Message";
    } 
    new 
GuiTextEditCtrl("Stan_Window_TextEdit1") {
      
profile "GuiBlueTextEditProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_textedit.png";
      
height 20;
      
width 300;
      
100;
      
150;
    }
    new 
GuiTextEditCtrl("Stan_Window_TextEdit2") {
      
profile "GuiBlueTextEditProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_textedit.png";
      
height 20;
      
width 300;
      
100;
      
150;
    }
    new 
GuiTextEditCtrl("Stan_Window_TextEdit3") {
      
profile "GuiBlueTextEditProfile";
      
useOwnProfile true
      
profile.bitmap "guiarm_textedit.png";
      
height 20;
      
width 300;
      
100;
      
150;
    }
    new 
GuiMLTextCtrl("Stan_WindowText") {
      
profile "GuiBlueMLTextProfile";
      
useOwnProfile true
      
extent "300 250";
      
Stan_Window.width 400;
      
Stan_Window.height 250;
      
text "battlefield.";
    } 
    new 
GuiShowImgCtrl("Stan_Image1") { 
      
12
      
50
      
width 150
      
height 150
      
image ""
    } 
  }
}
public function 
Stan_Window_Buy.onAction(){
  
Stan_WindowText.setText("Guild List:");
  
triggerserver("weapon"this.name"getRegisteredGuilds");
}
public function 
Stan_Window_Sell.onAction(){
  
Stan_WindowText.setText("The top 5 guilds on Armageddon:");
  
onCreated();
  
triggerserver("weapon"this.name"getTop");
}
public function 
Stan_Window_Leave.onAction(){
  
Stan_WindowText.setText("Top 5 in The Abyss: ");
  
onCreated();
  
triggerserver("weapon"this.name"getAbyss");
}
public function 
Stan_Window_Register.onAction(){
  
Stan_WindowText.setText("register.");
  
onCreated();
  
Stan_Window_RegisterDone.show();
}
public function 
Stan_Window_Addm.onAction(){
  
Stan_WindowText.setText("wars. ");
  
onCreated();
  
Stan_Window_TextEdit1.show();
  
Stan_Window_AddAcc.show();
}
public function 
Stan_Window_Delm.onAction(){
  
Stan_WindowText.setText("removed.");
  
onCreated();
  
Stan_Window_TextEdit2.show();
  
Stan_Window_DelAcc.show();
}
public function 
Stan_Window_Myg.onAction(){
  
Stan_WindowText.setText("Loading...");
  
onCreated();
  
Stan_Image1.show();
  
triggerserver("weapon"this.name"getGuildList");
}
public function 
Stan_Window_GMessage.onAction(){
  
Stan_WindowText.setText("submit.");
  
onCreated();
  
Stan_Window_TextEdit3.show();
  
Stan_Window_SubMes.show();
}
public function 
Stan_Window_RegisterDone.onAction(){
  
triggerserver("weapon"this.name"registerGuild");
  
onCreated();
}
public function 
Stan_Window_DelAcc.onAction(){
  
onCreated();
  
temp.submittext Stan_Window_TextEdit2.text;
  
triggerserver("weapon"this.name"sendTheTextDel"temp.submittext);
}
public function 
Stan_Window_AddAcc.onAction(){
  
onCreated();
  
temp.submittext Stan_Window_TextEdit1.text;
  
triggerserver("weapon"this.name"sendTheTextAdd"temp.submittext);  
}
public function 
Stan_Window_SubMes.onAction(){
  
onCreated();
  
temp.submittext Stan_Window_TextEdit3.text;
  
triggerserver("weapon"this.name"sendTheTextMes"temp.submittext);

__________________
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