Lurk
Active Member
- Joined
- Dec 4, 2017
- Messages
- 336
- Reaction score
- 49
in items.xml (one transforms into the other)
in movements.xml
expring40.lua
expected: equip the ring ang get 1 extra distance, sword... but ain't getting the stats, I have no idea why. All the other items give attributes properly
XML:
<item id="10064" article="a" name="EXP Ring 90% de exp extra">
<attribute key="weight" value="80"/>
<attribute key="slotType" value="ring"/>
<attribute key="skillSword" value="1"/>
<attribute key="skillClub" value="1"/>
<attribute key="skillAxe" value="1"/>
<attribute key="magicpoints" value="1"/>
<attribute key="skillDist" value="1"/>
<attribute key="skillShield" value="1"/>
<attribute key="showattributes" value="1" />
</item>
<item id="10063" article="an" name="EXP Ring 90% de exp extra.">
<attribute key="weight" value="80"/>
<attribute key="skillSword" value="1"/>
<attribute key="skillClub" value="1"/>
<attribute key="skillAxe" value="1"/>
<attribute key="magicpoints" value="1"/>
<attribute key="skillDist" value="1"/>
<attribute key="skillShield" value="1"/>
<attribute key="showattributes" value="1" />
<attribute key="slotType" value="ring"/>
</item>
in movements.xml
XML:
<movevent type="Equip" itemid="10063" slot="ring" event="script" value="expring40.lua"/>
<movevent type="DeEquip" itemid="10064" slot="ring" event="script" value="expring40.lua"/>
expring40.lua
LUA:
local rate = 1.9
local ratevip = 2.05
local rateaccess = 1.15
function onEquip(cid, item, slot)
doTransformItem(item.uid, 10064, 1)
doPlayerSendTextMessage(cid, 22, 'Agora você ganha 90% a mais de experiencia!')
if getPlayerStorageValue(cid, 13704) - os.time() >= 1 then
doPlayerSetExperienceRate(cid, ratevip)
else
doPlayerSetExperienceRate(cid, rate)
end
return TRUE
end
function onDeEquip(cid, item, slot)
doTransformItem(item.uid, 10063, 1)
doPlayerSendTextMessage(cid, 22, 'Experiencia extra cancelada.')
if getPlayerStorageValue(cid, 13704) - os.time() >= 1 then
doPlayerSetExperienceRate(cid, rateaccess)
else
doPlayerSetExperienceRate(cid, 1)
end
return TRUE
end
expected: equip the ring ang get 1 extra distance, sword... but ain't getting the stats, I have no idea why. All the other items give attributes properly