- Joined
- Apr 15, 2004
- Messages
- 1,396
Ive been trying to convert a string to a spellability ID the 4 integerletter code but I cannot figure out how to do so.
I tried,
which takes item Longsword A00AA00V
and chops the end of its name into
A00A
A00V
the S2I converts it to an integer so it should be a usable spell ID right?
and the spell longsword is A00A while its swingspeed modifier is spellid A00V.
And when i use the:
it will not give the ability to the guy! i know it works because if i do it manually it does.
but i cannot get it to use the string to apellID.
Please help.
I tried,
Code:
set udg_itemnameidcode = SubStringBJ(udg_Itembase[udg_rowp[udg_pagenumber]], ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 7 ), ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 4 ))
set udg_spells = S2I(udg_itemnameidcode)
set udg_itemnameidcode2 = SubStringBJ(udg_Itembase[udg_rowp[udg_pagenumber]], ( StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]) - 3 ), StringLength(udg_Itembase[udg_rowp[udg_pagenumber]]))
set udg_spells_attackspeed = S2I(udg_itemnameidcode2)
which takes item Longsword A00AA00V
and chops the end of its name into
A00A
A00V
the S2I converts it to an integer so it should be a usable spell ID right?
and the spell longsword is A00A while its swingspeed modifier is spellid A00V.
And when i use the:
Code:
Unit - Add spells to Hero
Unit - Add spells_attackspeed to Hero
it will not give the ability to the guy! i know it works because if i do it manually it does.
but i cannot get it to use the string to apellID.
Please help.