View Single Post
01-21-24, 08:17 PM   #1
Tottycek
A Defias Bandit
Join Date: Jan 2024
Posts: 2
Addon modifying help

Heya,

i have been trying to modify one addon, namely Quartz. It is an older version, it will be in use on the last patch of cataclysm 4.3.4

I tried out getting help from ChatGPT, Im a total newbie regarding lua coding, whenever i see the code, it makes sense to me and im able to understand it atleast in the most cases, but im unable to write it myself. Could use some help here, if you dont mind

local channelingTicks = {
-- warlock
[GetSpellInfo(1120)] = 6, -- drain soul
[GetSpellInfo(689)] = 3, -- drain life
[GetSpellInfo(5740)] = 4, -- rain of fire
-- druid
[GetSpellInfo(740)] = 4, -- Tranquility
[GetSpellInfo(16914)] = 10, -- Hurricane
-- priest
[GetSpellInfo(15407)] = 3, -- mind flay
[GetSpellInfo(48045)] = 5, -- mind sear
[GetSpellInfo(47540)] = 3, -- penance
-- mage
[GetSpellInfo(5143)] = 5, -- arcane missiles
[GetSpellInfo(10)] = 5, -- blizzard
[GetSpellInfo(12051)] = 4, -- evocation
}


the issue is, the ticks for spells are predetermined without taking into account any haste, so i would like to replace the numbers with dynamic values, based on the haste rating the player currently has.

Example:
If the player has 1280 haste or more, the Drain Soul tick is set at 5.
If the player has 1670 haste or mroe, the Drain soul tick is set at 6.

Im not directly asking for you guys to write the code directly, i wouldnt mind that i guess, but could you atleast point me towards the functions i should use? Also, am I even able to just do a bit of code before and then the output will be (lets say) "hasteValue", then replace the number itselft with "hasteValue" without changing the code completely?

Thanks alot of any answers.
  Reply With Quote