Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #MyConomy - V1.0
- #By nfell2009
- options:
- P: &6[&eMyC&6]&e
- UP: [MyC]
- variables:
- {myc.startingbal} = 1500
- {myc.currency} = "MC"
- {myc.currency.plural} = "MCs"
- {myc.enabled} = true
- {myc.enabled.txt} = "True"
- {myc.admin.perm} = "myc.admin"
- {myc.player.perm} = "myc.usage"
- on skript start:
- set {myc.running.txt} to "True"
- set {myc.running} to true
- on skript stop:
- set {myc.running.txt} to "False"
- set {myc.running} to false
- on join:
- if {myc.%player%.started} is not set:
- set {myc.%player%.started} to "True"
- set {myc.%player%.money} to {myc.startingbal}
- set {myc.%player%.lastpayfrom} to "Server"
- set {myc.%player%.lastpayin} to {myc.startingbal}
- message "{@P} You're balance has now been set to: %{myc.%player%.money}%%{myc.currency.plural}%"
- set {_time} to now
- subtract 1 day from {_time}
- add 1 day to {_time}
- log "{@UP} Created this file! %{_time}%" to "myc/%player%"
- log "{@UP} Payment to: '%player%' from 'Server' with amount '%{myc.startingbal}%'" to "MyC/%player%"
- command /myconomy [<text>] [<text>]:
- description: Main MyConomy command
- permission: {myc.player.perm}
- aliases: /myc, /mycon,
- trigger:
- if arg 1 is not set:
- message "{@P} Unknown command! Do /myc help - for help!"
- else if arg 1 is "help":
- if arg 2 is not set:
- make player execute command "/mycbypass help 1"
- else if arg 2 is "1":
- make player execute command "/mycbypass help 1"
- else:
- message "{@P} Unknown page number!"
- else if arg 1 is "info":
- player has permission "%{myc.admin.perm}%":
- if arg 2 is not set:
- message "{@P} You must enter a playername!"
- else:
- set {_player} to arg 2 parsed as offline player
- message "{@P} Showing details for: %{_player}%"
- if {myc.%{_player}%.money} is greater than 1:
- message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency.plural}%"
- else:
- message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency}%"
- if {myc.%{_player}%.lastpayout} is greater than 1:
- message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency.plural}%"
- else:
- message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency}%"
- message "{@P} L. Payment To: %{myc.%{_player}%.lastpayto}%"
- if {myc.%{_player}%.lastpayin} is greater than 1:
- message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency.plural}%"
- else:
- message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency}%"
- message "{@P} L. Payment From: %{myc.%{_player}%.lastpayfrom}%"
- else:
- message "{@P} You don't have permission to do that! (Required Node: %{myc.admin.perm}%)"
- command /pay [<text>] [<text>]:
- description: Pay another player money
- permission: {myc.player.perm}
- trigger:
- set {_player} to arg 1 parsed as player
- set {_amount} to arg 2 parsed as number
- if arg 1 is not set:
- message "{@P} You must enter a player's name!"
- else if arg 2 is not set:
- message "{@P} You must enter an amount to pay!"
- else if {_amount} is number:
- if {_player} is online:
- set {_player} to arg 1 parsed as offline player
- else:
- set {_player} to arg 1 parsed as player
- if {myc.%{_player}%.started} is "True":
- if {myc.%player%.money} is greater than or equal to {_amount}:
- subtract {_amount} from {myc.%player%.balance}
- add arg 2 to {myc.%{_player}%.balance}
- set {myc.%{_player}%.lastpayin} to arg 2
- set {myc.%{_player}%.lastpayfrom} to player
- set {myc.%player%.lastpayout} to {_amount}
- set {myc.%player%.lastpayto} to {_player}
- if {_amount} is greater than 1:
- message "{@P} You paided: %arg 2%%{myc.currency.plural}% to %{_player}%"
- log "{@UP} %player% paided %arg 2%%{myc.currency.plural}% to %{_player}%" to "myc/%player%"
- log "{@UP} %{_player}% received %arg 2%%{myc.currency.plural}% from %player%" to "myc/%{_player}%"
- else:
- message "{@P} You paided: %arg 2%%{myc.currency}% to %{_player}%"
- log "{@UP} %player% paided %arg 2%%{myc.currency}% to %{_player}%" to "myc/%player%"
- log "{@UP} %{_player}% received %arg 2%%{myc.currency}% from %player%" to "myc/%player%"
- else:
- set {_amt} to {_amount}
- subtract {myc.%player%.money} from {_amt}
- if {_amt} is greater than 1:
- message "{@P} Your funds don't support the payment! You need: %{_amt}%%{myc.currency.plural}% more!"
- else:
- message "{@P} Your funds don't support the payment! You need: %{_amt}%%{myc.currency}% more!"
- else:
- message "{@P} Couldn't find player: %arg 1%"
- else:
- message "{@P} You can only pay using numbers!"
- command /balance:
- description: Show's the player's balance
- permission: {myc.player.perm}
- trigger:
- message "{@P} Your balance: %{myc.%player%.money}%"
- command /myc-admin [<text>] [<text>] [<text>] [<text>]:
- description: Main admin command
- permission: {myc.admin.perm}
- trigger:
- if arg 1 is not set:
- message "{@P} You must give a sub-command! Do /myc-admin help - for help!"
- else if arg 1 is "status":
- player has permission "%{myc.admin.perm}%":
- message "{@P} MyConomy Status"
- message "{@P} Running: %{myc.running.txt}%"
- message "{@P} Currency: %{myc.currency}%"
- message "{@P} Currency Plural: %{myc.currency.plural}%"
- message "{@P} Admin Perm: %{myc.admin.perm}%"
- message "{@P} Player Perm: %{myc.player.perm}%"
- else if arg 1 is "help":
- set {myc.maxahelp} to 3
- make player execute command "/mycbypass adminhelp %arg 2%"
- else if arg 1 is "set":
- set {_amount} to arg 3 parsed as number
- set {_player} to arg 2 parsed as player
- if arg 2 is not set:
- message "{@P} You must give a player name!"
- else if arg 3 is not set:
- message "{@P} You must give the value to set the players balance to!"
- else:
- if {_player} is online:
- set {_player} to arg 2 parsed as player
- if {_amount} is greater than 1:
- log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency.plural}% by %player%" to "myc/%{_player}%"
- message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency.plural}%"
- send "{@P} Your balance has been set to: %arg 3%%{myc.currency.plural}% by %player%" to {_player}
- else:
- log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency}% by %player%" to "myc/%{_player}%"
- message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency}%"
- send "{@P} Your balance has been set to: %arg 3%%{myc.currency}% by %player%" to {_player}
- else:
- set {_player} to arg 2 parsed as offline player
- if {_amount} is greater than 1:
- log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency.plural}% by %player%" to "myc/%{_player}%"
- message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency.plural}%"
- else:
- log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency}% by %player%" to "myc/%{_player}%"
- message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency}%"
- set {myc.%{_player}%.money} to {_amount}
- else if arg 1 is "add":
- set {_amount} to arg 3 parsed as number
- set {_player} to arg 2 parsed as player
- if arg 2 is not set:
- message "{@P} You must give a player name!"
- else if arg 3 is not set:
- message "{@P} You must give the value to add to the players balance!"
- else:
- if {_player} is online:
- set {_player} to arg 2 parsed as player
- if {_amount} is greater than 1:
- log "{@UP} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You added: %arg 3%%{myc.currency.plural}% to %{_player}%'s money"
- send "{@P} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to {_player}
- set {myc.%{_player}%.lastpayin} to {_amount}
- set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
- else:
- log "{@UP} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You added: %arg 3%%{myc.currency}% to %{_player}%'s money"
- send "{@P} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to {_player}
- set {myc.%{_player}%.lastpayin} to {_amount}
- set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
- else:
- set {_player} to arg 2 parsed as offline player
- if {_amount} is greater than 1:
- log "{@UP} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You added: %arg 3%%{myc.currency.plural}% to %{_player}%'s money"
- set {myc.%{_player}%.lastpayin} to {_amount}
- set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
- else:
- log "{@UP} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You added: %arg 3%%{myc.currency}% to %{_player}%'s money"
- set {myc.%{_player}%.lastpayin} to {_amount}
- set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
- add {_amount} to {myc.%{_player}%.money}
- else if arg 1 is "subtract":
- set {_amount} to arg 3 parsed as number
- set {_player} to arg 2 parsed as player
- if arg 2 is not set:
- message "{@P} You must give a player name!"
- else if arg 3 is not set:
- message "{@P} You must give the value to subtract from the players balance!"
- else:
- if {_player} is online:
- set {_player} to arg 2 parsed as player
- if {_amount} is greater than 1:
- log "{@UP} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You subtracted: %arg 3%%{myc.currency.plural}% from %{_player}%'s money"
- send "{@P} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to {_player}
- else:
- log "{@UP} %arg 3%%{myc.currency}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You subtracted: %arg 3%%{myc.currency}% from %{_player}%'s money"
- send "{@P} %arg 3%%{myc.currency}% got subtract from %{_player}%'s balance by %player%" to {_player}
- else:
- set {_player} to arg 2 parsed as offline player
- if {_amount} is greater than 1:
- log "{@UP} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You subtracted: %arg 3%%{myc.currency.plural}% from %{_player}%'s money"
- else:
- log "{@UP} %arg 3%%{myc.currency}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
- message "{@P} You subtracted: %arg 3%%{myc.currency}% from %{_player}%'s money"
- subtract {_amount} from {myc.%{_player}%.money}
- else if arg 1 is "currency":
- if arg 2 is not set:
- message "{@P} You must give a currency type to change!"
- else if arg 3 is not set:
- message "{@P} You must give a value to set the currency type!"
- else if arg 2 is "s":
- set {myc.currency} to arg 3
- message "{@P} Single currency is now set to: %{myc.currency}%"
- else if arg 2 is "p":
- set {myc.currency.plural} to arg 3
- message "{@P} Plural currency is now set to: %{myc.currency.plural}%"
- else if arg 1 is "perm":
- if arg 2 is not set:
- message "{@P} Will you be showing or setting the permissions?"
- else if arg 3 is not set:
- message "{@P} You need to enter admin or player to set/show!"
- else if arg 2 is "show":
- if arg 3 is "admin":
- message "{@P} Admin permission: %{myc.admin.perm}%"
- else if arg 3 is "player":
- message "{@P} Player permission: %{myc.player.perm}%"
- else:
- message "{@P} I couldn't find that permission group..."
- else if arg 2 is "set":
- if arg 3 is "admin":
- log "{@UP} %player% changed the admin permission from: %{myc.admin.perm}% to %arg 4%" to "myc/logs"
- set {myc.admin.perm} to arg 4
- message "{@P} Admin permission is now: %{myc.admin.perm}%"
- else if arg 3 is "player":
- log "{@UP} %player% changed the player permission from: %{myc.player.perm}% to %arg 4%" to "myc/logs"
- set {myc.player.perm} to arg 4
- message "{@P} Player permission is now: %{myc.player.perm}%"
- else:
- message "{@P} I couldn't find that permission group..."
- command /mycbypass [<text>] [<text>] [<text>] [<text>] [<text>]:
- permission: myc.usage
- trigger:
- if arg 1 is "help":
- message "{@P} ---------- MyConomy Help Menu (%arg 2%/1) ----------"
- message "{@P} /myc help - This menu"
- message "{@P} /myc info [player] - Info on you or a player"
- message "{@P} /myc status - Full MyConomy info"
- message "{@P} /pay <player> - Pay a player"
- else if arg 1 is "adminhelp":
- if arg 2 is "1":
- message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
- message "{@P} /myc-admin status - Status of MyConomy"
- message "{@P} /myc-admin set <player> <amount> - Set a player's balance"
- message "{@P} /myc-admin add <player> <amount> - Add money to a player"
- message "{@P} /myc-admin subtract <player> <amount> - Remove money from a player"
- message "{@P} Do /myc-admin help 2 for more"
- else if arg 2 is "2":
- message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
- message "{@P} /myc-admin currency <s/p> <name> - Set the currency name"
- message "{@P} Currency Key:"
- message "{@P} S = Single. Example: MC"
- message "{@P} P = Plural. Example: MCs"
- message "{@P} Do /myc-admin help 3 for more"
- else if arg 2 is "3":
- message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
- message "{@P} /myc-admin perm <show|set> <admin|player> <perm> - Set or show permissions"
- message "{@P} /myc-admin starting <number> - Set the starting balance"
- else:
- message "{@P} Unknown help page! There are %{myc.maxahelp}% page's that can be viewed."
- else:
- message "{@P} Unknown command!"
Advertisement
Add Comment
Please, Sign In to add comment