Ir para conteúdo

maury123

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    maury123 deu reputação a lenardo88 em (Resolvido)Parede que se move   
    ta ai o video explicando o sistema
     
    Untitled.wmv
  2. Gostei
    maury123 deu reputação a MaTTch em (Resolvido)Parede que se move   
    Fiz de um modo diferente, tenta assim:
    local c = { closeDelay = 2000, -- tempo em que ira fechar (1000ms = 1s) busyArea = {from = {x=100, y=100, z=7}, to = {x=100, y=100, z=7}}, -- area que checa se há players (bote a area em volta da porta movivel) wallPlaces = { {wallId = 1000, from = {x=100, y=100, z=7}, to = {x=100, y=100, z=7}}, -- {id da parede, posicao original, posicao movida} {wallId = 1000, from = {x=100, y=100, z=7}, to = {x=100, y=100, z=7}} } } local isUsing = false local function backWalls() for x = c.busyArea.from.x, c.busyArea.to.x do for y = c.busyArea.from.y, c.busyArea.to.y do local tid = getTopCreature({x=x, y=y, z=c.busyArea.to.z}).uid if(tid ~= 0) then addEvent(backWalls, c.closeDelay) return false end end end for _, i in pairs(c.wallPlaces) do local thing = getTileItemById(i.to, i.wallId).uid if(thing ~= 0) then doRemoveItem(thing) doCreateItem(i.wallId, 1, i.from) end end isUsing = false end function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if(not isUsing) then for _, i in pairs(c.wallPlaces) do local thing = getTileItemById(i.from, i.wallId).uid if(thing ~= 0) then doRemoveItem(thing) doCreateItem(i.wallId, 1, i.to) end end isUsing = true addEvent(backWalls, c.closeDelay) end return true end  
  3. Gostei
    local config = { premios = {13980, 13945, 13952, 13973, 13966, 13959, 13987, 13994}, --- Coloque o id que sera sorteado money = {2145, "small diamond"}, -- ID do diamond count = 3, -- Quantidade dos diamonds } function onUse(cid, item, fromPosition, itemEx, toPosition) if not doPlayerRemoveItem(cid, config.money[1], config.count) then doPlayerSendCancel(cid, "Você precisa de ".. config.count .." ".. config.money[2] .." pra usar o sorteador de items.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end local roleta = math.random(1, #config.premios) if config.pr[roleta] then doPlayerAddItem(cid, config.pr[roleta], 1) doBroadcastMessage(string.format("[SORTEADOR DE ITEM]: %s usou o sorteador de items e ganhou 1 %s.", getCreatureName(cid), getItemNameById(config.pr[roleta])), 22) doSendMagicEffect(getThingPos(cid), 14) return true end return false end Pode usar o mesmo para todas suas roletas.
  4. Gostei
  5. Gostei
    Opa, perdão.
    local config = { premios = {13980, 13945, 13952, 13973, 13966, 13959, 13987, 13994}, --- Coloque o id que sera sorteado money = {2145, "small diamond"}, -- ID do diamond count = 3, -- Quantidade dos diamonds } function onUse(cid, item, fromPosition, itemEx, toPosition) if not doPlayerRemoveItem(cid, config.money[1], config.count) then doPlayerSendCancel(cid, "Você precisa de ".. config.count .." ".. config.money[2] .." pra usar o sorteador de items.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end local roleta = math.random(1, #config.premios) if config.premios[roleta] then doPlayerAddItem(cid, config.premios[roleta], 1) doBroadcastMessage(string.format("[SORTEADOR DE ITEM]: %s usou o sorteador de items e ganhou 1 %s.", getCreatureName(cid), getItemNameById(config.premios[roleta])), 22) doSendMagicEffect(getThingPos(cid), 14) return true end return false end

Informação Importante

Confirmação de Termo