Hey y'all,
I made a Cheque system but if I use it it doesn't give you any money.
The error is on 9 (make player execute command "/eco give {cheque::%player%}").
I want to have {cheque::%player%} as number.
Can someone help me with this please?
Information below
Skript Version: Skript 2.2-dev36
Minecraft Version: 1.12.2
---
[EDIT]
Fixed some problems in the skript.
New skript below!
[FIXED-VERSION (V.3)]
[FIXED-VERSION (V.2)]
[WRONG CODE (V.1)]
Errors on Reload:
[EDIT]
I made a Cheque system but if I use it it doesn't give you any money.
The error is on 9 (make player execute command "/eco give {cheque::%player%}").
I want to have {cheque::%player%} as number.
Can someone help me with this please?
Information below
Skript Version: Skript 2.2-dev36
Minecraft Version: 1.12.2
---
[EDIT]
Fixed some problems in the skript.
New skript below!
[FIXED-VERSION (V.3)]
Code:
command /testcheque <number>:
trigger:
if {money.%player%} is smaller than or equal to 0:
send "&e&lMONEY&r &e- &cJe hebt niet genoeg geld voor zo'n cheque!"
if arg-1 is greater than {money.%player%}:
send "&e&lMONEY&r &e- &cJe hebt niet genoeg geld voor zo'n cheque!"
else:
remove arg-1 from {money.%player%}
give player 1 paper of fortune 1 named "&aCheque" with lore "&7From: %player% ||%arg-1%"
send "&e&lMONEY&r &e- &cJe hebt succesvol een cheque gemaakt van %arg-1%$!" to player
On right click holding a paper of fortune 1:
if name of tool of player contains "&aCheque":
set {_value} to the 2nd line of the tool's lore parsed as number
remove paper from the player's tool
add {_value} to {money.%player%}
send "&e&lMONEY&r &e- &cJe hebt succesvol de cheque geïnd! %{_value}%$ is toegevoegd aan je account en nu heb je %{money.%player%}%$!" to player
[FIXED-VERSION (V.2)]
Code:
command /testcheque <integer>:
trigger:
remove arg-1 from {money.%player%}
give player 1 paper of fortune 1 named "&aCheque" with lore "&7From: %player% ||%arg-1%"
send "&e&lMONEY&r &e- &cJe hebt succesvol een cheque gemaakt van %arg-1%$!" to player
On right click holding a paper of fortune 1:
if name of tool of player contains "&aCheque":
set {_value} to the 2nd line of the tool's lore parsed as integer
remove paper from the player's tool
add {_value} to {money.%player%}
send "&e&lMONEY&r &e- &cJe hebt succesvol de cheque geïnd! %{_value}%$ is toegevoegd aan je account en nu heb je %{money.%player%}%$!" to player
[WRONG CODE (V.1)]
Code:
command /testcheque <number>:
trigger:
give player 1 paper of fortune 1 named "&aCheque"
set {cheque::%player%} to arg-1
message "&aJe hebt een Cheque van %arg 1%$ opgenomen" to player
On right click holding a paper:
if name of tool of player is "&aCheque":
make player execute command "/eco give {cheque::%player%}"
delete {cheque::%player%}
remove 1 paper from the player
Errors on Reload:
(There are no errors but the paper doesn't give you anything)
Code:
> [18:36:37 INFO]: [Skript] Reloading d-skript.sk...
> [18:36:37 INFO]: [Skript] Successfully reloaded d-skript.sk.
[EDIT]
I work with a own skript currency. Skript below:
Code:
variables:
{money.%player%} = 0 #Here you can edit how much many do players have at the start of playing on your server.
command /money [<offlineplayer>]:
trigger:
if arg-1 is not set:
message "&e&lMONEY&r &e- You have &c%{money.%player%}% &emoney."
else:
if player has permission "money.admin":
message "&e&lMONEY&r &e- %arg-1% has &c%{money.%arg-1%}% &emoney."
else:
message "&e&lMONEY&r &e- &cYou don't have permission to use that command!"
command /pay <player> <number>:
trigger:
if arg-1 is "%player%":
message "&e&lMONEY&r &e- &cYou cannot pay money to yourself!"
else:
if arg-2 > 0:
if {money.%player%} > 0:
remove arg-2 from {money.%player%}
add arg-2 to {money.%arg-2%}
wait 1 tick
if {money.%player%} > 0:
message "&e&lMONEY&r &e- You have given &c%arg-2%&e money to %arg-1%!" to player
message "&e&lMONEY&r &e- %player% has sent you &c%arg-2%&e money!" to arg-1
else:
message "&e&lMONEY&r &e- &cYou don't have enough money to pay!"
remove arg-2 from {money.%arg-2%}
add arg-2 to {money.%player%}
else:
message "&e&lMONEY&r &e- &cYou don't have enough money to pay!"
else:
message "&e&lMONEY&r &e- &cYou cannot pay 0 or less money."
command /eco <text> [<player>] [<number>]:
permission: money.admin
permission message: &e&lMONEY&r &e- &cYou don't have permission to use that command!
trigger:
if arg-1 is "help": #HELP
message "&2&m---&r&2&lEasyEconomy Help&r&2&m---"
message "&a&o<> is required, () is optional"
message "&e/money (player) &2- Shows your/player's balance"
message "&e/pay <player> <amount> &2- Pay someone from your account"
message "&e/eco help &2- Shows EasyEconomy Help"
message "&e/eco give (player) <amount> &2- Gives money to a player"
message "&e/eco take (player) <amount> &2- Takes money from a player"
else if arg-1 is "give": #GIVE
if arg-2 is not set:
if arg-3 is not set:
message "&e&lMONEY&r &e- &cYou had not set money argument!"
else:
add arg-3 to {money.%player%}
message "&e&lMONEY&r &e- &c%arg-3%&e money was added to your account!"
else:
if arg-3 is not set:
message "&e&lMONEY&r &e- &cYou had not set money argument!"
else:
add arg-3 to {money.%arg-2%}
message "&e&lMONEY&r &e- &c%arg-3%&e money was added to %arg-2%'s account!"
message "&e&lMONEY&r &e- &c%arg-3%&e money was added to your account!" to arg-2
else if arg-1 is "take": #TAKE
if arg-2 is not set:
if arg-3 is not set:
message "&e&lMONEY&r &e- &cYou had not set money argument!"
else:
remove arg-3 from {money.%player%}
message "&e&lMONEY&r &e- &c%arg-3%&e money was taken from your account!"
else:
if arg-3 is not set:
message "&e&lMONEY&r &e- &cYou had not set money argument!"
else:
remove arg-3 from {money.%arg-2%}
message "&e&lMONEY&r &e- &c%arg-3%&e money was taken from %arg-2%'s account!"
message "&e&lMONEY&r &e- &c%arg-3%&e money was taken from your account!" to arg-2
Last edited: