Everything must be contained within ({ }) Things like beforeLogOut , afterBattleEnded etc can't be repeated. You have to put the code for each repeated one under the first one. e.g. for beforeLogOut: function(src){ [code1]} & beforeLogOut: function(src){[code2]} To put them together, you just do beforeLogOut: function(src){ [code1] [code2] } Also take the largest number of parameters for each one. e.g. there's a beforeChatMessage: function(src, message) and a beforeChatMessage: function(src) Use the beforeChatMessage: function(src, message) in this case. Since both parameters are required for part of the code. Also, you might have to modify parts of it since they don't go well together. Like type /commands message may be repeated etc.
sorry but I dont understand as i dont know a lot about scripting. Can you perhaps help me join both codes?
Well check the topic "Beta Server Scripts", the tournament script in it originated from Lutra's so you have all in 1. Of course, Lutra added commands since then, but then to implement it you would have to find someone to explain you step by step how to merge scripts.
I've added the /switchplayer command. I've also fixed the splicing bugs that were left in because I was not testing it using tournaments with sizes of greater than 4 and checking different orders in which to /dq, /resettourmatch. Most of those bugs should be gone now.
I've decided this is what /touradmincommands will eventually look like: • tour|[tier]|[number]: starts [tier] tournament consisting of [number] players. — [tier] is any of the server's tiers and [number] is any value greater than 2. • nontourmatch|[number|player]: — declares match [number] or [player]'s match as a non-tournament match. — [number] is any valid match number and [player] is any player in that match. • tourmatch|[number|player]: — declares match [number] or [player]'s match as a tournament match. — [number] is any valid match number and [player] is any player in that match. • addmatch|[player1]|[player2]: — Adds a match between [player1] and [player2] to the current round — where [player1] and [player2] are players previously not in the tournament. • resetmatch|[number|player]: — clears the results of match [number] or [player]'s tournament match. — [number] is any valid match number and [player] is any player in that match. • deletematch|[number|player]: — removes the match [number] or [player's] match from the tournament. — [number] is any valid match number and [player] is any player in that match. • qualify|[player]: — declares [player] the winner of a match or adds [player] to the tournament — in the sign-up phase. [player] is any player in a match or on the server. • switch|[player1]|[player2]: switches tournament spots between: — [player1] and [player2] - where one must be in the tournament. — The other must either be in the tournament; or not in it and on the server. • disqualify|[player]: — declares [player] the loser of a match or removes [player] from the — tournament. [player] is any player registered in the tournament. • toursize|[number]: alters the tournament size to [number] during sign-ups. — [number] is any value greater than the current tournament size. • roundsize|[number]: alters the round size to [number] and opens sign-ups. — [number] is any value greater than the current round size. • nextround : — removes players that have lost and then moves on to the next round. • endtour: ends the current tournament. • showtour : shows the tournament information to everyone. • showround : shows the round information to everyone. • showmatches : shows the status of matches to everyone. • touroptions: allows you to view a list of tournament options.
I've noticed a problem with using | as a seperator between certain parts of a command - People can still use | in their names. I'm just wondering how this would be sorted out.
Can they use "|"? I can't. I noticed there was a problem with some characters though. I wonder if anyone knows a separator that won't interfere at all. I'd like to not individually do the splitting under every command if I can help it. Edit: Oh I see what you mean about | in their names. I only tested it at the start of a name. You can still use ~ in part of your name. I think I'll go with *.
Thanks Professor Oak and coyotte508. I've updated with a change of the separator to '*' and fixed a bug with the switch command! (renamed a few commands) I've also set the default tournament auth as server auth levels 1 & 2 - but a command to add/remove tour admins! (available to the owner in authoptions) Edit: Just to note, if mods/admins are added after the reg val is in place, you still need to use /touradmin*~1 or /touradmin*~2 to make those new ones have tournament auth also.
Copy and paste the content of webcallscript.txt (auto-update script) or serverscript.txt (full script) into the Scripts window (Options > Scripts) on the Server and click OK to load. <<< I just added to OP.
/channeltouradmin gaara for tournament auth in channel, or /touradmin gaara for tournament auth in all channels. They are Channel Owner and Owner commands respectively. Then type /channeltouradmincommands to see a list of commands. /touroptions is most useful. An example tournament would be /tour wifi OU*4 which would start a wifi OU tournament with 4 players.
Hi How and where can I add a league command to this script(Which will show elites and gymleaders of server and online/offline)
Well adding the online/offline bit requires use of helpers.connectstatus(playername), so you'd have to add a command - basically the functions with (src, channel, command). But you could do it without online/offline by typing /writemsgcmd*league*html into the main chat on the server if you're an owner. where html could be like: <img src='Themes\Classic\types\type0'> - Norman<br/><img src='Themes\Classic\types\type1'> - Brawly<br/>
Thanks I added the command using functions and it works well. And, if that online/offline is a small process , can u explain me
Well helpers.connectstatus("lugiabattle") would return [pokeball image] lugiabattle online [session id] if you were online with that name. So you just have to make a command to send helpers.connectstatus(playername) for all elite and gym leaders. E.g. league: function (src, channel, command){ var display = helpers.connectstatus("Norman") + helpers.connectstatus("Brawly"); sys.sendHtmlMessage(src, display); }
When i ues /tour command It's show this "Sorry, you do not have permission to use the tour command." Sorry how to get permission to use the tour command?
Lutra i use ur scripts these are cool but /playerinfo is not woking can u tell me how its work /playerinfo name
Oh /playerinfo only works for anyone online. Sorry, there's a mistake in the command menu. Have you tried for online players?
Another minor thing to note is that /touradmincommands are blank, yet /channeltouradmincommands are not...
Here is a question which is probobly dumb but I have to ask it anyway: How do I create Cup tour? Is it any diffrent from a regular one?
'm having a little trouble grasping how to make commands and I've gone through the basics on how to script, but still don't quiet understand. I learned how to use /writemsgcmd But I'm looking to make commands where someone does like /lashings <username> And it will say like, <username> got 50 lashings from <person who used command>
You could literally just stick that in between the other commands. It doesn't have mute checks etc, but you could copy them from the other sendall based commands. Nevertheless, creating a command to create faux auth commands is not the most wayward idea in the world. Interesting idea for a fun command.
I love lutra scripts and i know more about lutra scipts type /commands for commands and if it having trouble then see the scripts line And Ninjoshy u are not able to do it ur self talk to lutra