Untitled
unknown
plain_text
2 years ago
935 B
7
Indexable
local config = {
effectonuse = 51, -- efecto que se mostrará
levelscrit = 100, -- niveles requeridos
storagecrit = 48903 -- storage que se verificará
}
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, config.storagecrit) < config.levelscrit then
doRemoveItem(item.uid, 1)
doSendMagicEffect(topos, config.effectonuse)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Has mejorado tu habilidad de Crítico a ["..(getPlayerStorageValue(cid, config.storagecrit)+1).."/100].")
setPlayerStorageValue(cid, config.storagecrit, getPlayerStorageValue(cid, config.storagecrit)+1)
elseif getPlayerStorageValue(cid, config.storagecrit) >= config.levelscrit then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Ya has alcanzado el nivel máximo de la habilidad de Crítico.\n¡Felicidades!")
return 0
end
return 1
endEditor is loading...
Leave a Comment