#I need help with some skript math
1 messages · Page 1 of 1 (latest)
Sadly no, Skript does not have exponents syntax
Yea if its possible to make it calculate those, it doens't have to be ² or ³
Oh
Okaay
Wait let me check something..
The only way would be to make skript loop 3 times and then multiply it by 1.02 each time... Was just wondering if there was an faster and "shorter" way to do it
do you have skript-reflect
No
thats bad
Is it possible with that?
Yes
yes
an addon to write java-code in skript
ah
no reflect no life
I don't know java code tho
He can spoon you :)
xD
import:
java.lang.Math
command pow <number> <number>:
trigger:
Math.pow(arg-1,arg-2)
Or make a pow function :D
It was just an example bob
I know, event.getPlexy()
public static Object plexy = null;
public Object getPlexy() {
return plexy;
}
I don't get it...
Lets say I wanted something like this to be calculated:
set {_exp} to ceiling({_exp} * {@LifeSkill.Server_data.Mining.Break_exp_multiplier})¹³
but actually
wait
set {_exp} to ceiling({_exp} * {@LifeSkill.Server_data.Mining.Break_exp_multiplier})³
Instead of "³" it would be a variable that can change
Plexy, SPOON HIM PLEASE
xD
function pow(n: number, i: integer) :: number:
loop {_i} times:
set {_n} to {_n} * {_n}
return {_n}
🙂
Math.pow((ceiling({_exp} * {@LifeSkill.Server_data.Mining.Break_exp_multiplier})),3)
cringe
ehy
just use reflect
for pow?
For anything
for reflect
why is ^ not vanilla
Would you rather install skQuery for a shitty syntax or use skript-reflect and may benefit from this addon in future?
or do neither
Good point
Wait its just like this "Math.pow((ceiling({_exp} * {@LifeSkill.Server_data.Mining.Break_exp_multiplier})),3)"?
Well it was before, mistakenly
And it got unexpectedly removed after a regex change in the parser, but they arent aware exponents worked before the change
try !
Thats not so bad honestly, thanks :D
for what
For math
what kind of math are you doing with such a big number
Thanks for the help!
this is not true
Skript represents exponentiation using the ^ operator: https://ayhamal-ali.github.io/Skript/docs.html?search=#ExprArithmetic
For your example, it'd be set {_result} to ceil(2 * 1.02)^3
Whaaa