Ir para conteúdo

lovenina12

Campones
  • Total de itens

    90
  • Registro em

  • Última visita

4 Seguidores

Sobre lovenina12

Informações

  • Char no Tibia
    Zoaklen
  • Forma que conheci o xTibia
    Sites de Busca
  • Sou
    Scripter

Últimos Visitantes

2538 visualizações

lovenina12's Achievements

  1. Oloco, Mutação OTServ vai voltar? Você é o Admin original ou um fãn que ta recriando o server?
  2. "Não rezei para que o encontrassem o ladrão, rezei para que o ladrão se arrependesse e ficasse bonzinho" ~ Roberto Gómez Bolaños
  3. Concordo com o Draky, a graça de antigamente eram os knights "imortais", a falta de hotkeys, e os gráficos nostálgicos (que já tem).
  4. Calma, eu sei que to revivendo topico mais se alguem quiser o mesmo que o SkyDarkyes acho que seria assim nos itens: item = {2160,2160,10610}),
  5. nossa, voce deve ter se esquecido que eu existo =x, faz 3 dias, mas... eu nao entendi oq voce disse:
  6. mais da mesma forma, ja usei essa funcao em mts tags de action. e isso deixa o alcance infinito ( do tamanho da sua visao ) @edit UIA quase cometi double post. function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local alcance = 6 -- Alcance do tiro if isCreature(itemEx.uid) then if getDistance(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > alcance then doPlayerSendCancel(cid, "Longe demais!") return TRUE end end if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end mano, eu to com uma duvida na cabeca. o seu item é de use with, certo? entao o need_target deveria ser falso. '-' e sobre o efeito do teleport, voce tem que alterar aqui local shot_effect = 10 -- Efeito do tiro
  7. eu axo que ta um pouco errado. pq se voce for no spells.xml vai notar que as runas usam allowfaruse="1" e elas possui uma distancia infinita! des de que o player esteja em sua visao. entao o certo seria tentar <action itemid="xxxx" script="pistol.lua" allowfaruse="1" range="6"/> Mais da mesma forma, ja criamos o script. eu vo pra escola agora, qnd chegar eu coloco pra errar o tiro! e o tp la, e o if not isCreature(cid) pra quem ta confuso e quer ajudar!
  8. function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local alcance = 6 -- Alcance do tiro if isCreature(itemEx.uid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > alcance then doPlayerSendCancel(cid, "Longe demais!") return TRUE end end if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if not isCreature(itemEx.uid) then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if not isCreature(itemEx.uid) then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end
  9. function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local alcance = 6 -- Alcance do tiro if isCreature(itemEx.uid) then if getDistance(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > alcance then doPlayerSendCancel(cid, "Longe demais!") return TRUE end end if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if not isCreature(itemEx.uid) then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if not isCreature(itemEx.uid) then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end fiz oq vc pediu pra mim fazer '-' Keilost, ACHO que achei o erro do seu vc colocou getPlayerPosition mais o certo seria getCreaturePosition so tenta isso. nao questione '-' ficaria algo assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local distance_target = 3 if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid))) > distance_target then return doPlayerSendCancel(cid, "Você está longe do alvo.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if not isCreature(itemEx.uid) then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if not isCreature(itemEx.uid) then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end
  10. function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local alcance = 6 -- Alcance do tiro if getDistance(fromPosition, toPosition) > alcance then doPlayerSendCancel(cid, "Longe demais, atire mais perto!") return TRUE end if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if not isCreature(itemEx.uid) then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if not isCreature(itemEx.uid) then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end
  11. nao sei se vai funfar usei a funcao getDistance(pos1, pos2) function onUse(cid, item, fromPosition, itemEx, toPosition) local need_target = true -- Precisa de target? (true / false) Se false, o sistema utilizará o Use With. local bullet_id = 2160 -- ID da munição local shots_amount = 1 -- Tiros por vez local exhaustion_time = 1 -- Segundos de exhaustion local exhaust = 19301 -- Storage da exhaustion local dmg_min, dmg_max = -100, -200 -- Dano mínimo, dano máximo local shot_effect = 10 -- Efeito do tiro local shot_distance_effect = 1 -- Distance effect do tiro local damage_type = COMBAT_PHYSICALDAMAGE -- Tipo de dano local shots_delay = 200 -- Delay dos tiros (em milissegundos) local alcance = 6 -- Alcance do tiro if need_target then if getCreatureTarget(cid) <= 0 then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") elseif getDistance(fromPosition, toPosition) > alcance then return doPlayerSendCancel(cid, "O Alvo esta muito longe!") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if getCreatureTarget(cid) <= 0 then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(getCreatureTarget(cid)), shot_distance_effect) doTargetCombatHealth(cid, getCreatureTarget(cid), damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end else if not isCreature(itemEx.uid) then return doPlayerSendCancel(cid, "Selecione um alvo primeiro.") elseif getPlayerItemCount(cid, bullet_id) < shots_amount then return doPlayerSendCancel(cid, "Você não possui munição.") elseif exhaustion.check(cid, exhaust) then return doPlayerSendCancel(cid, "Aguarde "..(exhaustion.get(cid, exhaust)).." segundos para usar a arma novamente.") end exhaustion.set(cid, exhaust, exhaustion_time) for i = 0, shots_amount-1 do addEvent(function() if not isCreature(itemEx.uid) then return true elseif getPlayerItemCount(cid, bullet_id) < 1 then return doPlayerSendCancel(cid, "Você não possui munição.") end doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(itemEx.uid), shot_distance_effect) doTargetCombatHealth(cid, itemEx.uid, damage_type, dmg_min, dmg_max, shot_effect) doPlayerRemoveItem(cid, bullet_id, 1) end, shots_delay*i) end end return true end
  12. function onCastSpell(cid, var) local config = { [1] = {level = 20, newvoc = 2, outfit = 37, eff = 56}, [2] = {level = 100, newvoc = 3, outfit = 18, eff = 57}, [3] = {level = 150, newvoc = 4, outfit = 71, eff = 58}, [4] = {level = 200, newvoc = 5, outfit = 70, eff = 59}, } trans = config[getPlayerVocation(cid)] if not trans then doPlayerSendCancel(cid, "You can not transform.") return false elseif getPlayerLevel(cid) >= trans.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.") end doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1) doPlayerSetVocation(cid, trans.newvoc) doSendMagicEffect(getCreaturePosition(cid), trans.eff) doPlayerSendCancel(cid, "You Transformed!") doPlayerSave(cid) -- FUNCAO DE SALVAR 1 db.executeQuery("UPDATE `players` SET `vocation` = ".. trans.newvoc .." WHERE `id` = " .. getPlayerGUID(cid) .. ";") -- FUNCAO DE SALVAR 2 return true end
  13. to viajando vo voltar domingo da minha viagem, mais olha nao mexo com wodbo ( alem de eu ser fã pra carai ) mais axo que seria isto: function onCastSpell(cid, var) local config = { [1] = {level = 20, newvoc = 2, outfit = 37, eff = 56}, [2] = {level = 100, newvoc = 3, outfit = 18, eff = 57}, [3] = {level = 150, newvoc = 4, outfit = 71, eff = 58}, [4] = {level = 200, newvoc = 5, outfit = 70, eff = 59}, } trans = config[getPlayerVocation(cid)] if not trans then doPlayerSendCancel(cid, "You can not transform.") return false elseif getPlayerLevel(cid) >= trans.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.") end doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1) doPlayerSetVocation(cid, trans.newvoc) doSendMagicEffect(getCreaturePosition(cid), trans.eff) doPlayerSendCancel(cid, "You Transformed!") doPlayerSave(cid) -- FUNCAO DE SALVAR 1 db.query("UPDATE `players` SET `vocation` = ".. trans.newvoc .." WHERE `id` = " .. getPlayerGUID(cid)) -- FUNCAO DE SALVAR 2 return true end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...