Ai Vodkart, Eu coloquei o Seguinte Arquivo na PAsta Mods, junto co makeles arquivos que vc me falou ali em cima!
Meu script ta assim:
itemexp.xml
<?xml version="1.0" encoding="UTF-8"?>
<mod name="itemexp" version="1.0" author="vodka" contact="xtibia.com" enabled="yes">
<config name="itemexp"><![CDATA[
info = {
rate = 0.5,
time = 5, -- Hours
storage = 20012
}
function endExpRate(cid)
if isPlayer(cid) == TRUE then
doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate
setPlayerStorageValue(cid, info.storage, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Your extra experience time has ended.')
end
end
]]></config>
<event type="login" name="check_rate" event="script"><![CDATA[
domodlib('itemexp')
function onLogin(cid)
if getPlayerStorageValue(cid, info.storage) >= os.time() then
doPlayerSetRate(cid, SKILL__LEVEL, info.rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your extra experience rate is now: ' .. info.rate .. '. It will last for '.. math.floor((getPlayerStorageValue(cid, info.storage) - os.time())/(3600)) ..' hours.')
addEvent(endExpRate, math.floor(getPlayerStorageValue(cid, info.storage) - os.time())*3600*1000, cid)
end
return true
end]]></event>
<action itemid="5937" event="script"><![CDATA[
domodlib('itemexp')
function onUse(cid, item, frompos, item2, topos)
if (getPlayerStorageValue(cid, info.storage) <= os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Your extra experience rate is now: ' .. info.rate .. '. It will last for '.. info.time ..' hours.')
doPlayerSetRate(cid, SKILL__LEVEL, info.rate)
setPlayerStorageValue(cid, info.storage, os.time()+info.time*3600)
addEvent(endExpRate, info.time *3600*1000, cid)
doRemoveItem(item.uid, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You still have extra experience time left.')
end
return true
end]]></action>
</mod>
e Quando eu dou use no item 5937 no meu ot, aparece isso : You cannot use this object!
eu n sei qq ta errado !!
Esse script só fnciona se for amulet ??
Aguardo Resposta, Obrigado!!






info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino
junto com esses
buypremium_command.xml
buypremium_command.xml
custommonsters.xml
customspells.xml
firstitems.xml
highscorebook.xml