#196 LUASpell + LUASpell SpellData Customization in LUA Scripting

Lezárt
megnyitva ekkor: 3 éve image által · 2 hozzászólás
image hozzászólt 3 éve

Requirement:

need a modifiedcastspell for items to manually input values such as a spell data and duration

Need spell access and customizing SpellData, eg. cast time of a spell within LUA scripts

eg

Spell = GetSpell(spellid, tier)

newCastTime = GetSpellData(Spell, "cast_time")

-- add 10 seconds to cast time
newCastTime = castTime + 1000

SetSpellData(Spell, "cast_time", newCastTime)

CastCustomSpell(spell, Caster, Target)
Requirement: ``` need a modifiedcastspell for items to manually input values such as a spell data and duration ``` Need spell access and customizing SpellData, eg. cast time of a spell within LUA scripts eg ``` Spell = GetSpell(spellid, tier) newCastTime = GetSpellData(Spell, "cast_time") -- add 10 seconds to cast time newCastTime = castTime + 1000 SetSpellData(Spell, "cast_time", newCastTime) CastCustomSpell(spell, Caster, Target) ```
image hozzászólt 3 éve
Közreműködő

example of abasicfirework.lua item adding 500 (5 seconds) to its existing cast time, for a total of 5.01 seconds:

function used(Item, Player)
Spell = GetSpell(5003, 1)

newCastTime = GetSpellData(Spell, "cast_time")
newCastTime = newCastTime + 500
SetSpellData(Spell,"cast_time",newCastTime)
CastCustomSpell(Spell, Player, Player)

end
example of abasicfirework.lua item adding 500 (5 seconds) to its existing cast time, for a total of 5.01 seconds: ``` function used(Item, Player) Spell = GetSpell(5003, 1) newCastTime = GetSpellData(Spell, "cast_time") newCastTime = newCastTime + 500 SetSpellData(Spell,"cast_time",newCastTime) CastCustomSpell(Spell, Player, Player) end ```
image hivatkozott erre a hibajegyre egy commit-ban ekkor: 3 éve
image lezárta ekkor: 3 éve
image hozzászólt 3 éve
Közreműködő

need to put some better protection on the base spell duplication and then delete the copied spell when necessary, will fix the rest of this tomorrow

need to put some better protection on the base spell duplication and then delete the copied spell when necessary, will fix the rest of this tomorrow
image kinyitotta ekkor: 3 éve
image hivatkozott erre a hibajegyre egy commit-ban ekkor: 3 éve
image lezárta ekkor: 3 éve
Jelentkezzen be hogy csatlakozhasson a beszélgetéshez.
Töltés...
Mégse
Mentés
Még nincs tartalom.