
Solutions
-
Wakon's post in (Resolvido)Ring Adicional Mana was marked as the answerScript para aumentar a vida, somente para Knight e Paladin:
TAG's:
Ring para aumentar mana, somente para mages:
TAG's:
Se der algum problema, me avise.
-
Wakon's post in (Resolvido)Ajuda Goto somente sem batle was marked as the answerNão entendi muito bem seu pedido, creio que seja isso:
function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local creature = getCreatureByName(param) local player = getPlayerByNameWildcard(param) local waypoint = getWaypointPosition(param) local tile = string.explode(param, ",") local pos = {x = 0, y = 0, z = 0} if getPlayerAccess(cid) < 5 and getCreatureCondition(player, CONDITION_INFIGHT) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't teleport to a player with battle status.") and doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end if(player ~= nil and (not isPlayerGhost(player) or getPlayerGhostAccess(player) <= getPlayerGhostAccess(cid))) then pos = getCreaturePosition(player) elseif(creature ~= nil and (not isPlayer(creature) or (not isPlayerGhost(creature) or getPlayerGhostAccess(creature) <= getPlayerGhostAccess(cid)))) then pos = getCreaturePosition(creature) elseif(type(waypoint) == 'table' and waypoint.x ~= 0 and waypoint.y ~= 0) then pos = waypoint elseif(tile[2] and tile[3]) then pos = {x = tile[1], y = tile[2], z = tile[3]} else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end pos = getClosestFreeTile(cid, pos, true, false) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot perform action.") return true end local tmp = getCreaturePosition(cid) if(doTeleportThing(cid, pos, true) and not isPlayerGhost(cid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Troque pelo seu teleportto.lua, localizado na pasta "Data/talkactions/scripts".
-
Wakon's post in (Resolvido)Npc Teleporta Ida e Volta was marked as the answerEm "Data/npc/scripts", copie e cole um arquivo.lua e renomeie para travelNew.lua, apague tudo e cole:
local t = { travelGo = {pos = {x = 160, y = 54, z = 7}, key = "hoenn"}, -- Aqui você coloca a posição de hoenn. travelBack = {pos = {x = 162, y = 54, z = 7}, key = "saffron"} -- E aqui você coloca a posição do npc e a mensagem que irá pedir para voltar. } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, t.travelGo.key) then selfSay('Deseja mesmo ir para '.. t.travelGo.key ..'?', cid) talkState[talkUser] = 1 elseif msgcontains(msg, t.travelBack.key) then selfSay('Deseja mesmo voltar para '.. t.travelBack.key ..'?', cid) talkState[talkUser] = 2 elseif msgcontains(msg, 'yes') then if talkState[talkUser] == 1 then doTeleportThing(cid, t.travelGo.pos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) elseif talkState[talkUser] == 2 then doTeleportThing(cid, t.travelBack.pos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agora em "Data/npc", copie e cole um arquivo.xml e renomeie para nomedonpc.xml, apague tudo e cole:
<?xml version="1.0" encoding="UTF-8"?> <npc name="NOMEDONPC" script="travelNew.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|! Deseja ir para o continente {hoenn} ou voltar para {saffron}?"/> </parameters> </npc> Ai você configura como preferir, deixei explicações no script para você saber o que mudar.
-
Wakon's post in (Resolvido)Npc de acordo com vocation was marked as the answerFiz um aqui pra você, espero que sirva, se der algum problema me avise.
Em "Data/npc/scripts", copie e cole um arquivo.lua e renomeie para vocTravel.lua, apague tudo e cole:
local cfg = { citys = { [1] = {pos = {x = 160, y = 43, z = 7}, name = "cidade1"}, [2] = {pos = {x = 160, y = 44, z = 7}, name = "cidade2"}, [3] = {pos = {x = 160, y = 45, z = 7}, name = "cidade3"}, [4] = {pos = {x = 160, y = 46, z = 7}, name = "cidade4"}, }, level = 10, keys = {'travel', 'viajar', 'sail', 'passage'} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local city = cfg.citys[getPlayerVocation(cid)] local vocName = getVocationInfo(getPlayerVocation(cid)).name if isInArray(cfg.keys, msg) then if getPlayerLevel(cid) >= cfg.level then if city then selfSay('Sua cidade principal sendo um '.. vocName ..' é a '.. city.name ..', deseja mesmo ir?', cid) talkState[talkUser] = 1 end else selfSay('Você ainda está muito fraco para viajar, volte aqui quando estiver level '.. cfg.level ..' ou mais.', cid) end elseif msgcontains(msg, 'yes') then if talkState[talkUser] == 1 then doTeleportThing(cid, city.pos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end elseif msgcontains(msg, 'no') then if talkState[talkUser] == 1 then selfSay('Tudo bem então, quando estiver interessado, venha falar comigo novamente.', cid) talkState[talkUser] = 0 end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em "Data/npc", copie e cole um arquivo.xml e renomeie para nomedonpc.xml, apague tudo e cole:
<?xml version="1.0" encoding="UTF-8"?> <npc name="NOMEDONPC" script="vocTravel.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|! Deseja {viajar} para sua cidade principal?"/> </parameters> </npc> A configuração é o seguinte, em citys você coloca o ID da vocação entre [] e na frente você coloca a posição para onde essa vocação será levada e o nome da cidade desse vocação.
Logo abaixo, tem o level necessário para passar e as mensagens para iniciar o diálogo de travel.
-
Wakon's post in (Resolvido)Runa ou item que copia outfit was marked as the answerÉ que eu coloquei o exemplo errado, você deve colocar true/false em letra minúscula.
Adicionei a opção de Premium, troque pelo atual:
local t = { remove = true, -- Remover o item ao usar? [true/false] copyAddons = true, -- Copiar addons ao usar? [true/false] storage = 34005, -- Não altere! exaust = 5, -- Delay para usar novamente em segundos. level = 70, -- Level mínimo para usar. notify = true, -- Avisar ao jogador alvo que ele teve sua outfit copiada? [true/false] premium = true -- Só jogadores premium podem utilizar o item? [true/false] } function onUse(cid, item, fromPos, itemEx, toPos) if not isPlayer(itemEx.uid) then return doPlayerSendCancel(cid, 'Você só pode usar em outros jogadores!') and doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif t.premium and not isPremium(cid) then return doPlayerSendCancel(cid, 'Você não é premium account.') and doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif getPlayerLevel(cid) < t.level then return doPlayerSendCancel(cid, 'Você precisa ser level '.. t.level ..' para copiar outfits.') elseif itemEx.uid == cid then return doPlayerSendCancel(cid, 'Você não pode usar em si mesmo.') and doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif getPlayerAccess(itemEx.uid) > 3 then return doPlayerSendCancel(cid, 'Você não pode copiar o outfit de membros da staff.') and doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end if getPlayerStorageValue(cid, t.storage) < os.time() then local o = getCreatureOutfit(itemEx.uid) if t.copyAddons then outfit = {lookType = o.lookType, lookHead = o.lookHead, lookBody = o.lookBody, lookLegs = o.lookLegs, lookFeet = o.lookFeet, lookAddons = o.lookAddons} else outfit = {lookType = o.lookType, lookHead = o.lookHead, lookBody = o.lookBody, lookLegs = o.lookLegs, lookFeet = o.lookFeet} end doCreatureChangeOutfit(cid, outfit) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_RED) doPlayerSendTextMessage(cid, 22, 'Você copiou o outfit do jogador '.. getPlayerName(itemEx.uid) ..'.') if t.notify then doPlayerSendTextMessage(itemEx.uid, 22, 'O jogador '.. getPlayerName(cid) ..' copiou seu outfit.') end setPlayerStorageValue(cid, t.storage, t.exaust + os.time()) else doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return doPlayerSendTextMessage(cid, 22, 'Aguarde '.. getPlayerStorageValue(cid, t.storage) - os.time() ..' segundo(s) para usar novamente!') end if t.remove then doRemoveItem(item.uid, 1) end return true end
-
Wakon's post in (Resolvido)Ajuda diferença de storage was marked as the answergetPlayerStorageValue retorna o valor da storage e setPlayerStorageValue define o valor da storage.
-
Wakon's post in (Resolvido)[Resolvido] Passar portal ganhar pokémon. was marked as the answerRetirei uma checagem desnecessária e adicionei uma função que faltava, teste agora:
local starterpokes = { ["Chinchar"] = {x = 1341, y = 989, z = 10}, ["Torchic"] = {x = 1343, y = 989, z = 10}, ["Cyndaquil"] = {x = 1034, y = 1024, z = 5}, ["Charmander"] = {x = 1347, y = 989, z = 10}, ["Turtwig"] = {x = 1351, y = 989, z = 10}, ["Treecko"] = {x = 1353, y = 989, z = 10}, ["Chikorita"] = {x = 1355, y = 989, z = 10}, ["Bulbasaur"] = {x = 1357, y = 989, z = 10}, ["Piplup"] = {x = 1361, y = 989, z = 10}, ["Mudkip"] = {x = 1363, y = 989, z = 10}, ["Totodile"] = {x = 1365, y = 989, z = 10}, ["Squirtle"] = {x = 1367, y = 989, z = 10}, ["Nosepass"] = {x = 231, y = 283, z = 3}, } local btype = "normal" local firstPos = {x = 48, y = 73, z = 7} -- Posição que será teleportado caso não tenha falado com o Professor Robert! function onStepIn(cid, item, fromPosition, itemEx, toPos) local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(toPos, b) then pokemon = a end end if pokemon == "" then return true end if getPlayerStorageValue(cid, 9658754) ~= 1 then sendMsgToPlayer(cid, 22, "Fale com o professor Robert para escolher sua cidade inicial primeiro!") doTeleportThing(cid, firstPos) return true end doPlayerSendTextMessage(cid, 27, "Voce tem o seu primeiro pokemon! Você tambem recebeu algumas pokeballs para ajuda lo em seu caminho.") doPlayerSendTextMessage(cid, 27, "Nao se esqueça de usar a sua pokedex em todos os pokemon desconhecidos!") addPokeToPlayer(cid, pokemon, 0, nil, btype, true) doPlayerAddItem(cid, 1748, 10) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return true end Não esqueça de configurar a firstPos, a explicação dela está no script!
-
Wakon's post in (Resolvido)Layout Gesior was marked as the answerEsta é uma mensagem automática, este tópico foi movido para a área correta.
Regras do fórum: http://www.tibiaking.com/forum/topic/1281-regras-gerais/#comment-7680
Este tópico foi movido:
De: WebSites OTServ > OTServ > Tutoriais de Websites
Para: Suporte OTServ > OTServ > Suporte de WebSites
-
Wakon's post in (Resolvido)NPC de conversação. was marked as the answerAbra o programa, clique em "keywords", marque a caixinha "This NPC uses keywords" e logo abaixo você coloca a pergunta em "keyword" e a resposta em "response".
-
Wakon's post in Não posso ver conteudo do tibiaking was marked as the answerEsse tópico foi enviado a lixeira e por isso você não tem permissão para visualizar, eu não sei por que foi enviado a lixeira e nem quem enviou.
O tópico não teve nenhuma resposta então não iria te ajudar em nada, crie um tópico na seção de suporte e aguarde até que alguém possa lhe ajudar.
-
Wakon's post in (Resolvido)[Pedido] Comando !tp was marked as the answerEm "Data/talkactions/scripts", arquivo.lua:
function onSay(cid, words) if getCreatureCondition(cid, CONDITION_INFIGHT) == false then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Você não pode teleportar em batalha.') end return true end Em "Data/talkactions", no arquivo talkactions.xml:
<talkaction words="!tpTemplo" event="script" value="tpTemplo.lua"/>
-
Wakon's post in (Resolvido)script npc simples was marked as the answerEm "Data/npc/scripts", arquivo.lua:
local t = { money = 10000, pos = {x = 160, y = 54, z = 7} } 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local msg = msg:lower(); if msgcontains(msg, 'the place of death') then if doPlayerRemoveMoney(cid, t.money) then doTeleportThing(cid, t.pos) selfSay('Boa sorte.', cid) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else selfSay('Você não tem '.. t.money ..' gold coins.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Em "Data/npc", arquivo.xml:
<?xml version="1.0" encoding="UTF-8"?> <npc name="NOMEDONPC" script="travelTest.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="128" head="17" body="54" legs="114" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Olá |PLAYERNAME|! Eu te levarei a melhor e maior quest por apenas 100kk, diga {The Place of Death} para entrar. MWAHAWAWAHWAWA!"/> </parameters> </npc> Configure o valor que será cobrado do player em money e a position que será levado após falar a msg necessária em pos.
-
Wakon's post in (Resolvido)[Dúvida] Outfit puro por quest was marked as the answerAltere quest="1" para o valor da storage citado na variável do script beggar.lua "config.storage".
-
Wakon's post in (Resolvido)Como Tirar Premium Pra Usar Promotion Free was marked as the answerJá tentou alterar no config.lua?
Procure por:
premiumForPromotion = true E altere true para false.
-
Wakon's post in (Resolvido)Clicar na estatua e teleportar was marked as the answerEm "OT/Data/actions", script.lua:
local cfg = { failpos = {x = 161, y = 55, z = 7}, -- Posição caso não tenha um dos requerimentos. pos = {x = 160, y = 54, z = 7}, -- Posição caso tenha todos os requerimentos. vocations = {1, 8}, -- ID's das vocations, separe por vírgulas! item = {2160, 10}, -- ID/count. level = 50 -- Level necessário. } function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(cfg.vocations, getPlayerVocation(cid)) then if getPlayerLevel(cid) >= cfg.level then if doPlayerRemoveItem(cid, cfg.item[1], cfg.item[2]) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, cfg.pos) else doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não tem os items necessários, consiga '.. cfg.item[2] ..' '.. getItemNameById(cfg.item[1]) ..' para passar.') doTeleportThing(cid, cfg.failpos) end else doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você precisa ser level '.. cfg.level ..' para passar.') doTeleportThing(cid, cfg.failpos) end else doSendMagicEffect(getThingPos(item.uid), CONST_ME_MAGIC_RED) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Apenas jogadores da vocação X ou X podem passar.') doTeleportThing(cid, cfg.failpos) end return true end Em actions.xml, adicione a tag:
<action uniqueid="XXXX" script="script.lua"/> Coloque o uniqueid XXXX na estatua e configure o script, caso dê algum erro, me avise :).
-
Wakon's post in (Resolvido)Comprar promotion talkaction !buypromotion ? was marked as the answerfunction onSay(cid, words, param) local vocs = { [1] = 5, -- master sorcerer [2] = 6, -- elder druid [3] = 7, -- royal paladin [4] = 8, -- elite knight } local newvoc = vocs[getPlayerVocation(cid)] local price = 20000 local level = 20 if getPlayerLevel(cid) < level then return doPlayerSendCancel(cid, 'Voce precisa ser level '.. level ..' comprar promotion'.) and true end if getPlayerPremiumDays(cid) >= 0 then if getPlayerMoney(cid) >= price then if vocs[getPlayerVocation(cid)] then doPlayerSetVocation(cid, newvoc) doPlayerRemoveMoney(cid, price) doPlayerSendCancel(cid, "Parabens voce foi promovido.") else doPlayerSendCancel(cid, "Voce nao pode ser promovido.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce nao tem dinheiro suficiente.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce precisa ser premium para usar esse comando.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end
-
Wakon's post in (Resolvido)Editar script de NPC por tempo was marked as the answerfunction onThink(interval, lastExecution, thinkInterval) local pos = {x=3145,y=3485,z=7} -- Local onde aparece o npc local npc = doCreateNpc("varkhal", pos ) -- Altere o (dalk) pelo nome do seu npc. local nMin = 60 -- tempo em minuto para o npc sumir. addEvent(doRemoveCreature, nMin*60*1000, npc) doBroadcastMessage('Varkhal apareceu na cidade, aproveite pois ele irá sumir em '.. nMin ..' minutos.') return true end
-
Wakon's post in (Resolvido)Ajuda com salas de tp's was marked as the answerPreencha a sala com protection zone, tire apenas dos locais que estão com os monstros.
Para retirar você seleciona a protection zone, segura o CTRL e clica no piso desejado.
-
Wakon's post in (Resolvido)Premium Tile (HELP) was marked as the answerfunction onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if item.actionid == 19456 and not isPremium(cid) then doTeleportThing(cid, fromPosition, TRUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não tem acesso Premium Account!") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Bem Vindo á Área Premium!") return true end
-
Wakon's post in (Resolvido)[PEDIDO] NPC com varias missões was marked as the answerEm "Data/npc/scripts", nome_do_arquivo.lua:
Em "Data/npc", nome_do_npc.xml:
Adicionei também um "info", ele diz a posição de cada irmão apartir da storage do jogador, se estiver na missão 2, diz a posição do irmão 2, se estiver na 1, a do irmão 1...
Se der algum problema me avise, espero que goste .
-
Wakon's post in (Resolvido)UTEVO MORT SCRIPT was marked as the answerVai na tag da spell em "Data/spells" e no arquivo spells.xml, remova:
casterTargetOrDirection="1" E adicione:
needtarget="1" Exemplo:
<instant name="Utevo Mort" words="utevo mort" lvl="16" mana="20" prem="1" range="6" needtarget="1" blockwalls="1" exhaustion="2000" needlearn="0" event="script" value="attack/summon.lua"> <vocation id="1"/> <vocation id="2"/> <vocation id="5"/> <vocation id="6"/> </instant> Fiz algumas alterações no script, não é necessário trocar pelo meu, troque apenas se lhe agradar:
function onTargetTile(cid, position) position.stackpos = 255 doConvinceCreature(cid, doCreateMonster("headcaptor", position, false)) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) return true end local arr = { {1, 0, 1}, {0, 2, 0}, {1, 0, 1}, } local removeTime = 1.0 --time to remove the clones local function removeCreatures(cid, creature) if isCreature(creature) == TRUE then doRemoveCreature(creature) end end function onTargetTile(cid, pos) local creature = doSummonCreature("headcaptor", pos) doCreatureAddMana(cid, -600) doCreatureSay(creature, "Utevo Mort!!", TALKTYPE_ORANGE_1) doConvinceCreature(cid, creature) addEvent(removeCreatures, removeTime * 1000, cid, creature) return true end local area, combat = createCombatArea(arr), createCombatObject() setCombatArea(combat, area) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile") function onCastSpell(cid, var) if #getCreatureSummons(cid) <= 0 then return doCombat(cid, combat, var) else return doPlayerSendCancel(cid, "You can't summon more creatures.") end return false end -
Wakon's post in (Resolvido)Remere's - Capacidade máxima? was marked as the answerNão lembro certo, mas acho que o limite é cerca de 60000x60000 ou mais.
Sobre a outra dúvida, não é necessário, em bases de poke tibia o PvP (livre) só funciona onde tem os tiles com pvp.
Selecione o pvp e passe nos locais onde você deseja que o pvp seja liberado.
-
Wakon's post in (Resolvido)AJUDA POR FAVOR premiumscroll was marked as the answerfunction onUse(cid, item, frompos, item2, topos) doPlayerAddPremiumDays(cid, 30) doPlayerSendTextMessage(cid, 20, "Voce recebeu 30 dias de VIP") doRemoveItem(item.uid, 1) return true end
-
Wakon's post in (Resolvido)Erro no mastermind potion was marked as the answerTenta assim:
local berserker = Condition(CONDITION_ATTRIBUTES) berserker:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) berserker:setParameter(CONDITION_PARAM_SKILL_MELEE, 5) berserker:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) local mastermind = Condition(CONDITION_ATTRIBUTES) mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000) mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3) mastermind:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) local bullseye = Condition(CONDITION_ATTRIBUTES) bullseye:setParameter(CONDITION_PARAM_TICKS, 30 * 60 * 1000) bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5) bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10) local config = { [7439] = berserker, [7440] = mastermind, [7443] = bullseye } function onUse(cid, item, fromPosition, itemEx, toPosition) local useItem = config[item.itemid] if not useItem then return true end local player = Player(cid) local vocations = {1, 2, 5, 6} if item.itemid == 7440 then if not isInArray(vocations, player:getVocation():getBase():getId()) then doPlayerSendTextMessage(cid, 18 ,'Only sorcerers and druids may drink this fluid.', TALKTYPE_MONSTER_SAY) return true end end local cStorage = player:getStorageValue(Storage.Achievements.PotionAddict) if cStorage < 100000 then player:setStorageValue(Storage.Achievements.PotionAddict, math.max(1, cStorage) + 1) elseif cStorage == 100000 then player:addAchievement('Potion Addict') player:setStorageValue(Storage.Achievements.PotionAddict, 100001) end player:addCondition(useItem) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) Item(item.uid):remove(1) return true end -
Wakon's post in (Resolvido)ALAVANCA SELL was marked as the answer"Data/actions/scripts", sellLever.lua:
local t = { coinId = 2157, -- ID da moeda. items = { [49555] = {itemID = 9971, count = 10, price = 5}, -- Aqui você coloca a uniqueID desejada, o item que irá comprar, quantidade e preço. [49556] = {itemID = 6527, count = 6, price = 15} } } function onUse(cid, item, position) if item.itemid == 1946 then doTransformItem(item.uid, 1945) else doTransformItem(item.uid, 1946) end local item = t.items[item.uid] if item then if doPlayerRemoveItem(cid, t.coinId, item.price) then doPlayerAddItem(cid, item.itemID, item.count) doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você comprou '.. item.count ..' '.. getItemNameById(item.itemID) ..' por '.. item.price ..' '.. getItemNameById(t.coinId) ..'.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não tem '.. item.price ..' '.. getItemNameById(t.coinId) ..'.') doSendMagicEffect(position, CONST_ME_POFF) end end return true end Em "Data/actions", no arquiivo actions.xml:
<action uniqueid="49555;49556" script="sellLever.lua"/> Ai é só ir adicionando as uniqueID no script e citando na tag, separando por ponto e vírgula ( ; ).