Ir para conteúdo

gabrielbuff

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Obrigado
    config = { [1000} = {storage = 15, valor = 10}, [1002} = {storage = 11, valor = 10}, } function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end -- verifica se é player (se tirar a linha da erro na distro) if config[item.actionid] then if getPlayerStorageValue(cid, config[item.actionid].storage) >= config[item.actionid].valor then -- verifica se a storage é maior que (valor) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) -- caso passe manda esse efeito else -- caso não passe doPlayerSendCancel(cid, "Você precisa concluir 5x as missoes diarias") -- recebe essa mensagem return true end return true end  
  2. Curtir
    gabrielbuff deu reputação a MatteusDeli em (Resolvido)[CREATURESCRIPT] Ajuda com script   
    @gabrielbuff Boa noite, tenta assim:
     
     
  3. Obrigado
    gabrielbuff recebeu reputação de MatteusDeli em (Resolvido)Erro sistema de points lib.lua   
    Deu certinho amigo,
  4. Curtir
    gabrielbuff deu reputação a MatteusDeli em (Resolvido)Erro sistema de points lib.lua   
    @gabrielbuff Bom dia, cheque se na tabela accounts tem uma coluna chamada c_points, se não tiver execute este comando na database:
    ALTER TABLE accounts ADD c_points INTEGER DEFAULT 0;  
  5. Gostei
    gabrielbuff deu reputação a Vodkart em (Resolvido)como proibir uso de potions em area pz   
    local MIN = 50 local MAX = 200 local EMPTY_POTION = 7636 local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if not isPlayer(itemEx.uid) then return true end if getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid, "Você não pode usar potions em Pz.") return true elseif hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return FALSE end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) end  
  6. Gostei
    gabrielbuff recebeu reputação de turnes em (Resolvido)[ACTION] erro   
    consegui arrumar o script, obrigado pela sua ajuda tuners, o script ficou assim para quem futuramente tiver interesse.
     
    local toPos = {x = 1375, y = 835, z = 7} --pos para onde o player será teleportado
    local createPos = {x = 1378, y = 837, z = 7} --pos aonde o teleporte será criado
    local tpID = 1387 --id do tp.
    local tempo = 30 -- segundos
    local function removeTP(pos, id, time)
    if time == 0 then
    local item = getTileItemById(pos, id).uid
    if item > 1 then
    doRemoveItem(item, 1)
    doSendAnimatedText(pos, "Closed!", 227)
    end
    else
    doSendAnimatedText(pos, time, 192)
    addEvent(removeTP, 1000, pos, id, time-1)
    end
    end
    function onUse(cid, item, frompos, item2, topos)
      local item = getTileItemById(createPos, tpID).uid
      if item > 1 then
          return doPlayerSendTextMessage(cid, 27, "o Teleporte ja está aberto!")
    end
    doCreateTeleport(tpID, toPos, createPos)
    removeTP(createPos, tpID, tempo)
    doPlayerSendTextMessage(cid, 27, "O teleporte foi aberto, ele fechará em 30 segundos!")
    doTransformItem(item2.uid, (item2.itemid == 1945 and 1946 or 1945))
    return true
    end
  7. Gostei
    gabrielbuff deu reputação a Vodkart em Creaturescript, Quando monstro morre..   
    local tpId = 1387 local tps = { ["Zugurosh"] = {pos = {x=1478, y=879, z=7}, toPos = {x=1491, y=874, z=7}, time = 30}, } function removeTp(tp) local t = getTileItemById(tp.pos, tpId).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(tp.pos, CONST_ME_POFF) end function CountTpTime(pos, delay) doSendAnimatedText(pos, delay, 145) if delay ~= 1 then addEvent(CountTpTime, 1000, pos, delay-1) end end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) CountTpTime(tp.pos, tp.time) doBroadcastMessage("O Zugurosh foi morto. O teleporte irá desaparecer em "..tp.time.." segundos.", 19) addEvent(removeTp, tp.time*1000, tp) end return TRUE end  
  8. Gostei
    gabrielbuff deu reputação a Wakon em (Resolvido)AJUDA POTIONS   
    Esta é uma mensagem automática, este tópico foi movido para a área correta.
      Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680

    Este tópico foi movido:
    De: Scripting OTServ > OTServ > Actions e TalkActions
    Para: Suporte OTServ > OTServ > Suporte de Scripts
    --------------------------------------------------------------------------------------------------------------------------------
    Tente usar assim:
    local MIN = 900 local MAX = 1100 local EMPTY_POTION = 7635 local vocations = {4, 8, 12} local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) == false then return false end if hasCondition(cid, CONDITION_EXHAUST_HEAL) == true then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(not isInArray(vocations, getPlayerVocation(cid))) or getPlayerLevel(itemEx.uid) < 130) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == false) then doCreatureSay(itemEx.uid, "Only knights of level 130 or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then return false end doAddCondition(cid, exhaust) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_RED) doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return true end  
  9. Gostei
    gabrielbuff deu reputação a vankk em (Resolvido)AJUDA POTIONS   
    Você está com problemas com a função isKnight, ela apenas checa o id de vocation 4,8. Tente atualizar, procure na lib do seu servidor, e atualize.
     
    #edit
    @Wakon
    Para que utilizar um isInArray sendo que ele poderia simplesmente colocar um ,12 na lib?

Informação Importante

Confirmação de Termo