View Single Post
  #2  
Old 05-01-2007, 01:24 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Create Weapon (-Complaint Reporter):
Part 1
PHP Code:
/*

NPC by Rapidwolve
Last Updated: April 15, 2007

*/

function onCreated()
  
this.database findNPC("Complaint-Database");
  
function 
onActionServerside(action)
{
  switch (
action)
  {
    case 
"RegisterComplaint":
      
this.database.RegisterComplaint(params[1], params[2], params[3], params[4]); // [1 = Account | 2 = Category | 3 = Seriousness| 4 = Description]
    
break;
    
    case 
"GetSupportTickets":
      
this.database.GetSupportTickets(player.account);
    break;
    
    case 
"GetSupportTicket":
      
this.database.GetSupportTicket(params[1], player.account);
    break;
    
    case 
"GetMySupportTickets":
      
this.database.GetPlayerSupportTickets(player.account);
    break;
    
    case 
"CloseTicket":
      
this.database.CloseTicket(params[1]);
    break;
    
    case 
"toggleTicketStatus":
      
this.database.toggleTicketStatus(params[1]);
    break;
    
    case 
"DeleteTicket":
      
this.database.DeleteTicket(params[1]);
    break;
  }
}

//#CLIENTSIDE

function onCreated()
  
resetVariables();

function 
resetVariables()
{
  
enum key
  
{
    
F9 120,
    
F11 122
  
};

  
join("profiles");   // Allows use of ZodiacWindowProfile
  
  
this.verification_code "0verRide";  // Overrides the current verification code
  
  
this.description_minimum 30;  // Minimum characters for the description
  
this.description_maximum 500// Maximum characters for the description
  
  
this.complaint_categorys 
  {
"Script Error""Hacker","Faulty Weapon/Skill"
  
"Heavy Lag""Monster Malfunction""Event Error"// Categorys
  
"Corruption""Wrongful Jailing""Suggestions",
  
"Other"
  
};
  
  
this.admin_message =
  
"<center>
  Welcome to the Administration Desk for Support Center
  to use, right or double click on a ticket and select an option.
  <b>View Ticket</b> opens the ticket and allows you to view the
  description and add a reply or close the ticket. <b>Toggle Status</b> 
  toggles depending on whether the ticket is Open or Closed.
  
  This system was created by <i>Rapidwolve</i></center>"
;
  
  
this.priority_levels 
  {
"Serious""High""Medium"
  
"Low""Unimportant"};  // Priority Levels
  
  
this.terms =
  
"<center>
  Welcome to Zodiac's Support Center, please note
  that abuse of this tool or providing false information
  can and will result in a jailing or possibly a ban
  depending on the offense. All actions are logged.
  </center>"
;   // Terms
  
  
this.active false;
  
  
this.admin_active false;
}
function 
onKeyPressed(codekey)
{
  switch (
temp.code)
  {
    case 
key.F9:   // [F9] Key
      
this.active = (this.active false true);   // If its active then make it not active, vice cersa
      
toggleWindow();
    break;
    
    case 
key.F11:   // [F11] Key
      
this.admin_active = (this.admin_active false true);
      
toggleAdminWindow();
    break;
  }
}

function 
toggleWindow()

  if (
this.active)
    
CloseSystem();    // Close if already open when [F9] is pressed
  
else 
    
drawWindow();     // Open if closed when [F9] is pressed

Reply With Quote