two questions
1.is there a way to expose stats like vit, str, chr , etc.. to gearswap??
2. does return end the function early??
two questions
1.is there a way to expose stats like vit, str, chr , etc.. to gearswap??
2. does return end the function early??
for #1. ok
what i wanted to do was run the calulations for cure/waltz when used on my self to auto select the correct cure/waltz spell to use
i.e.
local cwalts1 = ((player.VIT + player.CHR)* 0.125 + 60)
if player.max_hp - math.floor(cwalts1) <= player.hp then
for #2. does return need to be "return end" or "return"??
1) math.floor will round the number for you. Arcon opened an issue for himself to expose str/dex/vit/etc. a while back, but I don't think he has done it yet. I know exactly where it is in the packets, so perhaps we'll do it soon.
2) return works by itself, but you need to maintain the proper syntax for your if/else statement, so:
Code:if pants == 'totally awesome' then -- No need to change them! return end
i just found info on rounding numbers
math.ceil(number) rounds up
math.floor(number) rounds down
i edited my post just as you answered
would this be correct
Code:local cwalts1 = ((player.VIT + player.CHR)* 0.125 + 60) if player.max_hp - math.floor(cwalts1) <= player.hp then
It would, if VIT and CHR were exposed yet. Also, you would be over-healing a bit in that situation, but I assume that's what you want.
Yeah, you would want to include your potency gear and actually test for whether waltz 2 is more than you need.
if rline.skill and tonumber(rline.skill) then
rline.skill = res.skills[rline.skill].english
end
i'm getting an error with this line in helper_functions.lua anyone else getting this?
these are my calulations for curing waltz 1-6
main job dnc
local cwalts1 = math.floor(((player.VIT + player.CHR)* 0.250) + 60) +pot
local cwalts2 = math.floor(((player.VIT + player.CHR)* 0.500) + 130) +pot
local cwalts3 = math.floor(((player.VIT + player.CHR)* 0.750) + 270) +pot
local cwalts4 = math.floor(((player.VIT + player.CHR)* 1.000) + 450) +pot
local cwalts5 = math.floor(((player.VIT + player.CHR)* 1.250) + 600) +pot
sub job dnc
local cwalts1 = math.floor(((player.VIT + player.CHR)* 0.125) + 60) +pot
local cwalts2 = math.floor(((player.VIT + player.CHR)* 0.250) + 130) +pot
local cwalts3 = math.floor(((player.VIT + player.CHR)* 0.375) + 270) +pot
for potency gear i could just create a new variable like this depending on the gear i have sence gs would no be able to keep up with gear changes
i.e if i only haveDancer's Casaque +1 which is Waltz potency+10%
local waltzpot = 10%
local cwalts1 = math.floor((((player.VIT + player.CHR)* 0.250) + 60) + waltzpot)
Does anybody know the cure spell calulations
It's probably due to you not having skills.lua in the new windower/res folder. Here is a link:
https://www.dropbox.com/s/wiyhyylgv3ov0b5/skills.lua
thank you! that fixed it!
wonder if i'm missing other files![]()
Yeah you can, for instance, you can also do this this way....
I haven't decided yet if I like doing it this way or with an additional if statement more. The additional if statement is very clear, but adds a lot to the length of your code.Code:if spell.type == 'WeaponSkill' then equip(sets.precast.WS[spell.english][WeaponSkillMode] or {}) end
hello,
I can't get my sch to equip sets.midcast.elementalmagic set for nukes
::edit:: downloaded new sch.lua file. origional sch.lua didnt work for nukes apparently
Also having trouble with my midcast rule since recently
I think is my issueCode:elseif spell.skill ==
To test i made:
but this doesnt give me a message on any cures.Code:function midcast(spell) if spell.skill == 'HealingMagic' then add_to_chat(206,'Cure Test') end end
edit:
if spell.skill == 'Singing' then is only one i can get to work.....