Tudo que FlavioHulk postou
-
Colocando imagens no RME
Você necessita colocar o item.otb editado na pasta do seu RME respectiva do seu server
-
(Resolvido)Spell que cura todas as conditions
local conditions = { CONDITION_ATTRIBUTES, CONDITION_FREEZING, CONDITION_DAZZLED, CONDITION_CURSED, CONDITION_REGENERATION, CONDITION_DRUNK, CONDITION_OUTFIT, CONDITION_INVISIBLE, CONDITION_LIGHT, CONDITION_MANASHIELD, CONDITION_POISON, CONDITION_FIRE, CONDITION_ENERGY, CONDITION_PHYSICAL, CONDITION_HASTE, CONDITION_PARALYZE } function onCastSpell(cid, var) for i = 1, #conditions do local types = conditions[i] doRemoveCondition(cid, types) end return true end
-
(Resolvido)2 Bug website Ajuda Rep ++ !!
Quanto ao primeiro bug, você precisa editar seu rook sample na database, ele é o exemplo a ser criado perante os outros novos chares... Quanto ao segundo bug, provavelmente você precisa linkar aquele atalho...
-
Erro Player Not Found
---------- CONFIGURE AQUI ---------- local config = { tempo = 5 * 60 * 1000, -- (1 = 1 minuto) Tempo que o script durará expInicial = 2, -- O quanto que você quer que dobre sua experiencia, por exemplo 2 é 2x as rates do seu server. expFinal = 1, --Não mude, isso é para a experiencia voltar ao normal. itemId = 7440, -- Aqui vai o ID do ITEM storage = 171717, -- Storage level = 8 -- LEVEL para usar o item } ---------- FIM DA CONFIGURAÇÃO NÃO ALTERE NADA A BAIXO DISSO ------------- local function potion(cid, rates, expInicial, expFinal, storage) if not isPlayer(cid) then return false end if (rates - expInicial) >= 1 then doPlayerSetExperienceRate(cid, rates - expInicial) elseif (rates - expInicial) < 1 then doPlayerSetExperienceRate(cid, expFinal) end setPlayerStorageValue(cid, storage, 0) doPlayerSendTextMessage(cid, 22, "Fim do efeito da potion.") doPlayerSendTextMessage(cid, 22, "Bônus de xp: " .. rates .. "x") stopEvent(potion) return true end function onUse(cid, item, frompos, item2, topos) if item.itemid ~= config.itemId then return false end if getPlayerLevel(cid) < config.level then doPlayerSendCancel(cid, "Você não tem level suficiente, precisa ser level 1500.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end if getPlayerStorageValue(cid, config.storage) > 0 then doPlayerSendCancel(cid, "Você já está sob efeito desse item.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return true end local rates = getPlayerRates(cid) if rates[SKILL__LEVEL] > 1 then rates = rates[SKILL__LEVEL] + config.expinicial else rates = (rates[SKILL__LEVEL] + config.expinicial) - 1 end doRemoveItem(item.uid, 1) doPlayerSetExperienceRate(cid, rates) doSendMagicEffect(frompos, 13) doPlayerSendTextMessage(cid, 22, "Você receberá " .. config.expInicial .. "x de xp durante " .. config.tempo .. " minuto(s)",) addEvent(potion, config.tempo, cid, getPlayerRates(cid), config.expinicial, config.expFinal, config.storage) setPlayerStorageValue(cid, storage, 1) return true end
-
(Resolvido)PVP não está funcionando
Dá uma olhada em data/events/creature.lua, provalvemente haverá uma função igual a essa abaixo: if ADVANCED_SECURE_MODE ~= 0 then if self:isPlayer() and target:isPlayer() then if self:hasSecureMode() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end Basta comentar ela, e me retorna se funcionou...
- Add número crescente no nome
-
(Resolvido)Spell que cura todas as conditions
Posta seu script pra eu dar uma olhada
-
(Resolvido)2 Bug website Ajuda Rep ++ !!
Qual seu website? Gesior, MyAAC ou Znote?
-
Destruction e Gnome items
Tá utilizando o cliente certo? Tá executando o item editor como administrador?
-
[Castle War 24H] Conquiste o trono!
Você teria que saber o básico do script, logo que ele não explica bem onde configurar. Dê uma olhada no script, não é dificil...
-
[Castle War 24H] Conquiste o trono!
Vai ter que editar as posições Funciona, porém é recomendado otimizar o script...
-
Destruction e Gnome items
Utilizado o item editor pra visualizar seu items.otb
-
(Resolvido)Pedido Script p/ Quest
local config, players = { actionId = 1225, -- Action ID da quest. healthLose = 50, -- Quantidade de life perdido a cada clique. healthTotal = 300, -- Quantidade a ser alcançada de life. reward = { [1] = {itemId = 2160, amount = 100} -- Recompensa itemId e quantidade }, globalStorage = 52220, -- Storage global storagePlayer = 52221, -- Storage do player storageTime = 52222, -- Storage do Tempo time = 10 -- Tempo em segundos }, {} function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid ~= config.actionId then return false end if Game.getStorageValue(config.globalStorage) > 0 then player:sendCancelMessage('The daily quest has already been made.') return true end if player:getStorageValue(config.storagePlayer) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The chest is empty.') return true end local difference = config.healthLose player:addHealth( - difference) if player:getExhaustion(config.storageTime) <= 0 then if players[player:getId()] then players[player:getId()] = nil player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Your sacrifice was reseted.') end player:setExhaustion(config.storageTime, config.time) end players[player:getId()] = ((players[player:getId()] == nil and 0 or players[player:getId()]) + config.healthLose) if players[player:getId()] == config.healthTotal then if not player then return false end for i = 1, #config.reward do local rewards = config.reward[i] player:addItem(rewards.itemId, rewards.amount) end Game.setStorageValue(config.globalStorage, 1) player:setStorageValue(config.storagePlayer, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You did the quest.') for k in pairs(players) do players[k] = nil end end return true end Cara, testei totalmente esse script, e funciona como deveria.. Lembra-se de não dar reload no script, senão a tabela irá resetar !
-
Erro em Combat Spells
Então cara, isso é a formula que você está utilizando...
-
Destruction e Gnome items
Você precisa atualizar seu items.otb, caso já tenha no seu items.otb, o id registrado no items.xml está errado...
-
Erro em Combat Spells
Isso é erro na codificação, e não erro no script... Tenta converter em ANSI ou UTF utilizando o notepad++
-
Erro em Combat Spells
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.2, -150, -2.5, 1) local area = createCombatArea(AREA_CIRCLE2X2) setCombatArea(combat, area) function onCastSpell(cid, var) if exhaustion.get(cid, 61260) then doPlayerSendCancel(cid, "Cooldown[" .. exhaustion.get(cid, 61260) .."]") return false end for i = 0, 2000, 500 do addEvent(function(cid) if not isPlayer(cid) then return end return doCombat(cid, combat, var) end, i, cid) end exhaustion.set(cid, 61260, 10) return false end Então cara, é o seguinte, já que você irá utilizar a mesma função várias vezes, o mais correto é utilizar um laço for pra criar essa situação. No seu script, é um evento onde se repete a cada 500 milissegundos: for i = 0, 2000, 500 do Onde o valor de i é 0, o limite é 2000 e a cada rodada será incrementado 500 ao valor de i... Criando um loop até o valor limite!
-
(Resolvido)Pedido Script p/ Quest
Adiciona esta função em lib/core/player.lua function Player.setExhaustion(self, value, time) self:setStorageValue(value, time + os.time()) end function Player.getExhaustion(self, value) local storage = self:getStorageValue(value) if not storage or storage <= os.time() then return 0 end return storage - os.time() end function Player:hasExhaustion(value) return self:getExhaustion(value) >= os.time() and true or false end Testa esse script, e me retorna algum erro ou possível bug, pois estou fazendo esboços. local config, players = { actionId = 1225, -- Action ID da quest. healthLose = 50, -- Quantidade de life perdido a cada clique. healthTotal = 300, -- Quantidade a ser alcançada de life. reward = { [1] = {itemId = 2160, amount = 100} -- Recompensa itemId e quantidade }, globalStorage = 52220, -- Storage global storagePlayer = 52221, -- Storage do player storageTime = 52222, -- Storage do Tempo time = 10 * 60 -- Tempo em segundos }, {} function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid ~= config.actionId then return false end if Game.getStorageValue(config.globalStorage) > 0 then player:sendCancelMessage('The daily quest has already been made.') return true end if player:getStorageValue(config.storagePlayer) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The chest is empty.') return true end local difference = config.healthLose player:addHealth( - difference) if not player:hasExhaustion(config.storageTime) then if players[player:getId()] then players[player:getId()] = nil player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Your sacrifice was reseted.') end player:setExhaustion(config.storageTime, config.time) end players[player:getId()] = ((players[player:getId()] == nil and 0 or players[player:getId()]) + config.healthLose) if players[player:getId()] == config.healthTotal then if not player then return false end for i = 1, #config.reward do local rewards = config.reward[i] player:addItem(rewards.itemId, rewards.amount) end Game.setStorageValue(config.globalStorage, 1) player:setStorageValue(config.storagePlayer, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You did the quest.') for k in pairs(players) do players[k] = nil end end return true end
-
(Resolvido)FIRST ITEMS
Só adicionar os ids do itens na tabela: items = {2050, 2382}
-
Como remover players antigo e casas?
Citando o post do @KotZletY, é o mais recomendado a fazer, sendo mais concreto, é o mais seguro!
-
Gesior Natanael Dando Premium Points
Cara, isso é alguma brecha em seu sistema de venda e compra de char... Vi em outro tópico que você pedia ajuda quanto a esse sistema, esse sistema precisa ser bem feito pra não houver falhas, vários servers já sofreram invasões por conta desse sistema...
-
Erro em Combat Spells
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.2, -150, -2.5, 1) local area = createCombatArea(AREA_CIRCLE2X2) setCombatArea(combat, area) local function onDelayedSpell(parameters) doCombat(parameters.cid, parameters.combat, parameters.var) end function onCastSpell(cid, var) if exhaustion.get(cid,61260) then doPlayerSendCancel(cid, "Cooldown[" .. exhaustion.get(cid, 61260) .."]") return false end local parameters = { cid = cid, var = var, combat = combat} for i = 0, 2000, 500 do addEvent(onDelayedSpell, i, parameters) end exhaustion.set(cid,61260,10) return false end
-
(Resolvido)[AJUDA] Configurando price para itemid
local bixos = {"Jack Sparrow", "Catatau", "Belmont's Revenge"} local positions = {{x = 386, y = 154, z = 7}, {x = 388, y = 154, z = 7}, {x = 390, y = 154, z = 7}} -- Posicao q os bixos nascem local price = 1 -- Preco para jogar local cassinoCoin = 6527 function onUse(cid, item, fromPosition, itemEx, toPosition) local first = math.random(1, #bixos) local second = math.random(1, #bixos) local third = math.random(1, #bixos) local tab = {} local recheck = 0 if getGlobalStorageValue(82192) > os.time() then doPlayerSendCancel(cid, "Aguarde um pouco para apostar.") return true end if getPlayerItemCount(cid, cassinoCoin) < 1 then doPlayerSendCancel(cid, "Você precisa de " .. price .. " " .. getItemNameById(cassinoCoin) .." para jogar.") return true end setGlobalStorageValue(82192, os.time() + 6) for i = 1, (#positions) do doSendMagicEffect(positions, 37) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) doPlayerRemoveItem(cid, cassinoCoin, price) doCreateMonster(bixos[first], positions[1]) doSendMagicEffect(positions[1], 26) addEvent(doSendMagicEffect, 100, positions[1], 37) table.insert(tab, first) setGlobalStorageValue(bixos[first], getGlobalStorageValue(bixos[first])+1) addEvent(function() doCreateMonster(bixos[second], positions[2]) doSendMagicEffect(positions[2], 26) addEvent(doSendMagicEffect, 100, positions[2], 37) table.insert(tab, second) end, 1700) addEvent(function() doCreateMonster(bixos[third], positions[3]) doSendMagicEffect(positions[3], 26) addEvent(doSendMagicEffect, 100, positions[3], 37) setGlobalStorageValue(bixos[third], getGlobalStorageValue(bixos[third])+1) table.insert(tab, third) end, 2000) addEvent(function() doRemoveCreature(getTopCreature(positions[1]).uid) doRemoveCreature(getTopCreature(positions[2]).uid) doRemoveCreature(getTopCreature(positions[3]).uid) doSendMagicEffect(positions[1], 61) doSendMagicEffect(positions[2], 61) doSendMagicEffect(positions[3], 61) if tab[1] == tab[2] and tab[1] == tab[3] then doPlayerAddItem(cid, cassinoCoin, 10) doSendAnimatedText(getThingPos(cid), "VOCE", 25) addEvent(doSendAnimatedText, 800, getThingPos(cid), "GANHOU", 25) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "30", 25) addEvent(doSendAnimatedText, 3000, getThingPos(cid), "EVENTCOINS", 25) doSendMagicEffect(getThingPos(cid), 30) doSendMagicEffect(positions[1], 30) doSendMagicEffect(positions[2], 30) doSendMagicEffect(positions[3], 30) addEvent(doSendMagicEffect, 800, getThingPos(cid), 29) addEvent(doSendMagicEffect, 800, positions[1], 29) addEvent(doSendMagicEffect, 800, positions[2], 29) addEvent(doSendMagicEffect, 800, positions[3], 29) addEvent(doSendMagicEffect, 1600, getThingPos(cid), 28) addEvent(doSendMagicEffect, 1600, positions[1], 28) addEvent(doSendMagicEffect, 1600, positions[2], 28) addEvent(doSendMagicEffect, 1600, positions[3], 28) else doSendAnimatedText(getThingPos(cid), "VOCE", 200) addEvent(doSendAnimatedText, 800, getThingPos(cid), "PERDEU", 200) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "HAHA", 200) end end, 4200) return true end
-
(Resolvido)[AJUDA] Configurando price para itemid
local config, tab = { creatures = { [1] = "Jack Sparrow", [2] = "Catatau", [3] = "Belmont's Revenge" }, positions = { [1] = {x = 386, y = 154, z = 7}, [2] = {x = 388, y = 154, z = 7}, [3] = {x = 390, y = 154, z = 7} }, price = 1, amountReward = 10, cassinoCoin = 6527, }, {} local function createMonster(creature, position) doCreateMonster(creature, position) doSendMagicEffect(position, 26) addEvent(doSendMagicEffect, 100, position, 37) return true end function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(82192) > os.time() then doPlayerSendCancel(cid, "Aguarde um pouco para apostar.") return true end if getPlayerItemCount(cid, config.cassinoCoin) < 1 then doPlayerSendCancel(cid, "Você precisa de " .. config.price .. " " .. getItemNameById(config.cassinoCoin) .." para jogar.") return true end setGlobalStorageValue(82192, os.time() + 6) for i = 1, #config.positions do doSendMagicEffect(config.positions[i], 37) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) doPlayerRemoveItem(cid, config.cassinoCoin, config.price) for i = 1, #config.positions do local pos, random = config.positions[i], math.random(1, #config.creatures) local creature = config.creatures[random] createMonster(creature, pos) tab[#tab + 1] = random if i ~= 1 then if i == 2 then addEvent(createMonster, 1700, creature, pos) else addEvent(createMonster, 2000, creature, pos) end end end addEvent(function() for i = 1, #config.positions do local pos = config.positions[i] doRemoveCreature(getTopCreature(pos).uid) doSendMagicEffect(pos, 61) end if tab[1] == tab[2] and tab[1] == tab[3] then doPlayerAddItem(cid, config.cassinoCoin, config.amountReward) doSendAnimatedText(getThingPos(cid), "VOCE", 25) addEvent(doSendAnimatedText, 800, getThingPos(cid), "GANHOU", 25) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "30", 25) addEvent(doSendAnimatedText, 3000, getThingPos(cid), "EVENTCOINS", 25) for i = 1, #config.positions do local pos = config.positions[i] doSendMagicEffect(pos, 30) end for i = 1, #config.positions do local pos = config.positions[i] addEvent(doSendMagicEffect, 800, pos, 29) end for i = 1, #config.positions do local pos = config.positions[i] addEvent(doSendMagicEffect, 1600, pos, 28) end doSendMagicEffect(getThingPos(cid), 30) addEvent(doSendMagicEffect, 800, getThingPos(cid), 29) addEvent(doSendMagicEffect, 1600, getThingPos(cid), 28) else doSendAnimatedText(getThingPos(cid), "VOCE", 200) addEvent(doSendAnimatedText, 800, getThingPos(cid), "PERDEU", 200) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "HAHA", 200) end end, 4200) return true end Vai testando haha !
-
(Resolvido)[AJUDA] Configurando price para itemid
local config, tab = { creatures = { [1] = "Jack Sparrow", [2] = "Catatau", [3] = "Belmont's Revenge" }, positions = { [1] = {x = 386, y = 154, z = 7}, [2] = {x = 388, y = 154, z = 7}, [3] = {x = 390, y = 154, z = 7} }, price = 1, amountReward = 10, cassinoCoin = 6527, }, {} local function createMonster(creature, position) doCreateMonster(creature, position) doSendMagicEffect(position, 26) addEvent(doSendMagicEffect, 100, position, 37) return true end function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(82192) > os.time() then doPlayerSendCancel(cid, "Aguarde um pouco para apostar.") return true end if getPlayerItemCount(cid, config.cassinoCoin) < 1 then doPlayerSendCancel(cid, "Você precisa de " .. price .. " " .. getItemNameById(config.cassinoCoin) .." para jogar.") return true end setGlobalStorageValue(82192, os.time() + 6) for i = 1, #config.positions do doSendMagicEffect(config.positions[i], 37) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) doPlayerRemoveItem(cid, config.cassinoCoin, config.price) for i = 1, #config.positions do local pos, creature = config.positions[i], math.random(1, #config.creatures) createMonster(creature, pos) tab[#tab + 1] = creature if i ~= 1 then if i == 2 then addEvent(createMonster, 1700, creature, pos) else addEvent(createMonster, 2000, creature, pos) end end end addEvent(function() for i = 1, #config.positions do local pos = config.positions[i] doRemoveCreature(getTopCreature(pos).uid) doSendMagicEffect(pos, 61) end if tab[1] == tab[2] and tab[1] == tab[3] then doPlayerAddItem(cid, config.cassinoCoin, config.amountReward) doSendAnimatedText(getThingPos(cid), "VOCE", 25) addEvent(doSendAnimatedText, 800, getThingPos(cid), "GANHOU", 25) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "30", 25) addEvent(doSendAnimatedText, 3000, getThingPos(cid), "EVENTCOINS", 25) for i = 1, #config.positions do local pos = config.positions[i] doSendMagicEffect(pos, 30) end for i = 1, #config.positions do local pos = config.positions[i] addEvent(doSendMagicEffect, 800, pos, 29) end for i = 1, #config.positions do local pos = config.positions[i] addEvent(doSendMagicEffect, 1600, pos, 28) end doSendMagicEffect(getThingPos(cid), 30) addEvent(doSendMagicEffect, 800, getThingPos(cid), 29) addEvent(doSendMagicEffect, 1600, getThingPos(cid), 28) else doSendAnimatedText(getThingPos(cid), "VOCE", 200) addEvent(doSendAnimatedText, 800, getThingPos(cid), "PERDEU", 200) addEvent(doSendAnimatedText, 1600, getThingPos(cid), "HAHA", 200) end end, 4200) return true end