permission: admin.createbanknote
trigger:
set {_amount} to argument 1
set {_item} to paper named "<##65DB33>$%{_amount}%" with lore "&7Right click this banknote to receive your money."
give {_item} to player
send "&aYou got a banknote with $%{_amount}%!" to player
on rightclick holding paper:
send "&eEvent triggered: Right click with paper!" to player
set {_name} to name of event-item
send "&eItem name: %{_name}%" to player
if {_name} starts with "<##65DB33>$":
replace all "<##65DB33>$" with "" in {_name}
send "&eExtracted amount: %{_name}%" to player
if {_name} is not a number:
send "&cError: Unable to extract the amount from the banknote!" to player
stop
execute console command "/eco give %player% %{_name}%"
send "&a<##65DB33>$%{_name}% has been added to your account!" to player
remove 1 of event-item from player
else:
send "&cError: This paper is not a valid banknote!" to player```
#Banknote Skript
1 messages · Page 1 of 1 (latest)
uh
also instead of a console command, just use player's balance (needs vault)
where
in the code
yes but wich line
where you need it
Yo
we put the food on your plate, but you need to eat it
actually thats not really a good analogy
more like we tell you whats in the fridge and you cook
yes yes im kinda dumb
i tried this now
permission: admin.createbanknote
trigger:
set {_amount} to argument 1
set {_item} to paper named "<##65DB33>$%{_amount}%" with lore "&7Right click this banknote to receive your money."
give {_item} to player
send "&aYou got a banknote with $%{_amount}%!" to player
on rightclick holding paper:
send "&eEvent triggered: Right click with paper!" to player
set {_name} to name of event-item
send "&eItem name: %{_name}%" to player
if {_name} starts with "<##65DB33>$":
replace all "<##65DB33>$" with "" in {_name}
send "&eExtracted amount: %{_name}%" to player
set {_amount} to {_name} parsed as number
if {_amount} is not a number:
send "&cError: Unable to extract the amount from the banknote!" to player
stop
execute console command "/eco give %player% %{_amount}%"
send "&a<##65DB33>$%{_amount}% has been added to your account!" to player
remove 1 of event-item from player
else:
send "&cError: This paper is not a valid banknote!" to player```