Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   IRC Tabs Not Functioning Properly (https://forums.graalonline.com/forums/showthread.php?t=134264972)

BboyEatsbacon 11-04-2011 02:25 AM

IRC Tabs Not Functioning Properly
 
Okay, so we used xAndrewx's IRC tabs and it's not working properly....
Weapon: -System/Report
PHP Code:

function onActionServerSide() {
  if (
params[0] == "SendReport") {
    for (
temp.rcIRC.rcplayers)
    
temp.rc.sendtoirc("privmsg""REPORT""Reports"params[1] @ " reported " params[3] @ " for " params[2]);
    
player.chat "Report Sent Successfully!";
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "/report") {
    
John612_ReportGUI_Window1.show();
    new 
GuiWindowCtrl("John612_ReportGUI_Window1") {
      
profile GuiBlueWindowProfile;
      
clientrelative true;
      
clientextent "137,282";

      
canclose false;
      
canmaximize false;
      
canmove true;
      
canresize true;
      
closequery false;
      
destroyonhide false;
      
text "Report";
      
226;
      
3;

      new 
GuiTextEditCtrl("John612_ReportGUI_TextEdit1") {
        
profile GuiBlueTextEditProfile;
        
height 20;
        
width 89;
        
26;
        
22;
      }
      new 
GuiTextCtrl("John612_ReportGUI_Text1") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Account";
        
width 48;
        
46;
        
1;
      }
      new 
GuiTextCtrl("John612_ReportGUI_Text2") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Reason";
        
width 45;
        
47;
        
49;
      }
      new 
GuiScrollCtrl("John612_ReportGUI_MultiLineEdit1_Scroll") {
        
profile GuiBlueScrollProfile;
        
height 127;
        
hscrollbar "dynamic";
        
vscrollbar "dynamic";
        
width 132;
        
2;
        
74;

        new 
GuiMLTextEditCtrl("John612_ReportGUI_MultiLineEdit1") {
          
profile GuiBlueMLTextEditProfile;
          
height 17;
          
horizsizing "width";
          
width 107;
        }
      }
      new 
GuiButtonCtrl("John612_ReportGUI_Button1") {
        
profile GuiBlueButtonProfile;
        
text "Send Report";
        
width 87;
        
26;
        
209;
      }
      new 
GuiButtonCtrl("John612_ReportGUI_Button2") {
        
profile GuiBlueButtonProfile;
        
text "Cancel";
        
width 87;
        
26;
        
246;
      }
    }
  }
}

function 
John612_ReportGUI_Button1.onAction() {
  if (
John612_ReportGUI_MultiLineEdit1.text == "" || John612_ReportGUI_TextEdit1.text == "") {
    
player.chat "Please Fill Out All Forms Completely!";
  }
  else {
    
triggerserver("gui"name"SendReport"player.accountJohn612_ReportGUI_MultiLineEdit1.textJohn612_ReportGUI_TextEdit1.text);
    
John612_ReportGUI_Window1.hide();
    
John612_ReportGUI_MultiLineEdit1.text "";
    
John612_ReportGUI_TextEdit1.text "";
  }
}

function 
John612_ReportGUI_Button2.onAction() {
  
John612_ReportGUI_Window1.hide();
  
John612_ReportGUI_MultiLineEdit1.text "";
  
John612_ReportGUI_TextEdit1.text "";


Control NPC: IRC
PHP Code:

  temp.oldrcplayers this.rcplayers;
  
this.rcplayers = {"Graal771281""Graal756538"};
  
this.clientrcplayers = {"Graal771281""Graal756538"};
    
  for (
temp.plallplayers) {
    if (
temp.pl.level == NULL) {
      if (
temp.pl.adminlevel >= 1) {
      }
      continue;
    }
      
    if (
temp.pl.adminlevel >= 1)
      
this.clientrcplayers.add(temp.pl);
  } 


Can anyone tell me what I'm missing?
It's not adding any text/chat to the "Reports" tab when it's called to...

fowlplay4 11-04-2011 03:08 AM

Your IRC DB needs to join the players to the channel before it'll even appear.

Include a link to his snippet as well please.

BboyEatsbacon 11-04-2011 03:13 AM

1 Attachment(s)
Quote:

Originally Posted by fowlplay4 (Post 1673074)
Your IRC DB needs to join the players to the channel before it'll even appear.

Include a link to his snippet as well please.

I fixed it, i'll include the snippit of it working, before it would show the tabs, but wouldn't add any chat/text to it upon called to.

ff7chocoboknight 11-04-2011 05:19 PM

snippit != screenshot


All times are GMT +2. The time now is 07:10 AM.

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