Hey i want to Add Something on Mad's Skript for my Server (He has the Credits).
I want that:
If i buy something with a command then i need to lose the Price of the Coins from my Balance.
Heres the Code from Mad:
I was inactive for a time so sorry i forgot a lot :/
[doublepost=1486323167,1486308156][/doublepost]Okay, here a better Question:
How is it possible that i lose coins, by entering a command?
[doublepost=1486328520][/doublepost]Ok got the one Thing now the other Thing is the "Bigger Than" dont works any help?
I want that:
If i buy something with a command then i need to lose the Price of the Coins from my Balance.
Heres the Code from Mad:
code_language.skript:
#Official Skript of Mad
#Copyright [2017 Mad]
#Version: 1.0 Beta
# ___ _
# |_ _| _ __ __| | ___ __ __
# | | | '_ \ / _` | / _ \ \ \/ /
# | | | | | | | (_| | | __/ > <
# |___| |_| |_| \__,_| \___| /_/\_\
#
#
options:
prefix: &a&lCoins&r &7»&r
version: 1.0
variables:
{coins.%player%} = 0
on first join:
set {coins.%player%} to 0
# ___ _____ ____ _ _ ___
# / __)( _ )(_ _)( \( )/ __)
#( (__ )(_)( _)(_ ) ( \__ \
# \___)(_____)(____)(_)\_)(___/
#
command /coins [<text>] [<player>] [<int>]:
description: Help for skCoins.
usage: /coins (add:remove:set:reset) (player) (value)
executable by: players and console
trigger:
if arg-1 is not set:
message ""
message "&a&lCOINS"
message ""
message "&8● &7/coins add (player) (value) &a- Add player's coins"
message "&8● &7/coins remove (player) (value) &a- Remove player's coins"
message "&8● &7/coins set (player) (value) &a- Set player's coins"
message "&8● &7/coins reset (player) &a- Reset player's coins"
message ""
if arg-1 is set:
if player has permission "coins.admin":
if arg-1 is "add":
if arg-2 is not set:
message "&aCorrect Usage: &7/coins add (player) (value)"
if arg-2 is set:
if arg-3 is not set:
message "&aCorrect Usage: &7/coins add (player) (value)"
if arg-3 is set:
add arg-3 to {coins.%arg-2%}
message "{@prefix} &7Operation completed successfully!"
message "{@prefix} &7You have recived &a%arg-3%&7 coins." to arg-2
if arg-1 is "remove":
if arg-2 is not set:
message "&aCorrect Usage: &7/coins remove (player) (value)"
if arg-2 is set:
if arg-3 is not set:
message "&aCorrect Usage: &7/coins remove (player) (value)"
if arg-3 is set:
remove arg-3 from {coins.%arg-2%}
message "{@prefix} &7Operation completed successfully!"
message "{@prefix} &7You have lost &a%arg-3%&7 coins." to arg-2
if arg-1 is "set":
if arg-2 is not set:
message "&aCorrect Usage: &7/coins set (player) (value)"
if arg-2 is set:
if arg-3 is not set:
message "&aCorrect Usage: &7/coins set (player) (value)"
if arg-3 is set:
set {coins.%arg-2%} to arg-3
message "{@prefix} &7Operation completed successfully!"
message "{@prefix} &7You have now &a%arg-3%&7 coins." to arg-2
if arg-1 is "reset":
if arg-2 is not set:
message "&aCorrect Usage: &7/coins reset (player)"
if arg-2 is set:
set {coins.%arg-2%} to 0
message "{@prefix} &7You reset &a%arg-2%&7's coins!"
message "{@prefix} &7Your coins have been reset." to arg-2
if player does not have permission "coins.admin":
message "&cYou don't have the permission."
command /balance [<player>]:
description: See the player's balance.
usage: /balance <player>
executable by: players and console
trigger:
if arg-1 is not set:
message "{@prefix} &7Your balance is: &a%{coins.%player%}%&7."
if arg-1 is set:
message "{@prefix} &a%arg-1%&7's balance is: &a%{coins.%arg-1%}%&7."
[doublepost=1486323167,1486308156][/doublepost]Okay, here a better Question:
How is it possible that i lose coins, by entering a command?
[doublepost=1486328520][/doublepost]Ok got the one Thing now the other Thing is the "Bigger Than" dont works any help?
code_language.skript:
command /buy:
trigger:
if {coins.%player%} is bigger than 100:
give 16 tnt named "&7&lTest" to player
remove 100 from {coins.%player%}
else:
message "&6Test &8┃ &7Test."