Ir para conteúdo

FlavioHulk

Membro
  • Registro em

  • Última visita

Tudo que FlavioHulk postou

  1. 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(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
  2. 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(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 addEvent(createMonster, i = 2 and 1700 or 2000, creature, pos) 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 Tentei dar uma enxugada no script, qualquer erro, só comentar que corrijo haha
  3. Adiciona em: data/lib/core/game.lua if not globalStorageTable then globalStorageTable = {} end function Game.getStorageValue(key) return globalStorageTable[key] or -1 end function Game.setStorageValue(key, value) globalStorageTable[key] = value end Testei o script e tudo está funcionando normalmente... Boa sorte ! 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 }, {} 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 = player:getHealth() - config.healthLose player:addHealth( - difference) 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
  4. local config, players = { actionId = 1225, -- Action ID da quest. healthLose = 50, -- Quantidade de life perdido a cada clique. healthTotal = 10000, -- 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 }, {} 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 = player:getHealth() - config.healthLose player:addHealth( - difference) 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('You did the quest.') for k in pairs(players) do players[k] = nil end end return true end
  5. local config, players = { actionId = 1225, -- Action ID da quest. healthLose = 50, -- Quantidade de life perdido a cada clique. healthTotal = 10000, -- 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 }, {} function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid ~= config.actionId then return false end if Game.getStorageValue(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 = player:getHealth() - config.healthLose player:addHealth( - difference) 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('You did the quest.') for k in pairs(players) do players[k] = nil end end return true end Testa aí, provavelmente há algum erro kk
  6. Posta seu otserv.cpp aí, sem caô!
  7. Minha simples opinião: Cara, se você está sendo ajudado, antes de tudo seja educado, e amigável. Outra, ninguém, absolutamente ninguém fará algo inteiramente pra você gratuitamente, tempo e aprendizado é dinheiro. E ele não tem obrigação em atualizar o Gesior que ele disponibilizou, o código pode ter ficado ultrapassado, e você como OT-ADMIN deve saber o básico disso... Em resumo, vocês tem o olho grande (não generalizando), com intuito de abrir um server ganhar grana, e pedir ajudas em fóruns em troco de nada, e ainda achar que temos obrigação e direito em entregar um script de mão beijada... Não tô falando em recebermos pra fazer, mas suporte é mostrar um caminho e vocês tentarem... Por favor, se você quer um investimento lucrativo, deve haver um custo por trás disso... Um server seguro e bem atualizado precisa de um profissional, ou você mesmo aprenda entre raça e dentes... Abraços, e reflita...
  8. Só consegui pensar nisso nesse momento de sono extremo kk, testa aí, e me retorna informação... local function attackSpell(player) local player = Player(player) if not player then return false end local min = (player:getLevel() / 5) + (player:getMagicLevel() * 5) + 25 local max = (player:getLevel() / 5) + (player:getMagicLevel() * 6.2) + 45 doAreaCombatHealth(player.uid, COMBAT_HOLYDAMAGE, player:getPosition(), 3--[[Area de combate ]], -min, -max, CONST_ME_HOLYAREA) return true end function onUseWeapon(player, variant) attackSpell(player.uid) return true end
  9. Qual erro aparece? Poderia fazer um vídeo?
  10. O Trainning Dummy? Isso é um item ou uma criatura? Porque esse training é uma versão nova do global...
  11. Deve ser coisa do 0.4 haha, utilizo sempre o table.contains em 1.3. Valeu pela dica!! ------------------------------------------------------------------------------------------------ local config = { storage = 97933, -- STORAGE vocation = {2, 6}, -- ID DA VOCAÇÃO SEM PROMOTION E COM PROMOTION item = 2160, -- ITEM ID item_qntd = 100 -- QUANTIDADE DO ITEM } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storage) > 0 then doPlayerSendCancel(cid, "Você já fez a quest.") doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if not isInArray(config.vocation, getPlayerVocation(cid)) then doPlayerSendCancel(cid, "Você não é da vocação permitida.") doSendMagicEffect(toPosition, CONST_ME_POFF) return true end doPlayerAddItem(cid, config.item, config.item_qntd) doPlayerSendTextMessage(cid, 22, "Você ganhou " .. config.item_qntd .. " " .. getItemNameById(config.item)) doPlayerSetStorageValue(cid, config.storage, 1) return true end
  12. Que distro você utiliza? Dificulta ainda mais se ficarmos tentando descobrir qual distro você utiliza!
  13. Provavelmente seu provedor não permite abertura de tais portas, tente entrar em contato com eles...
  14. amigo, posta o script inteiro...
  15. local config = { vocation = {2, 5}, -- Colocar os ids das vocações storage = 45415 } function onUse(cid, item, fromPosition, itemEx, toPosition) if not table.contains(config.vocation, getPlayerVocation(cid)) then doPlayerSendCancel(cid, "Você não tem a vocação permitida.") doSendMagicEffect(toPosition, CONST_ME_POFF) return true end if getPlayerStorageValue(cid, config.storage) > 0 then doPlayerSendCancel(cid, "Você já fez a quest.") doSendMagicEffect(toPosition, CONST_ME_POFF) return true end doPlayerAddItem(cid, 2376) -- Id do prêmio doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou tal item...") doPlayerSetStorageValue(cid, config.storage, 1) return true end
  16. local config = { vocation = {2, 5} -- Colocar os ids das vocações } function onUse(cid, item, fromPosition, itemEx, toPosition) if not table.contains(config.vocation, getPlayerVocation(cid)) then doPlayerSendCancel(cid, "Você não tem a vocação permitida.") doSendMagicEffect(toPosition, CONST_ME_POFF) return true end doPlayerAddItem(cid, 2376) -- Id do prêmio doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou tal item...") return true end Obs.: Não manjo bem de 0.4, sem objeto orientado é tenso haha
  17. local config = { [1] = { text = "Bem-Vindo(a)", position = {x = 160, y = 54, z = 7}, effect = 30, colorText = 125 }, [2] = { text = "Bem-Vindo", position = {x = 158, y = 51, z = 4}, effect = 30, colorText = 125 } } function onThink(cid, interval, lastExecution) for i = 1, #config do local tmpConfig = config[i] doSendAnimatedText(tmpConfig.position, tmpConfig.text, tmpConfig.colorText) addEvent(doSendMagicEffect, 150, tmpConfig.position, tmpConfig.effect) end return true end
  18. Dê uma olhada no firewall interno do linux...
  19. local positions = { ["Bem-Vindo(a)"] = {{ x = 160, y = 54, z = 7 }, 30, 9}, ["Bem-Vindo"] = {{ x = 158, y = 51, z = 4 }, 30, 9}, } function onThink(cid, interval, lastExecution) for text, v in pairs(positions) do local pos = v[1] doSendAnimatedText(pos, text, NUMERODACOR) addEvent(doSendMagicEffect, 150, pos, v[2]) end return true end
  20. local config = { pos = {x = 1034, y = 1028, z = 7}, lever = {x = 1034, y = 1019, z = 7, stackpos = 1}, pos1 = {x = 1034, y = 1020, z = 7, stackpos = 253} } function onUse(cid, item, fromPosition, itemEx, toPosition) local lever1pos, player1pos = getThingFromPos(config.lever), getThingFromPos(config.pos1) if item.itemid ~= 1945 then doPlayerSendTextMessage(cid, 25, "Alguem ja esta fazendo a quest.") doSendMagicEffect(getCreaturePosition(cid), 2) return true end if player1pos.itemid < 1 then doPlayerSendTextMessage(cid, 25, "Voce nao esta na posicao correta.") doSendMagicEffect(getCreaturePosition(cid), 2) return true end if getPlayerItemCount(cid, 12661) < 1 then doPlayerSendTextMessage(cid, 25, "Voce nao tem o Token.") doSendMagicEffect(getCreaturePosition(cid), 2) return true end doPlayerRemoveItem(cid, 12661, 1) doTeleportThing(cid, config.pos) doTransformItem(item.uid, item.itemid + 1) addEvent (function() doTransformItem(getThingfromPos(toPosition).uid, 1945) end, 20 * 1000) return true end Obs,: Não manjo de 0.4 haha, testa aê!
  21. Usa esse script, e me manda o que sair no console... local positions = { [1] = {x=164,y=57,z=7}, [2] = {x=176,y=39,z=7}, [3] = {x=169,y=40,z=7}, [4] = {x=156,y=57,z=7}, [5] = {x=139,y=41,z=7}, [6] = {x=173,y=57,z=7}, [7] = {x=161,y=32,z=7}, [8] = {x=138,y=60,z=7}, [9] = {x=179,y=59,z=7}, [10] = {x=132,y=23,z=7}, [11] = {x=173,y=33,z=7}, [12] = {x=178,y=27,z=7}, [13] = {x=181,y=22,z=7}, [14] = {x=197,y=39,z=7}, [15] = {x=208,y=40,z=7}, [16] = {x=208,y=50,z=7}, [17] = {x=204,y=62,z=7}, [18] = {x=194,y=57,z=7}, [19] = {x=178,y=67,z=7}, [20] = {x=104,y=61,z=7}, [21] = {x=102,y=54,z=7}, [22] = {x=103,y=46,z=7}, [23] = {x=153,y=61,z=7}, [24] = {x=96,y=41,z=7}, [25] = {x=83,y=39,z=7}, [26] = {x=110,y=34,z=7}, [27] = {x=132,y=47,z=7}, [28] = {x=138,y=54,z=7} } function onUse(cid, item, frompos, item2, topos) print("itemUID:" .. item.uid) doBroadcastMessage("[AVISO] A cidade foi invadida por Monstros, venha proteger a cidade!") local monsterName if item.uid == 19000 then monsterName = 'Phantom Lord' elseif item.uid == 19001 then monsterName = 'Finger Killer' elseif item.uid == 19002 then monsterName = 'Brimstone Bug' elseif item.uid == 19003 then monsterName = 'Green Phantom' end print("creature Name:" .. monsterName) for i = 1, #positions do doCreateMonster(monsterName, positions[i]) end return true end
  22. <item fromid="179" toid="180" article="a" name="muralha wall" /> <item id="181" article="a" name="muralha pillar" /> <item id="12468" article="a" name="[Donate] BaiakME Doll"> <attribute key="description" value="Use o Item Para Ganhar o [DONATE] BaiakME Outfit." /> <attribute key="weight" value="50" /> </item>

Informação Importante

Confirmação de Termo