Ir para conteúdo
  • 0

[URGENTE] - Item que solta confetes.


thokito

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

Substitiu ai

 

local effectt = 35 -- coloque o efeito que você que
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) -- 10 minutes
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 3)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)
setConditionParam(condition, CONDITION_PARAM_BUFF)
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if(not isSorcerer(cid) and not isDruid(cid)) then
            doCreatureSay(cid, "Only sorcerers and druids may drink this fluid.", TALKTYPE_ORANGE_1, cid)
            return true
        end
        doAddCondition(cid, condition)
        doSendMagicEffect(fromPosition, CONST_ME_MAGIC_RED)
        doRemoveItem(item.uid)
        doCreatureSay(cid, "You feel smarter.", TALKTYPE_ORANGE_1, cid)
        effect(cid, effectt)
        for a = 1, (10 * 60) do
            addEvent(effect, a * 1000, cid, effectt)
        end
return true
end
 
function effect(cid, effect)
    if not isCreature(cid) then
        return true
    end
    doSendMagicEffect(getThingPos(cid), effect)
    return true
end
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...