Ir para conteúdo

[action]scripts Fodas


druidkean

Posts Recomendados

Olá Gente..Eu Queria Um script .. que refina o item .. exemplo

Uma Sword Normal : 14:32 You see a sword (Atk:14, Def:12 +1).

Refinada Ficaria Assim : 14:32 You see a sword (Refinamento 1) (Atk:19, Def:12 +1).

Tem Um Script mais ou menos assim aqui no forum mas ele refina somente atack,defesa..mas eu queria um que refinaçe +ml,skills,speed..

 

E O Outro Script é o seguinte : Q VIP Nao pegue fila de espera ;p

 

Versao Do Meu OT : 8.50

 

Brigado !

Editado por druidkean
Link para o comentário
Compartilhar em outros sites

Seria possivel fazer isso se desse pra realizar uma função atraves do nome do item.

Exemplo: if item.itemname = "Sword Refinada"

 

Na verdade eu nao sei se é possivel fazer isso, mas se for possivel alguem me avise, que vou tentar fazer esse script.

 

O script de vip nao pegar fila só é possivel nas sources, assim como o de premium nao pegar fila.

 

Seria possivel fazer isso se desse pra realizar uma função atraves do nome do item.

Exemplo: if item.itemname = "Sword Refinada"

 

Na verdade eu nao sei se é possivel fazer isso, mas se for possivel alguem me avise, que vou tentar fazer esse script.

 

O script de vip nao pegar fila só é possivel nas sources, assim como o de premium nao pegar fila.

Link para o comentário
Compartilhar em outros sites

ahh .. o script q eu tenho é esse oh .. ve se ajuda pelo menos :

-- Config

local maxupgradetimes = 50 -- How many times can upgrade the item

local messagetype = 25 -- Color of the message

-- End Config

 

local upgrades = {

[7800] = {chance = 100, amount = {1, 1}, set = setItemAttack, get = getItemAttack, name = "attack"},

[7801] = {chance = 80, amount = {2, 2}, set = setItemAttack, get = getItemAttack, name = "attack"},

[7802] = {chance = 60, amount = {3, 3}, set = setItemAttack, get = getItemAttack, name = "attack"},

[7803] = {chance = 40, amount = {4, 4}, set = setItemAttack, get = getItemAttack, name = "attack", reset = TRUE},

[7804] = {chance = 20, amount = {5, 5}, set = setItemAttack, get = getItemAttack, name = "attack", reset = TRUE},

[7805] = {chance = 100, amount = {1, 1}, set = setItemDefense, get = getItemDefense, name = "defense"},

[7806] = {chance = 80, amount = {2, 2}, set = setItemDefense, get = getItemDefense, name = "defense"},

[7807] = {chance = 60, amount = {3, 3}, set = setItemDefense, get = getItemDefense, name = "defense"},

[7808] = {chance = 40, amount = {4, 4}, set = setItemDefense, get = getItemDefense, name = "defense", reset = TRUE},

[7809] = {chance = 20, amount = {5, 5}, set = setItemDefense, get = getItemDefense, name = "defense", reset = TRUE},

[7810] = {chance = 100, amount = {1, 1}, set = setItemArmor, get = getItemArmor, name = "armor"},

[7811] = {chance = 80, amount = {2, 2}, set = setItemArmor, get = getItemArmor, name = "armor"},

[7812] = {chance = 60, amount = {3, 3}, set = setItemArmor, get = getItemArmor, name = "armor"},

[7813] = {chance = 40, amount = {4, 4}, set = setItemArmor, get = getItemArmor, name = "armor", reset = TRUE},

[7814] = {chance = 20, amount = {5, 5}, set = setItemArmor, get = getItemArmor, name = "armor", reset = TRUE},

[7815] = {chance = 100, amount = {1, 1}, set = setItemHitChance, get = getItemHitChance, name = "hit"},

[7816] = {chance = 80, amount = {2, 2}, set = setItemHitChance, get = getItemHitChance, name = "hit"},

[7817] = {chance = 60, amount = {3, 3}, set = setItemHitChance, get = getItemHitChance, name = "hit"},

[7818] = {chance = 40, amount = {4, 4}, set = setItemHitChance, get = getItemHitChance, name = "hit", reset = TRUE},

[7819] = {chance = 20, amount = {5, 5}, set = setItemHitChance, get = getItemHitChance, name = "hit", reset = TRUE},

[7850] = {chance = 100, amount = {5, 5}, set = setItemAttack, get = getItemAttack, name = "attack"}, -- Only give when your acces is >= 5

[7851] = {chance = 100, amount = {5, 5}, set = setItemDefense, get = getItemDefense, name = "defense"}, -- Only give when your acces is >= 5

[7852] = {chance = 100, amount = {5, 5}, set = setItemArmor, get = getItemArmor, name = "armor"}, -- Only give when your acces is >= 5

[7853] = {chance = 100, amount = {5, 5}, set = setItemHitChance, get = getItemHitChance, name = "hit"} -- Only give when your acces is >= 5

}

local minmax = {

min1 = 7800, -- Minimum actionid for access < 5

max1 = 7819, -- Maximum actionid for access < 5

min2 = 7850, -- Minimum actionid for access >= 5

max2 = 7853, -- Maximum actionid for access >= 5

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

-- From here on down is a bit difficult (for the noob) understand the structure

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 = "You remove the dust and revealed that it is a "..upgrades[new].chance.."% upgrade for "..upgrades[new].name.." +("..upgrades[new].amount[1].."~"..upgrades[new].amount[2]..")."..(upgrades[new].reset ~= nil and "It has a slight chance of reset your item." or "")

local description = "This crystal has "..upgrades[new].chance.."% upgrade for "..upgrades[new].name.." +("..upgrades[new].amount[1].."~"..upgrades[new].amount[2]..")."..(upgrades[new].reset ~= nil and "It has a slight chance of reset your item." or "")

doPlayerSendTextMessage(cid, messagetype, text)

doSetItemActionId(item.uid, new)

doSetItemSpecialDescription(item.uid, description)

setItemName(item.uid, "active upgrade crystal")

elseif upgrades[item.actionid] ~= nil then

if upgrades[item.actionid].get(itemEx.uid) >= 0 then

if itemEx.actionid < 100+maxupgradetimes then

local randomamount = math.ceil(math.random(upgrades[item.actionid].amount[1],upgrades[item.actionid].

amount[2]))

local amount = math.max(0, itemEx.actionid - 100)

local chance = math.random(0, 100)

local text = "Upgrade of "..getItemName(itemEx.uid).." failed in "..upgrades[item.actionid].name.." +"..randomamount.."."

local animation = "Failed!"

--doSetItemActionId(itemEx.uid, 100+(amount+1))

--setItemName(itemEx.uid, getItemNameById(itemEx.itemid).." (Refinamento "..(amount+1)..")")

if chance <= upgrades[item.actionid].chance then

text = "Upgrade of "..getItemName(itemEx.uid).." up in "..upgrades[item.actionid].name.." +"..randomamount.."."

upgrades[item.actionid].set(itemEx.uid, (upgrades[item.actionid].get(itemEx.uid)+randomamount))

setItemName(itemEx.uid, getItemNameById(itemEx.itemid).." (Refinamento "..(amount+1)..")")

doSetItemActionId(itemEx.uid, 100+(amount+1))

elseif upgrades[item.actionid].reset ~= nil or upgrades[item.actionid].reset == TRUE then

if math.random(0, 1) == 1 then

text = "The item "..getItemName(itemEx.uid).." was reset."

animation = "Reset!"

doRemoveItem(itemEx.uid)

doPlayerAddItem(cid, getItemIdByName(getItemNameById(itemEx.itemid)))

end

end

if (not text == "The item "..getItemName(itemEx.uid).." was reset.") then

if getItemAttack(itemEx.uid) >= 0 then

setItemAttackSpeed(itemEx.uid, 1)

end

end

doPlayerSendTextMessage(cid, messagetype, text)

doSendMagicEffect(toPosition, (chance <= upgrades[item.actionid].chance and 13 or 2))

doSendAnimatedText(toPosition, (chance <= upgrades[item.actionid].chance and "Success!" or animation),(chance <= upgrades[item.actionid].chance and TEXTCOLOR_WHITE or TEXTCOLOR_RED))

doRemoveItem(item.uid)

else

doPlayerSendCancel(cid, "This item already has "..maxupgradetimes.." times of upgrades.")

end

else

doPlayerSendCancel(cid, "This item can't upgrade.")

end

else

doPlayerSendCancel(cid, "Sorry, not possible.")

end

return TRUE

end

Editado por druidkean
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...