Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. on:text:.add & &:#: {
  2. if (!%tnick) { ;this checks to see that there is an admin.
  3. msg # There is no pickup going.
  4. }
  5. 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.
  6. msg # You are already on team 1 $nick $+ .
  7. }
  8. if ($nick isin %team2) && ($2 == 2) $$ (!$3) { ;this checks to see if theyre already added for team 2.
  9. msg # You are already on team 2 $nick $+ .
  10. }
  11. if ($nick isin %team1) && ($2 == 2) && (!$3) { ;this moves them from team1 to team2 if they were on team1 originally
  12. 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.
  13. set %team2 $reptok(%team2,$chr(63),$nick,32) ;and vice versa would put jon on team2.
  14. msg # You have switched to team 2 $nick.
  15. }
  16. if ($nick isin %team2) && ($2 == 1) && (!$3) { ;same as above but for team 1
  17. set %team2 $reptok(%team2,$nick,$chr(63),32)
  18. set %team1 $reptok(%team1,$chr(63),$nick,32)
  19. msg # You have switched to team 1 $nick.
  20. }
  21. 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.
  22. set %team1 $reptok(%team1,$nick,$chr(63),32)
  23. tokenize 32 %team1
  24. msg # Currently Team 1 : $chr(91) $1- $chr(93) ;this messages the channel everyone currently on team 1
  25. inc %totalplayers ;adds +1 to your totalplayers
  26. }
  27. if ($nick !isin %team1) && ($nick !isin %team2) && ($2 == 2) { ;and viceversa for team2
  28. set %team2 $reptok(%team2,$nick,$chr(63),32)
  29. tokenize 32 %team2
  30. msg # Currently Team 2 : $chr(91) $1- $chr(93)
  31. inc %totalplayers ;adds +1 to your totalplayers
  32. }
  33. if ($nick == %pickupadmin) && ($2 ison #) $$ ($3 == 2) { ;this allows an admin to move a player from team1 to team2
  34. set %team1 $reptok(%team1,$nick,$chr(63),32)
  35. set %team2 $reptok(%team2,$chr(63),$nick,32)
  36. msg # $2 has been swapped to team 2 by $nick $ + .
  37. }
  38. if ($nick == %pickupadmin) && ($2 ison #) $$ ($3 == 1) { ; and vice versa
  39. set %team2 $reptok(%team2,$nick,$chr(63),32)
  40. set %team1 $reptok(%team1,$chr(63),$nick,32)
  41. msg # $2 has been swapped to team 1 by $nick $ + .
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement