Aller au contenu

Messages recommandés

Posté(e) (modifié)

Version de Minecraft : 1.13.2
Version de Skript : 2.X.X

Type du skript : ATM

Description du script :

Bonjour je cherche un Skript d'ATM en 1.13.2 ( <- version de minecraft) pour mon serveur Roleplay

                                                                                                                                               Merci

Modifié par GABY_MNO
Posté(e)

Bonjour,

Merci de préciser votre version de Skript en faisant /version Skript, pour ton skript je te propose ceci que j'ai trouvé :

#©
#- Reselling/Reuploading while claiming that it is yours or made by you is disallowed
#- Do not edit it and upload it as your own
#- While using it in a video, please feature everything under "Video"
#©
#
#Video:
#Skript made by Zeldaboy111
#More content of the creator: https://forums.skunity.com/search/26443679/
options:
	starterBalance: 2000

on enable:
	set {atm.guiItems::*} to diamond block, gold block, iron block, gold ingot, iron ingot, gold nugget, iron nugget
	set {atm.guiWorth::*} to 1000, 500, 100, 50, 10, 2 and 1

function drawOutline(p: Player, mat: Material, rows: Number):
	loop 9 times:
		set slot loop-value - 1 of {_p}'s current inventory to {_mat} named "&8"
		set slot ({_rows}*9) - loop-value of {_p}'s current inventory to {_mat} named "&8"

	loop {_rows} times:
		set slot loop-value * 9 of {_p}'s current inventory to {_mat} named "&8"
		set slot loop-value * 9 - 1 of {_p}'s current inventory to {_mat} named "&8"

function drawBalance(p: Player):
	set {_balance} to {balance.atm.%{_p}%}

	set {_slot} to 10
	loop {atm.guiWorth::*}:
		set {_amount} to 0
		set {_worth} to 0
		while {_balance} >= loop-value:
			add 1 to {_amount}
			add loop-value to {_worth}
			remove loop-value from {_balance}

		set slot {_slot} of {_p}'s current inventory to {atm.guiItems::%loop-index%} named "€%loop-value%" with lore "" and "&7Amount&8: &7%{_amount}%", "&7Worth&8: &7€%{_worth}%"
		add 1 to {_slot}


command /atm:
	trigger:
		open chest with 3 rows named "&cATM %player%" to player
		wait 2 ticks
		drawOutline(player, gray stained glass pane, 3)
		drawBalance(player)

on join:
	if {balance.atm.%player%} is not set:
		set {balance.atm.%player%} to 2000

on inventory click:
	if type of clicked inventory is chest inventory:
		if inventory name of clicked inventory is "&cATM %player%":
			cancel event

A voir s'il correspond à ta demande.

Cordialement,

  • 3 mois après...
Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.