Guest User

Untitled

a guest
Sep 16th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. // Change to permission you want to give below.
  2. var perm = "essentials.warp.ResourceWorld"
  3. // Change to the amount of time they should receive permission for. format: DDdHHhMMmSSs
  4. var permTime = "25h"
  5. // Change to world to give perm for
  6. var worldName = "world"
  7. // Remove // from the line below to use vault
  8. //addPerm(worldName, "%target%", perm)
  9. // Remove // from 3 lines below to use gm command or change command to use your own permission manager
  10. command("manselect " + worldName)
  11. command("manuaddp %target% " + perm)
  12. command("mansave")
  13. clearScripts("%target%")
  14. metaData.put("perm", perm)
  15. metaData.put("worldName", worldName)
  16. runLaterTarget("rmperm.txt", permTime, target)
  17.  
  18.  
  19. // Add the items ids to pick from to this list
  20. var itemIds = [362,265,320,241,264,30188,3,287,35,280]
  21. // Add the names of the items to this list, make sure they match up with the id above in the same order! Also, they must use quotes.
  22. // Don't make them plural as the rest of the code will do that if the amount is greater than 1.
  23. var itemNames = ["Watermelon Seed","Iron Ingot","Cooked Pork","Rubber Tree","Diamond","UU Matter","Dirt Block","String","Wool Block","Stick"]
  24.  
  25. // Minimum amount
  26. var minAmt = 1
  27. // Maximum amount
  28. var maxAmt = 3
  29.  
  30. // Feel free to change the words of this message but make sure to include the %target%, %amount% and %item%
  31. // %target% = voter, %amount% = item amount, %item% = item name
  32. var itemMessage = "Thanks for voting, %target%! Here's %amount% %item%."
  33.  
  34. // And now the code. Don't change this
  35. var amt = Math.floor((Math.random()*(maxAmt-minAmt+1))+minAmt)
  36. var item = Math.floor(Math.random()*itemIds.length)
  37. var itemName = itemNames[item]
  38. if (amt != 1) {
  39. itemName += "s"
  40. }
  41. command("give %target% " + itemIds[item] + " " + amt)
  42. itemMessage = itemMessage.replace("%amount%", amt)
  43. itemMessage = itemMessage.replace("%item%", itemName)
  44. broadcast(itemMessage)
  45. command("acb %target% 125")
  46.  
  47. //broadcast("You also have access to the Resource World, and 125 claim blocks!")
Advertisement
Add Comment
Please, Sign In to add comment