Skript Version: 2.4
Minecraft Version: 1.15.1
So, I'm making a thing called Class. So when a player first joins, the player will be prompted with a GUI Menu, and to choose one of the 2 classes: One is Warrior and the other is Builder. The player cannot close the GUI. Once the player has chosen a Class, they cannot change the class for the next 7 days. (I managed to add a cooldown to /class). Also, here are the Perks for both of the classes:
Builder:
However, this code is wrong...
The Question I have is: How do I make it such that, the Class Perks are available for 7 days only? And in a Loop? And the loop stops when 7 Days are over (GUI pops up again). I tried this with Functions, but couldn't figure out how to do...
Addons I'm using: TuSKe 1.8.2, SkRayFall 1.9.18
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I've tried looking at similar Skripts, but found none.
[doublepost=1577936328,1577862250][/doublepost]Please Help!!!
The Main Question is: How do I make it such that, the Class Perks are available for 7 days only? And in a Loop? And the loop stops when 7 Days are over (GUI pops up again). I tried this with Functions, but couldn't figure out how to do...
Minecraft Version: 1.15.1
So, I'm making a thing called Class. So when a player first joins, the player will be prompted with a GUI Menu, and to choose one of the 2 classes: One is Warrior and the other is Builder. The player cannot close the GUI. Once the player has chosen a Class, they cannot change the class for the next 7 days. (I managed to add a cooldown to /class). Also, here are the Perks for both of the classes:
Builder:
- 1 Cobble stone every 10 seconds (Until 64 Max)
- Discount on /shop
- Haste 1 Effect
- Custom Missions
- Sharpness 1 on Sword
- Custom Missions
- etc...
Code:
command /class:
trigger:
set {_cooldownTimer} to difference between {class.%player%.lastused} and now
if {_cooldownTimer} is less than 10 seconds:
send "&b&lBanknote &8» &7You cannot change your class for the next &b%difference between 7 days and {_cooldownTimer}%&7!"
stop
else:
open virtual chest with 1 rows with name "&b&lBanknote &0» &8&lClasses" to player
loop integers between 0 and 8:
make gui slot loop-integer of player with gray stained glass pane with name ""
make gui slot 3 of player with white wool with name "&b&lBUILDER &f&lCLASS" with lore "&8Information" and "" and "&7Perks:" and "" and "&8» &bCobble Stone &f- &7Get &f1 &7per Second" and "&8» &bDiscount &f- &710%% Discount on &bTier 1, 2, 3 &7Blocks" and "&8» &bPickaxe Effect &f- &7Effect &f1 &7on Pickaxe" and "&8» &bMissions &f- &7Custom Missions" and "&8» &bPotion &f- &7Have &b∞ &fHaste I &7Effect" to close:
send "&b&lBanknote &8» &7You Successfully chose &bBuilder &7Class!"
set {class.%player%.lastused} to now
send title "&b&lCLASS" with subtitle "&fYou chose the &b&lBUILDER &fClass!" to {_p} for 3 seconds
every 5 seconds:
set {_cooldownTimer} to difference between {class.%player%.lastused} and now
if {_cooldownTimer} is less than 10 second:
every 1 second in "world1":
if player does not have 64 cobblestone:
give a cobblestone to player
However, this code is wrong...
The Question I have is: How do I make it such that, the Class Perks are available for 7 days only? And in a Loop? And the loop stops when 7 Days are over (GUI pops up again). I tried this with Functions, but couldn't figure out how to do...
Addons I'm using: TuSKe 1.8.2, SkRayFall 1.9.18
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I've tried looking at similar Skripts, but found none.
[doublepost=1577936328,1577862250][/doublepost]Please Help!!!
The Main Question is: How do I make it such that, the Class Perks are available for 7 days only? And in a Loop? And the loop stops when 7 Days are over (GUI pops up again). I tried this with Functions, but couldn't figure out how to do...