Advertisement
tyler569

Untitled

Oct 21st, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. *:/skillup $player = >>>
  2. if(equals(player(),$player)){
  3. die(concat(color(c),'You may not demote yourself'))
  4. }
  5. assign(@ranks,array(Default,Survivor,student,Builder,teacher,professor,scholar))
  6. if(nand(or(array_contains(pgroup(),'teacher'),array_contains(pgroup(),'professor'),array_contains(pgroup(),'scholar')),or(array_contains(pgroup(),'mod'),array_contains(pgroup(),'admin'),array_contains(pgroup(),'sadmin')))){
  7. if(nor(array_contains(pgroup($player),'Survivor'),array_contains(pgroup($player),'student'),array_contains(pgroup($player),'Default'))){
  8. die(color(c),'You cannot do this')
  9. }
  10. } else if(array_contains(pgroup(),'mod')){
  11. if(nor(array_contains(pgroup($player),'Survivor'),array_contains(pgroup($player),'student'),array_contains(pgroup($player),'Builder'),array_contains(pgroup($player),'Default'))){
  12. die(color(c),'You cannot do this')
  13. }
  14. } else if(or(array_contains(pgroup(),'admin')array_contains(pgroup(),'sadmin'))){
  15. null
  16. } else {
  17. die(color(c),'You cannot do this')
  18. }
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. try(
  28. for(assign(@i,0),lte(@i,6),inc(@i)){
  29. if(array_contains(pgroup($player),@ranks[@i])){
  30. runas(~op,'/pex user'$player 'group remove'@ranks[@i])
  31. runas(~op,'/pex user'$player 'group add'@ranks[add(@i,1)])
  32. die()
  33. }
  34. }
  35. , #CATCH
  36. die(color(c),'This player is not online')
  37. )
  38.  
  39. <<<
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement