Ir para conteúdo
  • Cadastre-se

L3K0T

Moderador
  • Total de itens

    2088
  • Registro em

  • Última visita

  • Dias Ganhos

    83

Tudo que L3K0T postou

  1. bool Player::canWalkthrough(const Creature* creature) const { if (creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if (!player) return false; // Verifica se o jogador atual e o outro jogador estão em uma área de proteção (PZ) e impede a passagem. bool thisPlayerInPZ = getTile()->hasFlag(TILESTATE_PROTECTIONZONE);
  2. -- Import required modules and libraries domodlib('arenaFunctions') local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} -- Function to reset conversation states local function resetTalkState() focus = 0 talk_start = 0 TS = 0 end -- Function to check if a string contains another string (case-insensitive) local function msgcontains(txt, str) return string.find(string.lower(txt), string.lower(str)) end -- Function to handle player saying something to the NPC function onCreatureS
  3. Manda seu login.lua o account mannager fica lá, pode ter sido removido
  4. function onSay(cid, words, param, channel) if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ";") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "No destination specified.") return true end local pid = getPlayerByName(t[1]) if not pid or (isPlayerGhost(pid) and getPlayerAccess(pid) > getPlayerAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[1] .. " not
  5. local storageValue = 123 -- Valor da storage específica que indica se o efeito deve ser ativado ou não function ariseText(cid) if not isPlayer(cid) then -- Verifica se o jogador ainda é válido return true end local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} local storage = getPlayerStorageValue(cid, storageValue) if storage > 1 then doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], math.random(1, 255)) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN) -- Efei
  6. @moleza Galera, começo usar a BOX está funcionando 100% porém está dando esse erro na distro: OBS: Mudei a box antes era a chance de math.random(1,100) e agora está (1,1000) antes a box não era agrupavel, agora é agrupavel até 100 unidades Notei que abro 20 box, quando vou abrir a 21 ele da o erro e não abre e também não conta Notei também que as box sempre vem mesma coisa não está realmente aleatorio ERRO: [14:47:38.600] [Error - Action Interface] [14:47:38.609] data/actions/scripts/pandora chest box.lua:onUse [14:47:38.613] Description: [14:47:38
  7. Coloque a solução para ajudar outras pessoas?
  8. Coloque a solução para ajudar outras pessoas se for possível
  9. Duração de 10 minutos pode alterar o tempo, ao acabar o tempo o efeito para de sair e o player perde a storage, ela só poderá ser ganha novamente com algum sistema que vc deve ta fazebdo. local storageValue = 123 -- Valor da storage específica que indica se o efeito deve ser ativado ou não local effectDuration = 10 * 60 -- Duração do efeito em segundos (10 minutos) function ariseText(cid) if not isPlayer(cid) then -- Verifica se o jogador ainda é válido return true end local texts = {"' . ,", ". ' ,", "' . ,", ", '
  10. local items = { {pos = {x = 102, y = 184, z = 7}, itemid = 7382}, } local monster = {pos = {x = 102, y = 182, z = 7}, name = "Ancestral Guardian"} local config = { onSpawnMonster = CONST_ME_TELEPORT, -- efeito lançado quando monstro é criado onRemoveItem = CONST_ME_BLOCKHIT, -- efeito lançado quando item é removido missingItem = CONST_ME_POFF, -- efeito lançado quando não encontrou o item para remover } -- 255 faz com que não lance efeito algum local currentMonster = nil function onUse(cid, item, frompos, item2, topos) if currentMonster t
  11. Troque e adicione oque não tem em Spawn.cpp bool Spawn::findPlayer(const Position& pos) { SpectatorHashSet spectators; g_game.map.getSpectators(spectators, pos, false, true); for (Creature* spectator : spectators) { if (!spectator->getPlayer()->hasFlag(PlayerFlag_IgnoredByMonsters)) { return true; } } return false; } void Spawn::checkSpawn() { checkSpawnEvent = 0; cleanup(); uint32_t spawnCount = 0; for (auto& it : spawnMap) { uint32_t spawnId = it.fir
  12. 123 é a storage que o player deverá ter local storageValue = 123 -- Valor da storage específica que indica se o efeito deve ser ativado ou não function ariseText(cid) if not isPlayer(cid) then -- Verifica se o jogador ainda é válido return true end local texts = {"' . ,", ". ' ,", "' . ,", ", ' ."} if getPlayerStorageValue(cid, storageValue) > 0 then doSendAnimatedText(getCreaturePosition(cid), texts[math.random(1, #texts)], math.random(1, 255)) doSendMagicEffect(getCreaturePosition(cid), CONST_
  13. void Player::onTarget(Creature* target) { Creature::onTarget(target); if(target == this) { addInFightTicks(false); return; } if(hasFlag(PlayerFlag_NotGainInFight)) return; Player* targetPlayer = target->getPlayer(); if(targetPlayer && !isPartner(targetPlayer) && !isAlly(targetPlayer)) { if(!pzLocked && g_game.getWorldType() == WORLDTYPE_HARDCORE) { pzLocked = true; sendIcons(); } if(getSkull() == SKULL_NONE &a
  14. Agora só pega se o player tiver apenas 1 storage, se for 0 ou 2 superior não vai ter o bônus, aquele deixei MAIOR QUE... USE OUTRA STORAGE PRA EVITAR ERROS DO BÔNUS, RESETA AS STORAGES E VERIFIQUE NO BANCO DE DADOS SE ELAS REALMENTE FORAM APAGADAS -- Configurações local bonusStorage = 1000 -- Valor da storage para ativar o bônus local bonusHP = 500 -- Quantidade de HP do bônus function onLogin(cid) print("Player Login: " .. getPlayerName(cid)) local storageValue = getPlayerStorageValue(cid, bonusStorage) if storageValue == 1 then -- Verifica se o valor
  15. --Hi! --Buy Runes, Buy Potions e Buy Rings local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local options = { ['potions'] = { {name = 'ultimate mana poti
  16. Tente assim -- Configurações local bonusStorage = 1000 -- Valor da storage para ativar o bônus local bonusHP = 500 -- Quantidade de HP do bônus function onLogin(cid) print("Player Login: " .. getPlayerName(cid)) local storageValue = getPlayerStorageValue(cid, bonusStorage) if storageValue >= 1 then local previousHP = getCreatureHealth(cid) doCreatureAddHealth(cid, bonusHP) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou um bônus de " .. bonusHP .. " HP!") print("Bônus de HP aplicado par
  17. return true no final -- Configurações local bonusStorage = 1000 -- Valor do storage para ativar o bônus local bonusHP = 500 -- Quantidade de HP do bônus function onLogin(cid) if getPlayerStorageValue(cid, bonusStorage) == 1 then doCreatureAddHealth(cid, bonusHP) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou um bônus de " .. bonusHP .. " HP!") end return true end
  18. Storage 1000 coloca a q vc for usar no seu sistema, coloquei print screen pra identificar onde está puxando primeiro ao logar. -- Configurações local bonusStorage = 1000 -- Valor do storage para ativar o bônus local bonusHP = 500 -- Quantidade de HP do bônus function onLogin(cid) print("Player Login: " .. getPlayerName(cid)) if getPlayerStorageValue(cid, bonusStorage) == 1 then doCreatureAddHealth(cid, bonusHP) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou um bônus de " .. bonusHP .. " HP!") print("Bônus
  19. -- Configurações local bonusStorage = 1000 -- Valor do storage para ativar o bônus function onLogin(cid) local bonusActive = getPlayerStorageValue(cid, bonusStorage) == 1 if bonusActive then doCreatureAddHealth(cid, 500) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou um bônus de 500 HP!") end end
  20. Esse erro no item editor do OTServ 8.54, uma possível solução seria compilar o cliente com a mesma versão, porém utilizando uma signature diferente. Às vezes, existem clientes com as mesmas versões que possuem signatures diferentes. Por exemplo, você pode ter o cliente 8.54v1 e o cliente 8.54v2. Ao compilar o cliente com uma signature diferente, você pode resolver o problema com o item editor. Certifique-se de usar a versão correta do cliente para corresponder à signature usada durante a compilação.
  21. A cada 1 hora local config = { hourly = "yes", -- allow only one enter per hour? level = 100, storage = 30015, entry = { {x = 247, y = 659, z = 13}, {x = 247, y = 660, z = 13}, {x = 247, y = 661, z = 13}, {x = 247, y = 662, z = 13} }, destination = { {x = 189, y = 650, z = 13}, {x = 189, y = 651, z = 13}, {x = 189, y = 652, z = 13}, {x = 189, y = 653, z = 13} } } config.hourly = getBooleanFromString(config.hourly) function onUse(cid, item, f
  22. Cadê o arquivo script data/creaturescripts/scripts/custom/check_premium.lua ? Posta ai o código
  23. É possível que o problema esteja relacionado a uma má configuração da sprite de um item. Por exemplo, se a sprite estiver configurada de uma maneira no item editor e de outra maneira no cliente, podem ocorrer erros. É importante garantir que as configurações sejam consistentes e correspondentes.Uma sugestão para solucionar o problema é testar a abertura de um corpo sem loot. Isso significa verificar se é possível abrir um corpo de um monstro ou contêiner no jogo que não tenha itens dentro. Ao realizar esse teste, é possível identificar se o problema está relacionado especificamente à configura
  24. -- Configurações local bonusStorage = 1000 -- Valor do storage para ativar o bônus function onLogin(cid) local bonusActive = getPlayerStorageValue(cid, bonusStorage) == 1 if not bonusActive then doPlayerAddHealth(cid, 500) setPlayerStorageValue(cid, bonusStorage, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou um bônus de 500 HP!") end end
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo