Ir para conteúdo

Featured Replies

Postado
  • Autor
38 minutos atrás, Cerberus disse:

local condition_sword = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition_sword, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition_sword, CONDITION_PARAM_SKILL_SWORD, 50)

local ID_upgrade = 2394
local items = getPlayerItemCount(cid, ID_upgrade)
local arma = getPlayerSlotItem(cid, CONST_SLOT_LEFT),getPlayerSlotItem(cid, CONST_SLOT_LEFT)
local sto = 5555 -- armazena a storage que a stone deu ao dar use.
local storage =  getPlayerStorageValue(cid, sto)
local atribute = getItemWeaponType(arma[1]),getItemWeaponType(arma[2])
local weapom = Id[atribute[1]],Id[atribute[2]]
function onEquip(cid, item, slot)
if items > 0 then
	if arma[1].itemid ~= 0 and arma[2].itemid ~= arma[1].itemid or arma[1].itemid ~= arma[2].itemid and arma[2].itemid ~= 0 then
		return doPlayerSendCancel(cid, "os itens equipados tem que ser iguais..")
	end
if weapom[1] or weapom[2] then
	if getItemAttribute(item.uid, attack) then
		doItemSetAttribute(item.uid, elementIce, 50)
	end




end 
return true
end

  
 só 1 esboço xD não e script nenhum estou montando as restrições.

ok vc é mill cara tu consegue

 

2 horas atrás, Cerberus disse:

so uso discord. https://discord.gg/gKRDbea

qual sua tag do discord para add vc como amigo

??

  • Respostas 15
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local function isWand(uid) -- Function by Mock the bear. uid = uid or 0 if getItemWeaponType(uid) == 6 then return true end return false end local function isWeapon(uid) -- Fun

Posted Images

Postado
local function isWand(uid) -- Function by Mock the bear.
    uid = uid or 0
    if getItemWeaponType(uid) == 6 then
        return true
    end
    return false
end
local function isWeapon(uid) -- Function by Mock the bear.
  uid = uid or 0
  local f = getItemWeaponType(uid)
  if f == 1 or f == 2 or f == 3 then
    return true
  end
  return false
end
local function isShield(uid) -- Function by Mock the bear.
  uid = uid or 0
  if getItemWeaponType(uid) == 4 then
    return true
  end
  return false
end
local function isBow(uid) -- Function by Mock the bear.
  uid = uid or 0
  if getItemWeaponType(uid) == 5 then
    return true
  end
  return false
end
local function getWeaponLevel(uid) -- Function by Mock the bear.
  uid = uid or 0
  local name = getItemName(uid.uid) or getItemInfo(uid.itemid).name or ''
  local lvl = string.match(name,'%s%+(%d+)%s*')
  return tonumber(lvl) or 0
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 0 or item.itemid == 0 then return false end
    if isCreature(itemEx.uid) == TRUE then return false end
		if isWeapon(itemEx.uid) then
		  if math.random(1,100) < 15 then
			doItemSetAttribute(itemEx.uid, 'dualwield', true)
			doPlayerSendCancel(cid, "Item encantado com sucesso!")
		  else
			doPlayerSendCancel(cid, "Sua pedra quebrou ao tentar encantar o item.")
		  end
		  doRemoveItem(item.uid)
		elseif isWand(itemEx.uid) then
		  if math.random(1,100) < 15 then
			doItemSetAttribute(itemEx.uid, 'dualwield', true)
			doPlayerSendCancel(cid, "Item encantado com sucesso!")
		  else
			doPlayerSendCancel(cid, "Sua pedra quebrou ao tentar encantar o item.")
		  end
		  doRemoveItem(item.uid)
		elseif isShield(itemEx.uid) then
		  if math.random(1,100) < 15 then
			doItemSetAttribute(itemEx.uid, 'dualwield', true)
			doPlayerSendCancel(cid, "Item encantado com sucesso!")
		  else
			doPlayerSendCancel(cid, "Sua pedra quebrou ao tentar encantar o item.")
		  end
		  doRemoveItem(item.uid)
		elseif isBow(itemEx.uid) then
		  if math.random(1,100) < 15 then
			doItemSetAttribute(itemEx.uid, 'dualwield', true)
			doPlayerSendCancel(cid, "Item encantado com sucesso!")
		  else
			doPlayerSendCancel(cid, "Sua pedra quebrou ao tentar encantar o item.")
		  end
		  doRemoveItem(item.uid)
		else
		  doPlayerSendCancel(cid, "Use a pedra em alguma arma.")
		end
return true
end

tenta esse ae.

Editado por Cerberus (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo