- 0
pedido Harry Potter De Tibia Eu Gostaria De Criar Um Horcrux Que Equipa Igual Ringe Almenta O Attack
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 105 visualizações
-
- 1 resposta
- 264 visualizações
-
- 0 respostas
- 602 visualizações
-
- 0 respostas
- 424 visualizações
-
- 0 respostas
- 671 visualizações
-
Pergunta
LeoTK 173
galera emtaum eu gostaria de criar a seguinte script bom assim eu ja tenho os itens os ids so falta adicionar a funçao por exemplo minha varinha hita 10 emtaum quando eu equipase a horcrux como ring o attack da varinha almenta-se em 10 emtaum eu hitaria 20 e assim por diante irei postar
o local das varinhas
esta em data/spells/script/varinha
Spoiler
local runa = 2376
local text = "......Estupefata....."
local msg = "Equipe a %s na mão, para poder atirar."
local attackmin, attackmax = 5, 10 -- attack minimo, attack maximo
local ring = { -- [iddoitemnoslotdoring] = acrescimonohit
[2207] = 10,
[2166] = 20,
[2169] = 30,
[2208] = 40,
[2167] = 50,
[2209] = 60,
[2168] = 80,
}
function onCastSpell(cid, var)
local left, right = getPlayerSlotItem(cid, CONST_SLOT_LEFT), getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
if not isInArray({left.itemid, right.itemid}, runa) then
return doPlayerSendCancel(cid, msg:format(getItemNameById(runa)))
end
if doPlayerRemoveItem(cid, runa, 0) then -- troque pelo id da bolt
target = getCreatureTarget(cid)
if (target <= 0) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Selecione um target.")
return false
end
hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_MAGIC) / 3)
if ring[getPlayerSlotItem(cid, CONST_SLOT_RING).itemid] then
hit = hit + ring[getPlayerSlotItem(cid, CONST_SLOT_RING).itemid]
end
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -hit, -hit, CONST_ME_MORTAREA)
doSendDistanceShoot(getCreaturePos(cid), getCreaturePos(target), CONST_ANI_POISONARROW)
doCreatureSay(cid, text, 19)
return true
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui balas.")
end
return false
end
agora spells.xml
Spoiler
<rune name="Varinha 1" id="2376" allowfaruse="1" charges="no" lvl="1" exhaustion="1000" maglv="0" range="5" needtarget="0" blocktype="solid" event="script" value="varinha.lua"/>
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados