hello there, i updated my server (naxedOt) from 8.52 to 8.54 and here's the problem, the famous upgrade system dont work anymore :S
please i need the functions to run the upgrade syst.
the script...
thanks
please i need the functions to run the upgrade syst.
the script...
local messagetype = MESSAGE_EVENT_ORANGE
local fetishs = {
[7800] = {chance = 100, amount = 1, set = setItemAttack, get = getItemAttack, name = "ataque"},
[7801] = {chance = 75, amount = 2, set = setItemAttack, get = getItemAttack, name = "ataque"},
[7802] = {chance = 50, amount = 3, set = setItemAttack, get = getItemAttack, name = "ataque", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7803] = {chance = 25, amount = 4, set = setItemAttack, get = getItemAttack, name = "ataque", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7804] = {chance = 100, amount = 1, set = setItemDefense, get = getItemDefense, name = "defensa"},
[7805] = {chance = 75, amount = 2, set = setItemDefense, get = getItemDefense, name = "defensa"},
[7806] = {chance = 50, amount = 3, set = setItemDefense, get = getItemDefense, name = "defensa", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7807] = {chance = 25, amount = 4, set = setItemDefense, get = getItemDefense, name = "defensa", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7808] = {chance = 100, amount = 1, set = setItemArmor, get = getItemArmor, name = "armadura"},
[7809] = {chance = 75, amount = 2, set = setItemArmor, get = getItemArmor, name = "armadura"},
[7810] = {chance = 50, amount = 3, set = setItemArmor, get = getItemArmor, name = "armadura", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7811] = {chance = 25, amount = 4, set = setItemArmor, get = getItemArmor, name = "armadura", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7812] = {chance = 100, amount = 1, set = setItemShootRange, get = getItemShootRange, name = "rango"},
[7813] = {chance = 75, amount = 2, set = setItemShootRange, get = getItemShootRange, name = "rango"},
[7814] = {chance = 50, amount = 3, set = setItemShootRange, get = getItemShootRange, name = "rango", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7815] = {chance = 25, amount = 4, set = setItemShootRange, get = getItemShootRange, name = "rango", destroy = FALSE}, -- CRISTAL PROPENSO A ROMPERSE
[7850] = {chance = 100, amount = 5, set = setItemAttack, get = getItemAttack, name = "ataque"}, -- SOLO CMs Y GODs
[7851] = {chance = 100, amount = 5, set = setItemDefense, get = getItemDefense, name = "defensa"}, -- SOLO CMs Y GODs
[7852] = {chance = 100, amount = 5, set = setItemArmor, get = getItemArmor, name = "armadura"}, -- SOLO CMs Y GODs
[7853] = {chance = 100, amount = 5, set = setItemShootRange, get = getItemShootRange, name = "rango"} -- SOLO CMs Y GODs
}
local minmax = {
min1 = 7800, -- minimo de la lista random de players a GMs
max1 = 7815, -- maximo de la lista random de players a GMs
min2 = 7850, -- minimo de la lista random para CMs y GODs
max2 = 7853, -- maximo de la lista random para CMs y GODs
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.actionid == 0 then
local new = getPlayerAccess(cid) >= 5 and math.random(minmax.min2, minmax.max2) or math.random(minmax.min1, minmax.max1)
local text = "Activaste el cristal, tienes "..fetishs[new].chance.."% de probabilidad para incrementarle +"..fetishs[new].amount.." de "..fetishs[new].name.." a tu item."..(fetishs[new].destroy ~= nil and " es posible que tu item se rompa." or "")
doPlayerSendTextMessage(cid, messagetype, text)
doSetItemActionId(item.uid, new)
doSetItemSpecialDescription(item.uid, text)
elseif fetishs[item.actionid] ~= nil then
if fetishs[item.actionid].get(itemEx.uid) > 0 then
if itemEx.actionid < 107 then
local amount = math.max(0, itemEx.actionid - 100)
local chance = math.random(0, 100)
local text = "Tu intento por mejorarle "..fetishs[item.actionid].name.." a tu "..getItemNameById(itemEx.itemid).." a fallado"
if chance <= fetishs[item.actionid].chance then
fetishs[item.actionid].set(itemEx.uid, (fetishs[item.actionid].get(itemEx.uid)+fetishs[item.actionid].amount))
text = getItemNameById(itemEx.itemid).." "..fetishs[item.actionid].name.." +"..fetishs[item.actionid].amount.."."
elseif fetishs[item.actionid].destroy ~= nil or fetishs[item.actionid].destroy == TRUE then
if math.random(0, 1) == 1 then
doRemoveItem(itemEx.uid)
text = "Tu "..getItemNameById(itemEx.itemid).." fue destruido a causa de una refinacion fallida."
end
end
doPlayerSendTextMessage(cid, messagetype, text)
doSetItemActionId(itemEx.uid, 100+(amount+1))
setItemName(itemEx.uid, ""..getItemNameById(itemEx.itemid).." +"..(amount+1).."")
doSendMagicEffect(toPosition, (chance <= fetishs[item.actionid].chance and 13 or 2))
doSendAnimatedText(toPosition, (chance <= fetishs[item.actionid].chance and "Exito!" or "Fallaste!"),(chance <= fetishs[item.actionid].chance and TEXTCOLOR_WHITE or TEXTCOLOR_RED))
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "Solo puedes aumentar tus items hasta +7 con este cristal.")
end
else
doPlayerSendCancel(cid, "Ese item no se puede refinar con este cristal.")
end
else
doPlayerSendCancel(cid, "el Cristal ya esta activado, usalo en el item adecuado!!.")
end
if itemEx.actionid == 106 then
local amount = math.max(0, itemEx.actionid - 100)
setItemName(itemEx.uid, "Unestable "..getItemNameById(itemEx.itemid).." +"..(amount+1).."")
local text = "(Refinacion completada por "..getPlayerName(cid)..")"
doSetItemSpecialDescription(itemEx.uid, text)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Tu "..getItemNameById(itemEx.itemid).." a completado su fase de refinacion, ahora puedes iniciar el proseso de purificacion para volver tu item mas poderoso")
else
end
return TRUE
end
thanks