Solutions
-
FlavioHulk's post in (Resolvido)[Pedido] Item que Teleporta was marked as the answeractions.xml
<action itemid="ID do item" script="CaminhoDoScript.lua" /> actions/script.lua
local tpPos = Position(33130, 32660, 7) -- Nova Posição function onUse(player, item, fromPosition, target, toPosition, isHotkey) player:teleportTo(tpPos) item:remove(1) return true end
-
FlavioHulk's post in (Resolvido)Script quest que da mount was marked as the answerfunction onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:hasMount(23) then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_INFO_DESCR, "You already have this mount.") return true end player:addMount(23) -- Id da Mount player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) player:say('You received Armoured War Horse.', TALKTYPE_ORANGE_1) return true end
-
FlavioHulk's post in (Resolvido)[PEDIDO] Promotion Free was marked as the answerEm npc/lib/npcsystem no arquivo modules.lua...
troque a função StdModule.promotePlayer, por essa abaixo
function StdModule.promotePlayer(cid, message, keywords, parameters, node) local npcHandler = parameters.npcHandler if not npcHandler then error("StdModule.promotePlayer called without any npcHandler instance.") end if not npcHandler:isFocused(cid) then return false end local player = Player(cid) local promotion = player:getVocation():getPromotion() if player:getStorageValue(STORAGEVALUE_PROMOTION) == 1 then npcHandler:say("You are already promoted!", cid) elseif player:getLevel() < parameters.level then npcHandler:say("I am sorry, but I can only promote you once you have reached level " .. parameters.level .. ".", cid) elseif not player:removeMoney(parameters.cost) then npcHandler:say("You do not have enough money!", cid) else npcHandler:say(parameters.text, cid) player:setVocation(promotion) player:setStorageValue(STORAGEVALUE_PROMOTION, 1) end npcHandler:resetNpc(cid) return true end
-
FlavioHulk's post in (Resolvido)script de skills por stages para otserv 10.00 e 11.00 was marked as the answerCréditos ao Ninja do otland, né?
-
FlavioHulk's post in (Resolvido)Ajuda com script para boss was marked as the answerTag XML: Adicionar em creaturescripts.xml
<event type="kill" name="nomedoevento" script="nomedoscript.lua" /> Adicionar nome do evento em creaturescripts/others/login.lua, na tabela de events
Script Lua: Adicionar na pasta scripts em creaturescripts
local monster = 'nome do monstro' -- coloque o nome todo minusculo local storage = 63567 -- valor da Storage local msg = 'mensagem que ira aparecer' -- Configure a gosto function onKill(creature, target) local targetMonster = target:getMonster() if not targetMonster then return true end if targetMonster:getName():lower() ~= monster then return true end local player = creature:getPlayer() player:setStorageValue(storage, 1) player:sendTextMessage(MESSAGE_INFO_DESCR, msg) return true end Tag XML: Adicionar em actions.xml
<action actionid="63567" script="nomedoarquivo.lua" /> Script Lua: Adicionar na pasta scripts em actions
local config = { storage = 63567, -- ID da storage pos = Position(31821, 31918, 15) -- Posição que o jogador vai ser teletransportado } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid ~= 63567 then return false end if player:getStorageValue(config.storage) < 1 then player:sendCancelMessage("You need kill the boss.") return true end player:teleportTo(config.pos) return true end
-
FlavioHulk's post in (Resolvido)Erro na database mysql was marked as the answerPode fechar aqui, problema já resolvido..
Era a pasta schemas que estava causando isso, e apenas fiz troca-la
rep+ para Rusherzin por ter me ajudado..