Ir para conteúdo

ikaroangelo21

Membro
  • Registro em

  • Última visita

  1. Joaogabriel reagiu a uma resposta no tópico: (Resolvido)Erro stamina system
  2. Pifafa reagiu a uma resposta no tópico: (Resolvido)Erro de Exasuted?!
  3. Funções: doCreatureSetStorage setPlayerStorageValue
  4. exhaustion = { check = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end return getPlayerStorageValue(cid, storage) >= os.time() end, get = function (cid, storage) if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then return false end local exhaust = getPlayerStorageValue(cid, storage) if(exhaust > 0) then local left = exhaust - os.time() if(left >= 0) then return left end end return false end, set = function (cid, storage, time) setPlayerStorageValue(cid, storage, os.time() + time) end, make = function (cid, storage, time) local exhaust = exhaustion.get(cid, storage) if(not exhaust) then exhaustion.set(cid, storage, time) return true end return false end }
  5. poko360 reagiu a uma resposta no tópico: [Action] script de exp potion
  6. Tenta assim: function onSay(cid, words, param) if(not checkExhausted(cid, 666, 20)) then return true end if (getPlayerBlessing(cid,1)) then return doPlayerSendTextMessage(cid,25,"Você já possui bless.") end local position = getCreaturePosition(cid) if getPlayerLevel(cid) <= 79 then if getPlayerMoney(cid) >= 50000 then if doPlayerRemoveMoney(cid, 50000) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.") doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1) doSendMagicEffect(position, 49) else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") end else doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 50k!") end elseif getPlayerLevel(cid) >= 80 and getPlayerLevel(cid) <= 99 then if getPlayerMoney(cid) >= 65000 then if doPlayerRemoveMoney(cid, 65000) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.") doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1) doSendMagicEffect(position, 49) else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") end else doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 65k!") end elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 129 then if getPlayerMoney(cid) >= 80000 then if doPlayerRemoveMoney(cid, 80000) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.") doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1) doSendMagicEffect(position, 49) else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") end else doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 80k!") end elseif getPlayerLevel(cid) >= 130 and getPlayerLevel(cid) <= 199 then if getPlayerMoney(cid) >= 100000 then if doPlayerRemoveMoney(cid, 100000) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.") doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1) doSendMagicEffect(position, 49) else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") end else doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 100k!") end elseif getPlayerLevel(cid) >= 200 then if getPlayerMoney(cid) >= 150000 then if doPlayerRemoveMoney(cid, 150000) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.") doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1) doSendMagicEffect(position, 49) else doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.") end else doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 150k!") end end return true end
  7. Usa esse MOD, melhor. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Exp Potion" version="1.0" author="Vodkart" contact="DISCORD: vodkart#6090" enabled="yes"> <config name="exppotion"><![CDATA[ exp_info = {rate = 0.2, storage = {354870,354871,354872}, minutes = 30} -- rate 0.2 = 20% function convertTime(a) if(type(tonumber(a)) == "number" and a > 0) then if (a <= 3599) then local minute = math.floor(a/60) local second = a - (60 * minute) if(second == 0) then return ((minute)..((minute > 1) and " minutos" or " minuto")) else return ((minute ~= 0) and ((minute>1) and minute.." minutos e " or minute.." minuto e ").. ((second>1) and second.." segundos" or second.." segundo") or ((second>1) and second.." segundos" or second.. " segundo")) end else local hour = math.floor(a/3600) local minute = math.floor((a - (hour * 3600))/60) local second = (a - (3600 * hour) - (minute * 60)) if (minute == 0 and second > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(second..((second > 1) and " segundos" or " segundo")) elseif (second == 0 and minute > 0) then return (hour..((hour > 1) and " horas e " or " hora e "))..(minute..((minute > 1) and " minutos" or " minuto")) elseif (second == 0 and minute == 0) then return (hour..((hour > 1) and " horas" or " hora")) end return (hour..((hour > 1) and " horas, " or " hora, "))..(minute..((minute > 1) and " minutos e " or " minuto e "))..(second..((second > 1) and " segundos" or " segundo")) end end end ]]></config> <event type="login" name="ExpPotionLogin" event="script"><![CDATA[ domodlib('exppotion') function onLogin(cid) if getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() > 0 then registerCreatureEvent(cid, "ExpPotionThink") local rates = getPlayerRates(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você ainda tem "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time()).." de Exp Potion.") doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+exp_info.rate) setPlayerStorageValue(cid, exp_info.storage[3], 1) -- registro end return true end]]></event> <event type="think" name="ExpPotionThink" event="script"><![CDATA[ domodlib('exppotion') function onThink(cid, interval) if getPlayerStorageValue(cid, exp_info.storage[3]) > 0 and getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua Exp Potion acabou!") -- doPlayerSetExperienceRate(cid, getPlayerStorageValue(cid, exp_info.storage[2])) local rates = getPlayerRates(cid) doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]-exp_info.rate) setPlayerStorageValue(cid, exp_info.storage[3], 0) -- registro end return true end]]></event> <talkaction words="!exppotion;/exppotion;!exp;/exp" event="buffer"><![CDATA[ domodlib('exppotion') return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() <= 0 and "Você não possui Exp Potion ativa no momento." or "Você tem "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time()).." de exp potion.")]]></talkaction> <action itemid="12698" event="script"><![CDATA[ domodlib('exppotion') function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, exp_info.storage[1]) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você não pode usar outra Exp Potion pois ainda possui uma ativa. Ainda restam: "..convertTime(getPlayerStorageValue(cid, exp_info.storage[1]) - os.time())..".") return true end local rates = getPlayerRates(cid) -- setPlayerStorageValue(cid, exp_info.storage[2], rates[SKILL__LEVEL]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você ativou Exp potion por "..exp_info.minutes.." minutos! Durante este tempo, você receberá +20% exp de monstros. Para saber o tempo, digite: /exppotion") setPlayerStorageValue(cid, exp_info.storage[1], os.time()+exp_info.minutes*60) setPlayerStorageValue(cid, exp_info.storage[3], 1) -- registro doPlayerSetExperienceRate(cid, rates[SKILL__LEVEL]+exp_info.rate) registerCreatureEvent(cid, "ExpPotionThink") doRemoveItem(item.uid,1) return true end]]></action> </mod>
  8. sudo apt-get install libboost-all-dev @robson pablo dos san
  9. subhe reagiu a uma resposta no tópico: (Resolvido)Erro stamina system
  10. Mathias Kenfi reagiu a uma resposta no tópico: (Resolvido)Erro stamina system
  11. eventsId = {} local function rechargeStamina(cid) if not isPlayer(cid) then eventsId[cid] = nil return end doPlayerAddStamina(cid, 1) eventsId[cid] = addEvent(rechargeStamina, 3 * 60 * 1000, cid) end function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then eventsId[cid] = addEvent(rechargeStamina, 3 * 60 * 1000, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bem vindo aos trainers VIP's " .. getCreatureName(cid) .."! Você receberá 1 minuto de stamina a cada 3 minutos nos trainers VIP's.") end return true end function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor) if isPlayer(cid) then stopEvent(eventsId[cid]) eventsId[cid] = nil end return true end Onde tem 1 = ganho de stamina. Onde tem 3 = o tempo para ganhar 1 minuto. Somente modificar, testado em otx 8.60.
  12. @MattOt no itens.xml procura: <item id="100" article="a" name="fainted shiny houndoom"> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="0" /> <attribute key="duration" value="300" /> </item> <item id="100" article="a" name="fainted bronzong"> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="0" /> <attribute key="duration" value="300" /> </item> <item id="100" article="a" name="fainted shiny milotic"> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="0" /> <attribute key="duration" value="300" /> </item> <item id="100" name="void" /> <item id="14746" article="a" name="portrait"> <attribute key="weight" value="0" /> <attribute key="slotType" value="legs" /> </item> <item id="14746" article="a" name="portrait"> <attribute key="weight" value="0" /> <attribute key="slotType" value="legs" /> </item> esses são os duplicados!
  13. Jeff Delay reagiu a uma resposta no tópico: Guild House
  14. entendo, abre o yourots e me manda uma linha dos bichos que estao bugados
  15. Kitsune Shiro reagiu a uma resposta no tópico: (Resolvido)[Duvida] Broadcast bugado
  16. esqueci isso de inicio, atualizei o código, com a função, faça o teste @Kitsune Shiro local items = { {itemId = 12377, count = 1, chance = 30}, {itemId = 11987, count = 1, chance = 20}, {itemId = 12338, count = 1, chance = 20}, {itemId = 12032, count = 1, chance = 20}, {itemId = 12031, count = 1, chance = 20}, {itemId = 12030, count = 1, chance = 20}, {itemId = 12547, count = 1, chance = 10}, {itemId = 15685, count = 1, chance = 1}, } function onUse(cid, item, frompos, item2, topos) local config = { pos = getCreaturePosition(cid), exhaustionSeconds = 3600, storageUse = 44231, } if(exhaustion.check(cid, config.storageUse)) then if (exhaustion.get(cid, config.storageUse) >= 60) then doPlayerSendCancel(cid, "Voce so poderar abrir o bau novamente em " .. math.floor(exhaustion.get(cid, config.storageUse) / 60 + 1) .." minutos.") end if (exhaustion.get(cid, config.storageUse) <= 60) then doPlayerSendCancel(cid, "Voce precisa esperar " .. exhaustion.get(cid, config.storageUse).." segundos.") end return true end local totalChance, randomTable, randomNumber = 0, {}, 0 addEvent(doPlayerSendTextMessage, 1*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 2*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 3*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 4*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 5*1000, cid, 27, "Procurando algo...") addEvent(doSendAnimatedText, 1*1000, config.pos, "[5]", 180) addEvent(doSendAnimatedText, 2*1000, config.pos, "[4]", 180) addEvent(doSendAnimatedText, 3*1000, config.pos, "[3]", 180) addEvent(doSendAnimatedText, 4*1000, config.pos, "[2]", 180) addEvent(doSendAnimatedText, 5*1000, config.pos, "[1]", 180) addEvent(doSendAnimatedText, 6*1000, config.pos, "DONE!", 180) for _, itemInfo in pairs (items) do randomTable[itemInfo.itemId] = {min = totalChance + 1, max = itemInfo.chance, count = itemInfo.count or 1} totalChance = totalChance + itemInfo.chance end randomNumber = math.random(1, totalChance) for itemId, itemInfo in pairs (randomTable) do local min, max = itemInfo.min, itemInfo.min + itemInfo.max if randomNumber >= min and randomNumber <= max then local newItem = addEvent(doPlayerAddItem, 6*1000, cid, itemId, itemInfo.count, false) if not newItem then return doPlayerSendCancel(cid, "Voce nao tem espaco para receber o item!") end doRemoveItem(item.uid, 1) exhaustion.set(cid, config.storageUse, config.exhaustionSeconds) local iInfo = getItemInfo(itemId) if itemId == 2160 then addEvent(doBroadcastMessage, 6*1000, getCreatureName(cid) .. " recebeu NOMEDOITEM.") end addEvent(doPlayerSendTextMessage, 6*1000, cid, 27, "Voce achou ("..iInfo.name..")!") break end end return true end
  17. Kitsune Shiro reagiu a uma resposta no tópico: (Resolvido)[Duvida] Broadcast bugado
  18. local items = { {itemId = 12377, count = 1, chance = 30}, {itemId = 11987, count = 1, chance = 20}, {itemId = 12338, count = 1, chance = 20}, {itemId = 12032, count = 1, chance = 20}, {itemId = 12031, count = 1, chance = 20}, {itemId = 12030, count = 1, chance = 20}, {itemId = 12547, count = 1, chance = 10}, {itemId = 15685, count = 1, chance = 1}, } function onUse(cid, item, frompos, item2, topos) local config = { pos = getCreaturePosition(cid), exhaustionSeconds = 3600, storageUse = 44231, } if(exhaustion.check(cid, config.storageUse)) then if (exhaustion.get(cid, config.storageUse) >= 60) then doPlayerSendCancel(cid, "Voce so poderar abrir o bau novamente em " .. math.floor(exhaustion.get(cid, config.storageUse) / 60 + 1) .." minutos.") end if (exhaustion.get(cid, config.storageUse) <= 60) then doPlayerSendCancel(cid, "Voce precisa esperar " .. exhaustion.get(cid, config.storageUse).." segundos.") end return true end local totalChance, randomTable, randomNumber = 0, {}, 0 addEvent(doPlayerSendTextMessage, 1*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 2*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 3*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 4*1000, cid, 27, "Procurando algo...") addEvent(doPlayerSendTextMessage, 5*1000, cid, 27, "Procurando algo...") addEvent(doSendAnimatedText, 1*1000, config.pos, "[5]", 180) addEvent(doSendAnimatedText, 2*1000, config.pos, "[4]", 180) addEvent(doSendAnimatedText, 3*1000, config.pos, "[3]", 180) addEvent(doSendAnimatedText, 4*1000, config.pos, "[2]", 180) addEvent(doSendAnimatedText, 5*1000, config.pos, "[1]", 180) addEvent(doSendAnimatedText, 6*1000, config.pos, "DONE!", 180) for _, itemInfo in pairs (items) do randomTable[itemInfo.itemId] = {min = totalChance + 1, max = itemInfo.chance, count = itemInfo.count or 1} totalChance = totalChance + itemInfo.chance end randomNumber = math.random(1, totalChance) for itemId, itemInfo in pairs (randomTable) do local min, max = itemInfo.min, itemInfo.min + itemInfo.max if randomNumber >= min and randomNumber <= max then local newItem = addEvent(doPlayerAddItem, 6*1000, cid, itemId, itemInfo.count, false) if not newItem then return doPlayerSendCancel(cid, "Voce nao tem espaco para receber o item!") end doRemoveItem(item.uid, 1) exhaustion.set(cid, config.storageUse, config.exhaustionSeconds) local iInfo = getItemInfo(itemId) if itemId == 2160 then addEvent(doBroadcastMessage, 6*1000, getCreatureName(cid) .. " recebeu NOMEDOITEM.") end addEvent(doPlayerSendTextMessage, 6*1000, cid, 27, "Voce achou ("..iInfo.name..")!") break end end return true end Atualizado
  19. @jeffersson s2 guildHalls = false para guildHalls = true, resto e no rme editor.
  20. guildhouse no config.lua
  21. seu servidor -> data -> world. Baiak Barao-spawn (algo parecido). @victor8082
  22. local items = { {itemId = 12337, count = 1, chance = 30}, -- naruto and gamabunta {itemId = 11987, count = 1, chance = 20}, -- naruto road to ninja {itemId = 12338, count = 1, chance = 20}, {itemId = 12032, count = 1, chance = 20}, {itemId = 12031, count = 1, chance = 20}, {itemId = 12030, count = 1, chance = 20}, {itemId = 12547, count = 1, chance = 10}, {itemId = 15685, count = 1, chance = 1}, } local broadcastitems = {12337, 11987, 12338, 12032, 12031, 12030, 12547, 15685} function onUse(cid, item, frompos, item2, topos) local totalChance, randomTable, randomNumber = 0, {}, 0 for _, itemInfo in pairs (items) do randomTable[itemInfo.itemId] = {min = totalChance + 1, max = itemInfo.chance, count = itemInfo.count or 1} totalChance = totalChance + itemInfo.chance end randomNumber = math.random(1, totalChance) for itemId, itemInfo in pairs (randomTable) do local min, max = itemInfo.min, itemInfo.min + itemInfo.max if randomNumber >= min and randomNumber <= max then local newItem = doPlayerAddItem(cid, itemId, itemInfo.count, false) if not newItem then return doPlayerSendCancel(cid, "Voce nao tem espaco para receber o item!") end doPlayerRemoveItem(cid, 11753, 1) local pos = {x=getPlayerPosition(cid).x+0, y=getPlayerPosition(cid).y+0, z=getPlayerPosition(cid).z+0} doSendMagicEffect(pos, 100) -- Id do efeito. local iInfo = getItemInfo(itemId) doPlayerSendTextMessage(cid, 25, "Voce ganhou "..itemInfo.count.." "..iInfo.name.."") for i, broaditem in ipairs(broadcastitems) do if itemId==broadcastitems then doBroadcastMessage(getPlayerName(cid).." acabou de ganhar: "..items.count.." "..items.itemId.." (Raro) na presente box.", 19) end end break end end return true end

Informação Importante

Confirmação de Termo