Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on:text:.add & &:#: {
- if (!%tnick) { ;this checks to see that there is an admin.
- msg # There is no pickup going.
- }
- if ($nick isin %team1) && ($2 == 1) $$ (!$3) { ;this checks to see if theyre already added for team 1. the (!$3) is basically just making sure someone is adding for themselves and an admin isnt type .add jon 2 since in that example $3 would be 2.
- msg # You are already on team 1 $nick $+ .
- }
- if ($nick isin %team2) && ($2 == 2) $$ (!$3) { ;this checks to see if theyre already added for team 2.
- msg # You are already on team 2 $nick $+ .
- }
- if ($nick isin %team1) && ($2 == 2) && (!$3) { ;this moves them from team1 to team2 if they were on team1 originally
- set %team1 $reptok(%team1,$nick,$chr(63),32) ;assuming a 5v5 and your %team1 var looked like %team1 bob tom jon ? ? and jon typed .add 2 it would replace jons name with $chr(63) which is a ? and your %team1 would now look like %team1 bob tom ? ? ? where the 32 means a space that seperates the tokens.
- set %team2 $reptok(%team2,$chr(63),$nick,32) ;and vice versa would put jon on team2.
- msg # You have switched to team 2 $nick.
- }
- if ($nick isin %team2) && ($2 == 1) && (!$3) { ;same as above but for team 1
- set %team2 $reptok(%team2,$nick,$chr(63),32)
- set %team1 $reptok(%team1,$chr(63),$nick,32)
- msg # You have switched to team 1 $nick.
- }
- if ($nick !isin %team1) && ($nick !isin %team2) && ($2 == 1) { ;this simple checks if the player isnt added and allows them to add to team 1.
- set %team1 $reptok(%team1,$nick,$chr(63),32)
- tokenize 32 %team1
- msg # Currently Team 1 : $chr(91) $1- $chr(93) ;this messages the channel everyone currently on team 1
- inc %totalplayers ;adds +1 to your totalplayers
- }
- if ($nick !isin %team1) && ($nick !isin %team2) && ($2 == 2) { ;and viceversa for team2
- set %team2 $reptok(%team2,$nick,$chr(63),32)
- tokenize 32 %team2
- msg # Currently Team 2 : $chr(91) $1- $chr(93)
- inc %totalplayers ;adds +1 to your totalplayers
- }
- if ($nick == %pickupadmin) && ($2 ison #) $$ ($3 == 2) { ;this allows an admin to move a player from team1 to team2
- set %team1 $reptok(%team1,$nick,$chr(63),32)
- set %team2 $reptok(%team2,$chr(63),$nick,32)
- msg # $2 has been swapped to team 2 by $nick $ + .
- }
- if ($nick == %pickupadmin) && ($2 ison #) $$ ($3 == 1) { ; and vice versa
- set %team2 $reptok(%team2,$nick,$chr(63),32)
- set %team1 $reptok(%team1,$chr(63),$nick,32)
- msg # $2 has been swapped to team 1 by $nick $ + .
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement