i created a exp ring.
(There are some functions that i made), when its decay its crash the server, and gives erro movement
nEquip, stack overflow. I use TFS 0.3.6pl i already read a lot but i havent found a solution =s.

Here Items and movements too:
Code:
function onDeEquip(cid, item, slot)
local rate = getlevelRate(cid)
if (item.itemid == 10502) then
doTransformItem(item.uid, 2121, 1)
doPlayerSendTextMessage(cid, 22, 'Sua experiência extra acabou.')
doPlayerSetExperienceRate(cid,rate-1.2)
unsetLevel(cid,1.2)
end
end
function onEquip(cid, item, slot)
local rate = getlevelRate(cid)
if (item.itemid == 2121) then
doTransformItem(item.uid, 10502, 1)
doPlayerSendTextMessage(cid, 22, 'Agora você está ganhando 20% mais experiência!')
doPlayerSetExperienceRate(cid,rate+1.2)
setLevel(cid,1.2)
doDecayItem(item.uid)
end
return true
end
(There are some functions that i made), when its decay its crash the server, and gives erro movement

Here Items and movements too:
Code:
<item id="2121" article="a" name="experience ring">
<attribute key="weight" value="800" />
<attribute key="slotType" value="ring" />
<attribute key="transformEquipTo" value="10502" />
<attribute key="stopduration" value="1" />
<attribute key="showduration" value="1" />
</item>
<item id="10502" article="a" name="experience ring">
<attribute key="weight" value="800" />
<attribute key="slotType" value="ring" />
<attribute key="decayTo" value="10510" />
<attribute key="transformDeEquipTo" value="2121" />
<attribute key="duration" value="10" />
<attribute key="showduration" value="1" />
</item>
<item id="10510" article="a" name="broken experience ring">
<attribute key="description" value="You can repair this." />
<attribute key="weight" value="40" />
</item>
Code:
<movevent type="Equip" itemid="2121" slot="ring" event="script" value="expRing.lua"/>
<movevent type="DeEquip" itemid="10502" slot="ring" event="script" value="expRing.lua"/>
Attachments
-
error.jpg4.9 KB · Views: 1 · VirusTotal
Last edited: