Welcome to SkriptTools.net!

SkriptTools is now part of the skUnity family! skUnity will keep SkriptTools running, updating and adding new features.


- You can now search scripts by author by doing "author:name". For example: "author:nfell2009"

- Login to SkriptTools using your skUnity account to save your favourite scripts and come back to them

Login

Script Viewer

View the code of the script directly in your browser without downloading anything.

Current File: skunitybackup-46.sk - Download / View on the skUnity Parser

#----------------------------------------
#                 EXPShop:
#    Let users buy Experience points!
#           Made by: Sharpjaws
#             Version: 1.0
#----------------------------------------
Options:
#----------------------------------------
#Config:
 
 Cost: 5 #Cost per EXP point (Change it to whatever you want)
#-----------------------------------------
#Permissions:
#expshop.use - Allows usage of the /expshop command
#------------------------------------------
#
#  LEASE DO NOT CHANGE ANYTHING PAST HERE
#    UNLESS YOU KNOW WHAT YOU'RE DOING 
#                  :)
#-----------------------------------------	





on script enable:
  message "&b&l[EXPShop] &a&lSuccessfully loaded and activated!" to console
  message "&b&l[EXPShop] &a&lMake sure you got a economy plugin installed!" to console

command /expshop [<text>] [<number>]:
 aliases: /eshop
 trigger:
  if player has permission "expshop.use":
   set {_a} to arg-2
  else if the player does not have permission "expshop.use":
   message "&b&l[EXPShop] &c&lSorry! but you dont have permission to run this command" to player 
   stop 
#--------------------------------------------------------------
#Safety feature: this is to prevent server crashes when someone
#is trying to buy a massive amount of EXP! Only override at 
# your own risk. 10000 EXP is the max amount you can buy at once.
#\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
#--------------------------------------------------------------
  if arg-2 is higher than 10000: # <------------------------
   arg-2 is set
   arg-1 is "buy" or "price"
   message "&b&l[EXPShop] &c&lYou cannot buy or check XP Higher than 10000!" to player
   stop 
  else if arg-1 is "buy":
   arg-2 is set
   loop {_a} times:
    add {@Cost} to {_cost}
   if the player's balance is higher or equal to {_cost}:
    arg-2 is set
    loop {_a} times:
     give 1 xp to the player
   if the player's balance is higher or equal to {_cost}:
    arg-2 is set
    remove {_cost} from the player's money 
    message "&b&l[EXPShop] &e&lYou just bought &b&l%{_a}% XP points &e&lfor &a&l%{_cost}%$"
    message "&b&l[EXPShop] &e&lYour Balance: &a&l%player's money%"
   else:
    arg-2 is set
    arg-1 is "buy"
    message "&b&l[EXPShop] &e&lYou dont have enough money!"     
  if arg-2 is set:
   arg-1 is "price":
    set {_a} to arg-2
    loop {_a} times:
     add {@Cost} to {_cost}
  if arg-1 is "price":
   arg-2 is set
   message "&b&l[EXPShop] &e&lBuying &b&l%{_a}% XP &e&lcosts &a&l%{_cost}%$" to player  
  if arg-1 is not set:
   arg-2 is not set
   message "&b&l[EXPShop] &fUsage: &f/&eexpshop help" to the player
  if arg-1 is "help":
   arg-2 is not set
   message ""
   message "&a&l----------&e&l[EXPShop]&a&l----------"
   message "/expshop buy <amount> - &dBuys an amount of EXP"
   message "/expshop price <amount> - &dShows price for a amount of EXP"
   message "/expshop help - &dShows all the available commands"
   message "&a&l----------&e&l[EXPShop]&a&l----------"
  if arg-1 is not "help" or "buy" or "price":
   arg-2 is not set
   message "&b&l[EXPShop] &cInvalid command. See: /expshop help"