Jump to content

Search the Community

Showing results for tags 'exivar'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sou

Found 1 result

  1. Galera, estava sem fazer nada, quando lembrei da epoca tibiana onde se usava exiva pra encontrar o player, sendo assim o caçador era obrigado a rodar o mapa, dando a esse script a força-lo abrir o mapa...entao eu peguei um que dava exiva no npc e coloquei pra exivar pokemons...porem se conter mais de 1 pokemon com o mesmo nome ele só vai mostra a posicao de 1...é bem básico o script...vamos la. local config = { cost = 100 } function onSay(cid, words, param, channel) if(param == "" or param == nil) then return false end if doPlayerRemoveMoney(cid, config.cost) == FALSE then doPlayerSendCancel(cid, "You do not have enough money.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return true end local getMonster = getCreatureByName(param) if ehMonstro(getMonster) == TRUE then local playerPos, monsterPos = getCreaturePosition(cid), getCreaturePosition(getMonster) local px, py = 0, 0 local pS = "" local text = "" if(playerPos.x == monsterPos.x) and (playerPos.y < monsterPos.y) then px = 1 py = monsterPos.y - playerPos.y pS = "south" elseif(playerPos.x == monsterPos.x) and (playerPos.y > monsterPos.y) then px = 1 py = playerPos.y - monsterPos.y pS = "north" elseif(playerPos.x < monsterPos.x) and (playerPos.y == monsterPos.y) then px = monsterPos.x - playerPos.x py = 1 pS = "east" elseif(playerPos.x > monsterPos.x) and (playerPos.y == monsterPos.y) then px = playerPos.x - monsterPos.x py = 1 pS = "west" elseif(playerPos.x > monsterPos.x) and (playerPos.y > monsterPos.y) then px = playerPos.x - monsterPos.x py = playerPos.y - monsterPos.y pS = "north-west" elseif(playerPos.x > monsterPos.x) and (playerPos.y < monsterPos.y) then px = playerPos.x - monsterPos.x py = monsterPos.y - playerPos.y pS = "south-west" elseif(playerPos.x < monsterPos.x) and (playerPos.y < monsterPos.y) then px = monsterPos.x - playerPos.x py = monsterPos.y - playerPos.y pS = "south-east" elseif(playerPos.x < monsterPos.x) and (playerPos.y > monsterPos.y) then px = monsterPos.x - playerPos.x ps = playerPos.y - monsterPos.y pS = "north-east" end if(px <= 4 and py <= 4) then text = "" .. getCreatureName(getMonster) .. " is standing next you." elseif((px > 4 and px <= 100) and (py > 4 and py <= 100)) or ((px > 4 and px <= 100) and (py <= 4)) or ((px <= 4) and (py > 4 and py <= 100)) then text = "" .. getCreatureName(getMonster) .. " is to the " .. pS .. "." elseif((px > 100 and px <= 274) and (py > 100 and py <= 274)) or ((px > 100 and px <= 274) and (py <= 100)) or ((px <= 100) and (py > 100 and py <= 274)) then text = "" .. getCreatureName(getMonster) .. " is far to the " .. pS .. "." elseif((px > 274 and px <= 280) and (py > 274 and py <= 280)) or ((px > 274 and px <= 280) and (py < 274)) or ((px < 274) and (py > 274 and py <= 280)) then text = "" .. getCreatureName(getMonster) .. " is very far to the " .. pS .. "." elseif(px > 280 and py > 280) or (px > 280 and py < 280) or (px < 280 and py > 280) then text = "" .. getCreatureName(getMonster) .. " is to the " .. pS .. "." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) return false else doPlayerSendCancel(cid, "A monster with that name does not exist.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return true end end Testado na base do antigo pokeroxy. tag <talkaction words="!exiva;/exiva" access="0" event="script" value="exiva.lua"/> Obrigado e é isso.
×
×
  • Create New...