Ir para conteúdo
  • Cadastre-se

Garoto Prodigio

Membro
  • Total de itens

    34
  • Registro em

  • Última visita

  • Dias Ganhos

    2

Posts postados por Garoto Prodigio

  1. Gostaria que me ajudassem em um Script pra um mob

     

    Por exemplo:

    JOGADOR X  Atacou um Lobo (Precisa ser um dano, não apenas targetado)

    O Lobo mudará sua outfit pra um Lobisomen 

    Quando o Jogador X Parar de dar dano no Lobisomen Ele voltará a outfit de Lobo.

    Lembrando que ele não se tornará outro Mob, apenas sua outfit será modificada.

     

    Não é nada complicado na teoria, mas eu já tentei e Decidi pedir ajuda, também não encontrei nada Relacionado no Fórum.

  2. Gostaria de saber se alguém pode me ajudar, QUALQUER VERSÃO do RME Editor que eu tente abrir o mapa, editar, etc

    Fica assim a tela:image.thumb.png.aee7f66b7df77b35ce23d15df42e7b47.png

    Já tentei baixar outros RME, abrir outros mapas, mudar a versão .otb dos mesmos e nada.

    Não sei se falta algum c++ ou framework, mas eu ja baixei VARIOS e até atualizei com o Driver Booster e nada, se alguém puder me ajudar eu agradeço.

     

     

  3. 12 horas atrás, Zazeros disse:

    @Garoto Prodigio Cara, eu não sei se entendi muito bem. O player fala !missao e ai ele vai ganhar uma quest pra fazer ou vai mostrar todas as quests que estão em aberto?

    Se for a segunda opção, porque não usa o quests.xml? Ai o player clica no client mesmo e vê quais estão em aberto, já que quando termina lá, a quest fica em verde (Útil tbm para mostrar quais quests o player já completou).

    Ja tentei quests.xml não aparece de jeito nenhum. mas ja resolvi.

  4. Quando eu mato a mensagem não aparece, aparece apenas a mesma se eu colocar

     


     

    function onKill(cid, target, lastHit)
        local tab = {
            ["shaball"] = {msg = "very good!", storage = 78001, item = 15160},
            ["kraken"] = {msg = "you recived your honor", storage = 78002, item = 15859}
        }
        if isPlayer(cid) and isMonster(target) then
            local var = tab[getCreatureName(target):lower()]
            if var then
                doPlayerPopupFYI(cid, "Mensagem aparece a mesma pra todos")
                print(var.msg, var.storage, var.item) -- aqui vc faz oq quiser
    
            end
        end
        return true
    end

     

    Eu tentei também

    doPlayerPopupFYI(cid, msg) mas da erro "trying to send an empty or to huge message

     

    Outra dúvida seria se tivesse como dar o item apenas uma vez, um check da storage por exemplo, eu tentei mas sou péssimo com script ;s

  5. Olá pessoal do TK, estive pensando em um Script que funcionaria da Seguinte Forma:

     

    Ao matar x Monstro, você recebe uma Storage, um Certo item e aparece uma mensagem, esse Script seria uma tabela, por exemplo:

     

    local monstros = {
    [MOB1] = MSG = STORAGE = ITEM
    [MOB2] = MSG = STORAGE = ITEM
    [MOB3] = = MSG = STORAGE = ITEM
    }

     

    Bom, é basicamente isso, não sei se é complicado de Fazer, mas caso esteja pode ser um script pra um mob só que eu adapto, espero que alguém me ajude :)

     

    TFS 8.60

     

     

     

     

     

  6. Tente desta forma

    local scom1 = createCombatObject()
    
    local scom2 = createCombatObject()
    
    local scom3 = createCombatObject()
    
    local scom4 = createCombatObject()
    
    
    
    local combat1 = createCombatObject()
    setCombatParam(combat1, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
    setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat1, COMBAT_PARAM_EFFECT, 850)
     
    function kiaiho(cid, level, maglevel) 
       local min = -(level * 1.0 +  maglevel * 1 + 0)
       local max = -(level * 1.0 + maglevel * 1 + 0)
       return min, max 
    end
    setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho")
    
    
    local combat2 = createCombatObject()
    setCombatParam(combat2, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
    setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat2, COMBAT_PARAM_EFFECT, 850)
     
    function kiaiho(cid, level, maglevel) 
       local min = -(level * 1.0 +  maglevel * 1 + 0)
       local max = -(level * 1.0 + maglevel * 1 + 0)
       return min, max 
    end
    setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho")
    
    
    local combat3 = createCombatObject()
    setCombatParam(combat3, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
    setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat3, COMBAT_PARAM_EFFECT, 850)
     
    function kiaiho(cid, level, maglevel) 
       local min = -(level * 1.0 +  maglevel * 1 + 0)
       local max = -(level * 1.0 + maglevel * 1 + 0)
       return min, max 
    end
    setCombatCallback(combat3, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho")
    
    
    local combat4 = createCombatObject()
    setCombatParam(combat4, COMBAT_PARAM_HITCOLOR, COLOR_LIGHTGREEN)
    setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat4, COMBAT_PARAM_EFFECT, 850)
     
    function kiaiho(cid, level, maglevel) 
       local min = -(level * 1.0 +  maglevel * 1 + 0)
       local max = -(level * 1.0 + maglevel * 1 + 0)
       return min, max 
    end
    setCombatCallback(combat4, CALLBACK_PARAM_LEVELMAGICVALUE, "kiaiho")
    
    
    arr1 = {
    
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
    {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
    {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    
    }
    
    
    arr2 = {
    
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    
    }
    
    
    arr3 = {
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    
    }
    
    
    arr4 = {
    
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    
    }
    
    
    
    local area1 = createCombatArea(arr1)
    
    local area2 = createCombatArea(arr2)
    
    local area3 = createCombatArea(arr2)
    
    local area4 = createCombatArea(arr2)
    
    setCombatArea(scom1, area1)
    
    setCombatArea(scom2, area2)
    
    setCombatArea(scom3, area3)
    
    setCombatArea(scom4, area4)
    
    
    
    function onTargetTile(cid, pos)
    
    local p = getThingPos(cid)
    
    local basep = {x = p.x + 5, y = p.y - 5, z = p.z}
    
    doSendDistanceShoot(basep, pos, 55)
    
    doCombat(cid,combat1,positionToVariant(pos))
    
    end
    
    
    function onTargetTile2(cid, pos)
    
    local p1 = getThingPos(cid)
    
    local basep1 = {x = p1.x - 5, y = p1.y + 5, z = p1.z}
    
    doSendDistanceShoot(basep1, pos, 55)
    
    doCombat(cid,combat2,positionToVariant(pos))
    
    end
    
    
    function onTargetTile3(cid, pos)
    
    local p2 = getThingPos(cid)
    
    local basep2 = {x = p2.x - 5, y = p2.y + 5, z = p2.z}
    
    local baseep2 = {x = p2.x + 5, y = p2.y - 5, z = p2.z}
    
    doSendDistanceShoot(basep2, pos, 112)
    
    doSendDistanceShoot(baseep2, pos, 112)
    
    doCombat(cid,combat3,positionToVariant(pos))
    
    end
    
    
    function onTargetTile4(cid, pos)
    
    local p3 = getThingPos(cid)
    
    local basep3 = {x = p3.x - 5, y = p3.y - 5, z = p3.z}
    
    local baseep3 = {x = p3.x + 5, y = p3.y + 5, z = p3.z}
    
    doSendDistanceShoot(basep3, pos, 112)
    
    doSendDistanceShoot(baseep3, pos, 112)
    
    doCombat(cid,combat4,positionToVariant(pos))
    
    end
    
    
    setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
    
    setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")
    
    setCombatCallback(scom3, CALLBACK_PARAM_TARGETTILE, "onTargetTile3")
    
    setCombatCallback(scom4, CALLBACK_PARAM_TARGETTILE, "onTargetTile4")
    
    
    local function onCastSpell1(parameters)
    
    doCombat(parameters.cid, scom1, parameters.var)
    
    end
    
    
    local function onCastSpell2(parameters)
    
    doCombat(parameters.cid, scom2, parameters.var)
    
    end
    
    
    local function onCastSpell3(parameters)
    
    doCombat(parameters.cid, scom3, parameters.var)
    
    end
    
    
    local function onCastSpell4(parameters)
    
    doCombat(parameters.cid, scom4, parameters.var)
    
    end
    
    
    
    
    function onCastSpell(cid, var)
    
    local waittime = 1,0 -- Tempo de exhaustion em segundos
    local storage = 26002
    
    if exhaustion.check(cid, storage) then
    doPlayerSendCancel(cid, "Aguarde" .. exhaustion.get(cid, storage) .. " Segundos Para Usar Novamente.")
    return false
    end
    
    
    local parameters = { cid = cid, var = var}
    
    addEvent(onCastSpell1, 100, parameters)
    
    addEvent(onCastSpell2, 100, parameters)
    
    addEvent(onCastSpell3, 1200, parameters)
    
    addEvent(onCastSpell4, 1200, parameters)
    
    exhaustion.set(cid, storage, waittime)
    
    
    return TRUE
    
    
    end

     

  7. Olá pessoal, eu estou a procura de uma talkaction, onde funcionará por Storages, por exemplo:

     

    !missao

    Ao usar esse comando, mostrará por exemplo:

    *Você precisa levar 30 pedaços de Carne para o Barqueiro Jhonson.*

     

    Esse Script funcionaria com Storages, por exemplo:

    Storage 666 (Valor positivo ou seja 1)

    Ao jogador completar a Missão desse Barqueiro, esse valor 666, é Setado pra 0, fazendo com que não apareça a mesma mensagem de missão, e sim a proxíma.

    Exemplo:

    Levei duas moedas pro açogueiro, após finalizar a missão, eu ganhei a Storage 666, valor 1 (positivo), então quando eu usar !missao, aparecerá uma nova mensagem de missão ao usar o Comando.

    Seria algo como:

    Local storages={

    666,1, - Mensagem "BLA BLA BLA"

    777,1, - Mensagem "Ui ui ui"

    }

     

    É como uma tabela que puxa a Storage, se for positiva, ou seja 1 o comando envia a Mensagem, eu mesmo colocaria nos NPCS/SCRIPTS pra setar a storage pra 0 no caso, pra que a mensagem se modifique conforme ele termina as missões.

     

    Não sei se é muito complicado de fazer, mas eu tentei e só tive fracasso, já até apaguei o script, por isso vim aqui pedir a ajuda do pessoal do TK, acredito que vocês possam me ajudar.

    Quanto ao estilo da mensagem, pode ser PopupFy mesmo.

    Espero que ajudem :) 

     

    DISTRO: OTX 8.60 Adaptada com TFS. 
     

     

     

     

  8. Então galera eu tava pensando em um Evento PVP que iria funcionar da seguinte maneira:

    Em X dia ás X Horas, os jogadores podem se inscrever para o Evento PVP Random! 

    Falando com o NPC, Em 5 Minutos irá começar, assim que começar os Jogares que se inscreveram irão ser teleportados pra sala com o seu adversário RANDOM ( Sorteado ) e o perdedor é enviado pro dp, quem Vencer irá  ser teleportado pra outra area onde os outros vencedores são levados quando matam o adversário, terá apenas 1 Vencedor, esse vencedor ganhará X itens configuráveis

     

  9. Galera estou com um problema, minhas samples da database, após eu configurar uma nova database simplesmente quando os personagens deslogam eles perdem os skills, creio que seja algum bug das samples!

     

    Otx 8.60

     

  10. 15 horas atrás, ZeeroBR disse:

    Não sei se é padrão do game ou coisa do tipo, mas os summons que eu spawno conseguem me atacar com spells em área, alguém sabe a solução? tentei utilizar um script mas não tive êxito. Utilizo tfs 0.4 rev 3884 8.60

    Provavelmente é em Creaturescripts, há uns dias atrás eu também resolvi este problema, veja se resolve pra você.

     

     

    Em creaturescripts.lua adicione estas duas linhas:

    <event type="combat" name="SummonAntKillPlayer" event="script" value="summonantkillplayer.lua"/>
    
    <event type="combat" name="PlayerAntKillSummon" event="script" value="playerantkillsummon.lua"/>

     

    summonantkillplayer.lua      (Impede que o summon ataque o player, mesmo com ataques em area)

    function onCombat(cid, target)
    if isInArray(getCreatureSummons(target), cid) then
    return false
    end
    return true
    end

     

    playerantkillsummon.lua         (impede que o player ataque seu summon, mesmo ataques em area)

    function onCombat(cid, target)
    if cid == getCreatureMaster(target) then
    doPlayerSendCancel(cid, "Voce nao pode matar seu summon.")
    return false
    end
    return true
    end

     

    Por fim, em data/creaturescripts/scripts/login.lua     ----> Se você não colocar, não funcionará!

    Adicione:

    registerCreatureEvent(cid, "PlayerAntKillSummon")
    registerCreatureEvent(cid, "SummonAntKillPlayer")

     

     

     

     

    image.png

  11. 4 minutos atrás, 139 disse:

     

    
    function onUse(cid, item, fromPosition, itemEx, toPosition)
    	local demons = {"Demon1", "Demon2", "Demon3"}
        if #getCreatureSummons(cid) > 0 then
            for _, mid in pairs(getCreatureSummons(cid)) do
                if isInArray(demons, getCreatureName(mid)) then
                    doCreatureChangeOutfit(mid, {lookType = 30, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})
                    return true
                end
            end
            doPlayerSendCancel(cid, "You dont have a demon summoned.")
        else
            doPlayerSendCancel(cid, "You have no summons.")
        end
        return true
    end


     

    Rep++ Parabéns mano! Obrigado pela ajuda :D

  12. 31 minutos atrás, 139 disse:
    
    <action itemid="xxxx" event="script" value="xxx.lua"/>

     

    
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if #getCreatureSummons(cid) > 0 then
            for _, mid in pairs(getCreatureSummons(cid)) do
                if getCreatureName(mid) == "Demon" then
                    doCreatureChangeOutfit(mid, {lookType = 30, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})
                    return true
                end
            end
            doPlayerSendCancel(cid, "You dont have a demon summoned.")
        else
            doPlayerSendCancel(cid, "You have no summons.")
        end
        return true
    end

     

    Fucionou Perfeitamente!!!

    Só tenho uma dúvida antes de marcar como Solução, por exemplo: No meu jogo eu tenho 3 Tipos de Demon, Demon King e Demon Ice, teria como permitir pelo script pra Demon, Demon King, etc poderem usar? REP+

  13. Galera tava precisando de um Script (Não sei se é simples), enfim vamos lá.

     

    Por exemplo: Eu summono um Demon(pra me ajudar), e eu quero mudar a Skin (roupa) dele, então eu clico em 1 item (Perola azul), e meu Demon fica com a cor Azul (mudaria a outfit id do meu summon, apenas se for o DEMON).

     

    Seria algo tipo actions mesmo, "OnUse", "DoSet Summon Outfit" etc etc 

    Eu tentei montar esses dias mas sem sucesso.

    Outro exemplo:

    No caso Se eu tivesse um Wolf summonado e clicasse nessa perola azul, falaria "você não tem um Demon summonado para usar este item)

    Não precisa remover o item! pode ser um ID fictício no script ou "ITEMID" que eu configuro, caso tenha alguma dúvida só me falar, se puderem me ajudar Rep+!

     

    OTX/OTFS (8.60)

     

     

  14. Eu atualize meu TFS 8.60 pra OTX 8.60 (Scripts Adaptados versão 2.15)

     

    Da erro quando tento abrir portas comuns, ja testei varios doors.lua e sempre o mesmo erro

    To achando que é função na pasta lib

    image.thumb.png.73bbeb4c6705993fca84760e94417250.png

     

    Se alguém puder me ajudar rep+ Kkk

     

    Doors.lua (na verdade acho que não tem muito haver o script, talvez seja função)

    local function checkStackpos(item, position)
    	position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
    	local thing = getThingFromPos(position)
    
    	position.stackpos = STACKPOS_TOP_FIELD
    	local field = getThingFromPos(position)
    
    	return (item.uid == thing.uid or thing.itemid < 100 or field.itemid == 0)
    end
    
    local function doorEnter(cid, item, toPosition)
    	doTeleportThing(cid, toPosition)
    end
    
    function onUse(cid, item, fromPosition, itemEx, toPosition)
    	if(fromPosition.x ~= CONTAINER_POSITION and isPlayerPzLocked(cid) and getTileInfo(fromPosition).protection) then
    		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
    		return true
    	end
    
    	if(getItemLevelDoor(item.itemid) > 0) then
    		if(item.actionid == 189) then
    			if(not isPremium(cid)) then
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    				return true
    			end
    
    			doorEnter(cid, item, toPosition)
    			return true
    		end
    
    		local gender = item.actionid - 186
    		if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
    			if(gender ~= getPlayerSex(cid)) then
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    				return true
    			end
    
    			doorEnter(cid, item, toPosition)
    			return true
    		end
    
    		local skull = item.actionid - 180
    		if(skull >= SKULL_NONE and skull <= SKULL_BLACK) then
    			if(skull ~= getCreatureSkullType(cid)) then
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    				return true
    			end
    
    			doorEnter(cid, item, toPosition)
    			return true
    		end
    
    		local group = item.actionid - 150
    		if(group >= 0 and group < 30) then
    			if(group > getPlayerGroupId(cid)) then
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    				return true
    			end
    
    			doorEnter(cid, item, toPosition)
    			return true
    		end
    
    		local vocation = item.actionid - 100
    		if(vocation >= 0 and vocation < 50) then
    			local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
    			if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
    				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    				return true
    			end
    
    			doorEnter(cid, item, toPosition)
    			return true
    		end
    
    		if(item.actionid == 190 or (item.actionid ~= 0 and getPlayerLevel(cid) >= (item.actionid - getItemLevelDoor(item.itemid)))) then
    			doorEnter(cid, item, toPosition)
    		else
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may pass.")
    		end
    
    		return true
    	end
    
    	if(isInArray(specialDoors, item.itemid)) then
    		if(item.actionid == 100 or (item.actionid ~= 0 and getPlayerStorageValue(cid, item.actionid) > 0)) then
    			doorEnter(cid, item, toPosition)
    		else
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
    		end
    
    		return true
    	end
    
    	if(isInArray(keys, item.itemid)) then
    		if(itemEx.actionid > 0) then
    			if(item.actionid == itemEx.actionid and doors[itemEx.itemid] ~= nil) then
    				doTransformItem(itemEx.uid, doors[itemEx.itemid])
    				return true
    			end
    
    			doPlayerSendCancel(cid, "The key does not match.")
    			return true
    		end
    
    		return false
    	end
    
    	if(isInArray(horizontalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
    		local newPosition = toPosition
    		newPosition.y = newPosition.y + 1
    		local doorPosition = fromPosition
    		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
    		local doorCreature = getThingfromPos(doorPosition)
    		if(doorCreature.itemid ~= 0) then
    			local pzDoorPosition = getTileInfo(doorPosition).protection
    			local pzNewPosition = getTileInfo(newPosition).protection
    			if((pzDoorPosition and not pzNewPosition and doorCreature.uid ~= cid) or
    				(not pzDoorPosition and pzNewPosition and doorCreature.uid == cid and isPlayerPzLocked(cid))) then
    				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
    			else
    				doTeleportThing(doorCreature.uid, newPosition)
    				if(not isInArray(closingDoors, item.itemid)) then
    					doTransformItem(item.uid, item.itemid - 1)
    				end
    			end
    
    			return true
    		end
    
    		doTransformItem(item.uid, item.itemid - 1)
    		return true
    	end
    
    	if(isInArray(verticalOpenDoors, item.itemid) and checkStackpos(item, fromPosition)) then
    		local newPosition = toPosition
    		newPosition.x = newPosition.x + 1
    		local doorPosition = fromPosition
    		doorPosition.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
    		local doorCreature = getThingfromPos(doorPosition)
    		if(doorCreature.itemid ~= 0) then
    			if(getTileInfo(doorPosition).protection and not getTileInfo(newPosition).protection and doorCreature.uid ~= cid) then
    				doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
    			else
    				doTeleportThing(doorCreature.uid, newPosition)
    				if(not isInArray(closingDoors, item.itemid)) then
    					doTransformItem(item.uid, item.itemid - 1)
    				end
    			end
    
    			return true
    		end
    
    		doTransformItem(item.uid, item.itemid - 1)
    		return true
    	end
    
    	if(doors[item.itemid] ~= nil and checkStackpos(item, fromPosition)) then
    		if(item.actionid == 0) then
    			doTransformItem(item.uid, doors[item.itemid])
    		else
    			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is locked.")
    		end
    
    		return true
    	end
    
    	return false
    end

     

  15. 4 horas atrás, Vodkart disse:

    ta mas se for um druid n pode sumonar os rotworm? vc só não quer que use 2 demon, não seria isso? ou realmente nenhum summon?

     

    testa ai:

     

    
    
    function onEquip(cid, item, slot)
    	local name = "Demon"
    	local ret = getCreatureSummons(cid) 
    	if #ret > 0 then
    		for _, pid in pairs(ret) do
    			if getCreatureName(pid) == name then
    				doSendMagicEffect(getPlayerPosition(cid), 12)
    				doPlayerSendCancel(cid, "Voce so pode invocar um "..name) 
    				return false
    			end
    		end
    	end
    	local pos = getPlayerPosition(cid)
    	local m = doConvinceCreature(cid, doCreateMonster(name, pos))
    	return true
    end

     

    No caso qualquer vocação pode usar.

    Eu testei seu script, quando eu puxo o item pro Slot, ele não aparece no Slot, ele continua na BAG/CHÃO, mas o mob é summonado normalmente, o problema é justamente que deveria equipar literalmente o item pra quando ele remover o Summon Sumir, poderia ser 1 script diferente, tipo de Action (OnUse) que checasse se ele tem o Item equipado no SLOT pra summonar o Monstro. 

     

    Eu consigo equipar o item em qualquer lugar, menos onde é o Slot que quero (Shield)

    image.png.e4bcef8ceb19afa2ba52dd9ec582d96c.png

    No caso quando eu equipo no SHIELD (Onde eu configurei no moveevents) Aparece o Summon, mas o item não é equipado :s

     

    TAG MOVEEVENTS:

    <movevent type="Equip" itemid="5924" slot="shield" event="script" value="testado2.lua"/>

  16.  

    Galera Eu queria um Script moveevent OnEquip (ao Equipar x Item) que Summona um "demon"   pra Te Ajudar! 

    Eu fiz o Script DeEquip, (ao Desequipar o Item) e ta Funcionando (Usei uma spell summon pra testar se remove os summons ao DESEQUIPAR, está 100% e com certeza irá funcionar se me ajudarem com o script Ao Equipar Summonar o Mob)

     

    Bom, basicamente Este Item, você equipa e summona um Demon, porém precisa CHECAR se eu tenho um SUMMON Antes de Invocar ao Equipar por exemplo:

    Eu uso uma spell "Summon wolf (Summono um wolf)", e o Player vai lá achando que se  Equipar o Item pra summonar o Demon vai ficar com 2 (Mas não pode), quero que o script Impeça que Invoque Outro!

     

    Seria um script tipo assim:

    function onEquip(cid, item, slot)
    
    local summon = getCreatureSummons(cid)
    local maxSum = 1
    
        if (table.maxn(summon) < maxSum) then
           local playerpos = getPlayerPosition(cid)
           local monster = doConvinceCreature(cid, doCreateMonster("Demon]", position))
           return false
        else
        
           doSendMagicEffect(pos, 12)
           doPlayerSendCancel(cid, "Voce so pode invocar um demon")
    
        end

    (Este Script acima não funciona)

     

    Testei e tentei adaptar alguns scripts aqui do TK, mas sem sucesso!

     

    Agradeço se alguém puder me Ajudar Rep+

    Versão 8.60 pode ser OTX/TFS.

  17. Em 15/02/2021 em 00:58, 139 disse:


    Adicionei o range,
     

      Mostrar conteúdo oculto

     

    local config = {
    health = 3000,
    mana = 1000
    }

    local range = 20

    local function getDistanceBetween(fromPosition, toPosition)
      local x, y = math.abs(fromPosition.x - toPosition.x), math.abs(fromPosition.y - toPosition.y)
      local diff = math.max(x, y)
      if(fromPosition.z ~= toPosition.z) then
        diff = diff + 9 + 6
      end

      return diff
    end

    function onCastSpell(cid, var)

    if getCreatureMaster(cid) then
    local master = getCreatureMaster(cid)
    local c_pos = getCreaturePosition(cid)
    local m_pos = getCreaturePosition(master)
    local p_pos = {}

        if isInParty(master) then
            local members = getPartyMembers(getPlayerParty(master))
            local health = math.ceil( config.health / #members )
            local mana = math.ceil( config.mana / #members )
            for i = 1, #members do
                p_pos = getCreaturePosition(members[i])
                if getDistanceBetween(c_pos, p_pos) < range or getDistanceBetween(m_pos, p_pos) < range then
                    doCreatureAddHealth(members[i], health)
                    doCreatureAddMana(members[i], mana)
                    doSendAnimatedText(p_pos, "+"..health, 18)    
                    doSendMagicEffect(p_pos, 5) 
                end            
            end
        else
            doCreatureAddHealth(master, config.health)
            doCreatureAddMana(master, config.mana)
            doSendAnimatedText(getCreaturePosition(master), "+"..config.health, 18)        
            doSendMagicEffect(getCreaturePosition(master), 5)    
        end

        end

    return true
    end

     

     

    Reputado 2x! Funcionando Perfeitamente! Obrigado! :D

  18. Agora, Cat disse:

    ÁGUA TRANSPARENTE NO TIBIA

     

    Amostra/teste:

    TRANSPARENCIA.gif

     

    Download Tibia.otfi -> Arquivo necessário para ativar transparência no seu client.

    Tibia.otfi 111 B · 0 downloads

     

    Download Object Builder -> Programa usado para add sprites

    https://github.com/ottools/ObjectBuilder/releases/tag/v0.4.8

     

    Download Item Editor -> Usado para cadastrar as propriedades de itens novos e abrir no map editor.

    https://github.com/ottools/ItemEditor/releases/tag/v0.5.1

     

    Download Sprites

    Contém:

    - Sprites de piso d'água full ground + 1 estilo borda (recomendo usar todos como borda, tirar full ground)

    - Sprites borda água-barranco.

    - Sprites borda água-areia.

    - Sprites borda areia-barranco-água.

    - Sprites borda água solo.

    - Sprites cachoeira + quedas d'água versão leste/norte

    - Sprites água transparente versão córrego (12x)

    sprites transparentes.rar 3 MB · 0 downloads

     

     

    (Senha para abrir o arquivo: tibiaking)

     

    Top d+, Precisa de Transperency? Funciona em 8.60?

  19. .Galera essa é uma Spell de Summon que heala o Invocador e quem esta na party, porém, mesmo que os Membros da party estejam a 20,50,80,150,200,500SQM de Distância Heala os membros da party mesmo assim.

    Eu queria colocar um limite de SQM (tipo um IsRange), pra que não de Healing em que estiver Longe do summon/invocador.

     

    Segue o Script:

     

    local config = {
    health = 3000,
    mana = 1000
    }


    function onCastSpell(cid, var)

    if getCreatureMaster(cid) then
    local master = getCreatureMaster(cid)
        if isInParty(master) then
            local members = getPartyMembers(getPlayerParty(master))
            local health = math.ceil( config.health / #members )
            local mana = math.ceil( config.mana / #members )
            for i = 1, #members do
            doCreatureAddHealth(members[i], health)
            doCreatureAddMana(members[i], mana)
            doSendAnimatedText(getCreaturePosition(members[i]), "+"..health, 18)    
            doSendMagicEffect(getCreaturePosition(members[i]), 5)        
            end
        else
            doCreatureAddHealth(master, config.health)
            doCreatureAddMana(master, config.mana)
            doSendAnimatedText(getCreaturePosition(master), "+"..config.health, 18)        
            doSendMagicEffect(getCreaturePosition(master), 5)    
        end

        end

    return true
    end

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo