Hi guys,
I have a big problem because when I'm wearing item :
<item id="2427" article="a" name="test pants">
<attribute key="weight" value="100"/>
<attribute key="armor" value="1"/>
<attribute key="slotType" value="legs"/>
<attribute key="maxhealthpoints" value="1000"/>
</item>
And using " Transform " then gets a health bonus from item and transformation.
Sample :
TEST 1HP
Equip armor 1001HP
Using transform 3003HP
DeEquip armor 2003 HP
local tabela = {
---Naruto---
[1] = {newvoc = 2, level = 30, hp = 1000}
}
function onCastSpell(cid, var)
local arr = tabela[getPlayerVocation(cid)]
if(arr ~= NULL) then
if getPlayerLevel(cid) >= arr.level then
doPlayerSetVocation(cid, arr.newvoc)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + arr.hp)
else
doPlayerSendCancel(cid, "You need " .. arr.level .. " level to transform.")
end
else
doPlayerSendCancel(cid, "You don't have more transformations.")
end
return true
end
I have a big problem because when I'm wearing item :
<item id="2427" article="a" name="test pants">
<attribute key="weight" value="100"/>
<attribute key="armor" value="1"/>
<attribute key="slotType" value="legs"/>
<attribute key="maxhealthpoints" value="1000"/>
</item>
And using " Transform " then gets a health bonus from item and transformation.
Sample :
TEST 1HP
Equip armor 1001HP
Using transform 3003HP
DeEquip armor 2003 HP
local tabela = {
---Naruto---
[1] = {newvoc = 2, level = 30, hp = 1000}
}
function onCastSpell(cid, var)
local arr = tabela[getPlayerVocation(cid)]
if(arr ~= NULL) then
if getPlayerLevel(cid) >= arr.level then
doPlayerSetVocation(cid, arr.newvoc)
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + arr.hp)
else
doPlayerSendCancel(cid, "You need " .. arr.level .. " level to transform.")
end
else
doPlayerSendCancel(cid, "You don't have more transformations.")
end
return true
end