TKChino Posted May 31, 2022 Share Posted May 31, 2022 Iv used it once, i saw a method of using it i incorporated it and it worked with making enchants. My proglem is i dont thinki learnt anything from it to be honest. function newCost(i: integer, l: integer) :: number: # i = cost for first level, l = current level return {_i} * ({_l}^2 / 2 + 1) function getLevelNeed(level: number, pres: number) :: number: return (5*{_pres})+10 function checkLevel(p: player): if {level::%{_p}%} >= getLevelNeed({level::%{_p}%}, {prestige::%{_p}%}): remove getLevelNeed({level::%{_p}%}, {prestige::%{_p}%}) from {level::%{_p}%} prestige({_p}) function sendMessage(p: player, mode: text, message: text, message2: text): if {_mode} is "Title": send title {_message} with subtitle {_message2} to {_p} else if {_mode} is "Actionbar": send action bar "%{_message}% &8| %{_message2}%" to {_p} else if {_mode} is "Chat": send "%{_message}% &8| %{_message2}%" to {_p} function prestige(p: player): add 1 to {prestige::%{_p}%} sendMessage({_p}, {toggle::%{_p}%::msgs}, "PRESTIGE","%{prestige::%{_p}%}-1% &7&l▶ %{prestige::%{_p}%}%") This is the function i feel would be able to be used, but i dont know how to stick it into an actual command. So right now im using command /levelup: trigger: set {lvlprice::%player's uuid%} to {@levelUp} set {_needed} to {lvl::%player's uuid%} * {lvlprice::%player's uuid%} if balance of player >= {_needed}: if {lvl::%player's uuid%} < 100: add 1 to {lvl::%player's uuid%} remove {_needed} from balance of player send player title "&c&lLEVEL UP!" with subtitle "&l+1 Level" for 2 seconds else: send "Your 100" to player else: if balance of player <= {_needed}: send "&a&lYou need &6&lⓉ%{_needed}% &a<o level up!" to player The basic side of command to trigger works, but i want to use the functions instead, any help and guideance would be be greatful useful Link to comment Share on other sites More sharing options...
TKChino Posted June 3, 2022 Author Share Posted June 3, 2022 Anyone able to help at all, still struggling Link to comment Share on other sites More sharing options...
WimfishAlt Posted June 3, 2022 Share Posted June 3, 2022 Idk if this will help cus u havent been very specific on what u want but this might help https://skripthub.net/tutorials/9 (Tutorial on functions by skript themselves) If this helped make sure to leave a like Programmer Owner of fishymini Languages used: Python Html Java JS Skript Link to comment Share on other sites More sharing options...
TKChino Posted June 3, 2022 Author Share Posted June 3, 2022 Oh, duh, yeah forgot people need know what i actually want lol. Its a leveling / prestige skript kinda, not really as you can see. Ill check that function tut you sent though tomoz and see if i understand a little more Link to comment Share on other sites More sharing options...
WimfishAlt Posted June 4, 2022 Share Posted June 4, 2022 Ok hope u find what u need If this helped make sure to leave a like Programmer Owner of fishymini Languages used: Python Html Java JS Skript Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now