View Single Post
  #14  
Old 01-02-2008, 08:49 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Hmm, I was mainly going to do it all in one NPC, but that would be odd, so I need to change my code

I was thinking of some features, dunno if they are needed tho: (This is the config() function)

PHP Code:
function config() {
  
this.categories = { // Add categories here
    
"General",
    
"Level Design",
    
"Errors",
    
"Suggestions",
    
"New Features"
  
};
  
this.vote_mode = 1; /* 1 will give you an amount of
                           points per voting alternative.
                           
                         2 will give you max amount of
                           points to spend on voting */
                           
  
this.points = 3; /* mode 1 = amount of points per alternative
                      mode 2 = max amount of points to vote with */
  
  
this.minimum_alternatives = 3; /* minimum amount of alter-
                                    tives that you need before
                                    mode 1 will be used. Until
                                    then (mode 1) there will be 1 point
                                    per alternative */
                                    
  
this.default_category = "Misc"; /* When adding an alternative
                                     and the category isn't listed
                                     in this.categories this will
                                     be listed as the category instead */
  
this.canvote = false; // if the player can vote, if command is disabled it must be turned on with a rc command 
  
clearAlternatives();
  
  
// Add alternatives here: alternative(category, suggestion);
  
alternative("Level Design", "Move the osl to an other island");
  
alternative("General", "Allow players to buy secret weapons");
  
alternative("New Features", "Allow more options with the party system");
  
alternative("General", "Release mining");
  
  
temp.array = getAlternatives();
  
triggeraction(this.x + 0.5, this.y + 0.5, "Client", "sync", array);
} 
Only problem is that, by using one npc/db I have to use triggeraction()
And triggeraction() is being annoying from serverside to clientside when it works clientside to serverside
__________________
Reply With Quote