Se o tópico estiver em lugar errado, movam please.
Bom dia a todos. Tenho um servidor de Tibia GTA, e tenho script de armas, só que tenho uma dúvida nesse script =/, preciso que ao usar o comendo !bullet (a munição automaticamente irá trocar para bullet: id 2543) ou !chumbo(a munição automaticamente irá trocar para chumbo: id 6529). Irei disponibilizar o script:
data>spells>scripts
local runa = 2413
local msg = "Equipe a %s na mão, para poder atirar."
local attackmin, attackmax = 620, 650 -- attack minimo, attack maximo
function onCastSpell(cid, var)
local left, right = getPlayerSlotItem(cid, CONST_SLOT_LEFT), getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
if isInArray({left.itemid, right.itemid}, runa) then
else
return doPlayerSendCancel(cid, msg:format(getItemNameById(runa)))
end
if doPlayerRemoveItem(cid, 2543, 1) 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_DISTANCE) / 3)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -hit, -hit, CONST_ME_MORTAREA)
doSendDistanceShoot(getCreaturePos(cid), getCreaturePos(target), CONST_ANI_BOLT)
return TRUE
end
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui balas.")
return false
end
Pergunta
NathanAmaro 1
Oi pessoinhas do Xtibia
Se o tópico estiver em lugar errado, movam please.
Bom dia a todos. Tenho um servidor de Tibia GTA, e tenho script de armas, só que tenho uma dúvida nesse script =/, preciso que ao usar o comendo !bullet (a munição automaticamente irá trocar para bullet: id 2543) ou !chumbo (a munição automaticamente irá trocar para chumbo: id 6529). Irei disponibilizar o script:
data>spells>scripts
data>spells>spells.xml
é isso, se alguém souber como fazer esse script me ajude, obrigado a todos
Link para o comentário
Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados