Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-04-2011, 02:25 AM
BboyEatsbacon BboyEatsbacon is offline
The Bacon Man
BboyEatsbacon's Avatar
Join Date: Feb 2011
Location: United States
Posts: 60
BboyEatsbacon will become famous soon enough
Post 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...
__________________
Reply With Quote
  #2  
Old 11-04-2011, 03:08 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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.
__________________
Quote:
Reply With Quote
  #3  
Old 11-04-2011, 03:13 AM
BboyEatsbacon BboyEatsbacon is offline
The Bacon Man
BboyEatsbacon's Avatar
Join Date: Feb 2011
Location: United States
Posts: 60
BboyEatsbacon will become famous soon enough
Quote:
Originally Posted by fowlplay4 View Post
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.
Attached Thumbnails
Click image for larger version

Name:	IRCReportTabs.PNG
Views:	124
Size:	403.5 KB
ID:	53882  
__________________
Reply With Quote
  #4  
Old 11-04-2011, 05:19 PM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
snippit != screenshot
__________________
Reply With Quote
Reply


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 02:35 PM.


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