Tudo que Storm postou
-
[DUVIDA] ERRO FUNÇÃO ONMOVEITEM
Isso está acontecendo porque você está errando alguma coisa na hora de editar os arquivos , cheque o tutorial e tente novamente. Também o que pode está ocorrendo é que o próprio dono do na oltand tópico errou em algo.
-
(Resolvido)adicionar effects
@Danxi Isso acontece porque ser servidor tem um limite de 255 effects . Para aumentar isso , terá que fazer sua source ler em uint_16.
-
Como adicionar algo na descrição do personagem.
@gabriel28 A função é doPlayerSetSpecialDescription(thing.uid, " Coloque aqui oq aparecerá no look." Exemplo de como usar ( Não testei a script ) function onLook(cid, thing, position, lookDistance) local t = { [32456] = "Aliado", -- [Storage] = look na description ( Certifique-se de que um player não tenha a mesma storage ) [34212] = "Rebelde", } if isPlayer(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(thing.uid) == 0 and "She" or "He").." are a ".. getPlayerVocation(thing.uid) .." and a ".. (t[getPlayerStorageValue(thing.uid)] == 1) ..".") return true end end
-
(Resolvido)Pontos para usar tal arma ou armadura.
@darcioantonio È por SKILL de sword ou por X quantidade de storages ? , enfim , fiz as duas. Por storage : -- <movevent type="Equip" itemid="id do item" slot="SLOT" event="script" value="item.lua"/> local storage,count = 21564, 20 -- Storage e suas quantidades function onEquip(cid, item, slot) if getPlayerStorageValue(cid, storage) < count then doPlayerSendTextMessage(cid, 13, "voce nao tem 20 pontos para equipar a sword") return false else doPlayerSendTextMessage(cid, 13, "Item Equipado") return true end end Por skill de sword : -- <movevent type="Equip" itemid="id do item" slot="SLOT" event="script" value="item.lua"/> function onEquip(cid, item, slot) local lvl = 20 -- skill minima para equipar if getPlayerSkillLevel(cid, 2) < lvl then doPlayerSendTextMessage(cid, 13, "voce nao tem 20 pontos para equipar a sword") return false else doPlayerSendTextMessage(cid, 13, "Item Equipado") return true end end
-
depois que o efeito terminar, executar uma linha.
local description = "Contains a %pokename." local seg = 3 -- segundos para sair o Som function onUse(cid, item, frompos, item2, topos) local name = getItemNameById(item2.itemid) if item.itemid == 2147 then -- POKEBALL catchrate = 300 oncatch = 24 onfail = 23 bolabola = 2222 elseif item.itemid == 2642 then -- GREATBALL catchrate = 400 oncatch = 198 onfail = 197 bolabola = 2651 elseif item.itemid == 2645 then -- SUPERBALL catchrate = 500 oncatch = 202 onfail = 201 bolabola = 2653 elseif item.itemid == 2146 then -- ULTRABALL catchrate = 600 oncatch = 200 onfail = 199 bolabola = 2220 elseif item.itemid == 2149 then -- MASTERBALL catchrate = 1500000 oncatch = 209 onfail = 187 bolabola = 11618 elseif item.itemid == 2644 then -- EXBALL(Saffari) catchrate = 450 oncatch = 204 onfail = 203 bolabola = 2655 end local rate = (catchrate) local catch = oncatch local fail = onfail local newid = bolabola for i,x in pairs(pokesCatch) do if getItemNameById(item2.itemid):find(i:lower()) then if getItemIdByName(name) == pokesCatch[i].corpse then if cid ~= getItemAttribute(item2.uid, "corpseowner") and isInArray({1,8}, getPlayerGroupId(cid)) then doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.") return true end doRemoveItem(item.uid, 1) doRemoveItem(item2.uid, 1) local pegar = math.random(1, x.chance) if pegar <= 1*(rate) then doSendMagicEffect(topos, catch) local nas = { ["%%pokename"] = i } for i,x in pairs(nas) do if description:find(i) then description = description:gsub(i, x) end end local function capturou(params) if not isCreature(params.cid) then return true end if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then doPlayerAddSoul(cid, 1) setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ") end if getPlayerFreeCap(cid) <= 0.99 then item = doCreateItemEx(newid-1) local pokelife = x.maxhealth doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "hp", pokelife) doItemSetAttribute(item, "maxhealth", pokelife) doItemSetAttribute(item, "description", params.description) doPlayerSendMailByName(getCreatureName(params.cid), item, 1) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..i.."!") doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.") else local pokelife = x.maxhealth item = doCreateItemEx(params.ball) doItemSetAttribute(item, "poke", params.poke) doItemSetAttribute(item, "nome", params.nome) doItemSetAttribute(item, "maxhealth", pokelife) doItemSetAttribute(item, "hp", pokelife) doItemSetAttribute(item, "description", params.description) doPlayerAddItemEx(params.cid, item, true) doTransformItem(item, newid) doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a "..i.."!") end --ALTERADO!!!!!!!!!!!!!!!!!! if getPlayerStorageValue(cid, 37013)==17 then if (getPlayerItemCount(cid, 2644)<1) then -- COLOCAR O ID DA SAFFARI BALL setPlayerStorageValue(cid, 37013, -1) doPlayerSendTextMessage(cid, 27, "Suas Saffari Balls acabaram... Até mais, volte sempre!") -- ACABARAM AS BALLS local goto = {x = 1066, y = 1489, z = 7} --LOCAL A SER TELETRANSPORTADO doTeleportThing(cid, goto) end end --ALTERADO!!!!!!!!!!!!!!!!!! if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178) else doSendMagicEffect(getThingPos(cid), 178) end end local description = "Contains a "..i.."." addEvent(capturou, 4000, {cid = cid, poke = i, nome = i, description = description, ball = 2219, letter = 2597}) else function ruim(params) if not isCreature(params.cid) then return true end doPlayerSendTextMessage(params.cid, 27, "Sorry, you didn\'t catch that pokemon.") --ALTERADO!!!!!!!!!!!!!!!!!! if getPlayerStorageValue(cid, 37013)==17 then if (getPlayerItemCount(cid, 2644)<1) then -- COLOCAR O ID DA SAFFARI BALL setPlayerStorageValue(cid, 37013, -1) doPlayerSendTextMessage(cid, 27, "Suas Saffari Balls acabaram... Até mais, volte sempre!") -- ACABARAM AS BALLS local goto = {x = 1066, y = 1489, z = 7} --LOCAL A SER TELETRANSPORTADO doTeleportThing(cid, goto) end end --ALTERADO!!!!!!!!!!!!!!!!!! if #getCreatureSummons(params.cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(params.cid)[1]), 166) else doSendMagicEffect(getThingPos(params.cid), 166) end end addEvent(ruim, 4000, {cid = cid}) doSendMagicEffect(topos, fail) addEvent(sendScreanSound, seg * 1000) end end end end return TRUE end
-
Modificação no script Hiraishin Kunai
@bismarkzika No tópico você não pediu que a Kunai desaparecesse , edite o tópico e coloque os detalhes que você quer porque ninguem é adivinha.
-
depois que o efeito terminar, executar uma linha.
@zangoosedoido Vou fazer um addEvent , pode me informar quantos SEGUNDOS dura o efeito ?
-
depois que o efeito terminar, executar uma linha.
Embaixo de doPlayerSendTextMessage(params.cid, 27, "Sorry, you didn\'t catch that pokemon.") Adicione sendScreanSound()
-
(Resolvido)!saga
Testo em meu próprio servidor , é problema de configuração seu. está 100%
-
Script de evento que acontece na hora X
@samuelandrade45 Confesso que tive ajuda e ainda tive trabalho -- <globalevent name="Terça" time="14:00" event="script" value="evento.lua"/> -- <globalevent name="Quinta" time="18:00" event="script" value="evento.lua"/> -- <globalevent name="Sabado" time="09:30" event="script" value="evento.lua"/> local day = "Tuesday", "Thursday","Saturday" -- em ingles function onTimer() if (os.date("%A") == config.day) then if math.random(1,3) == 1 then ExecuteCometa() elseif math.random(1,3) == 2 then ExecuteLuaCheia() elseif math.random(1,3) == 3 then ExecuteLunar() end return true end end function ExecuteCometa() local hora = 3 -- horas de duração do evento 1 local online = getPlayersOnline() for _, pid in pairs(online) do -- by xWhiteWolf if getPlayerVocation(pid) == 7 then doPlayerSetVocation(pid, 9) addEvent(doPlayerSetVocation, 1000 * 60 * 3, pid, 7) elseif getPlayerVocation(pid) == 8 then doPlayerSetVocation(pid, 9) addEvent(doPlayerSetVocation, 1000 * 60 * 3, pid, 8) end end doBroadcastMessage("O cometa sozin chegou ao mundo avatar, os dobradores de fogo tem o dano de suas dobras aumentadas em 50%", 17) return true end function ExecuteLuaCheia() local horaa = 3 -- horas de duração do evento 1 local onlini = getPlayersOnline() for _, pidd in pairs(onlini) do -- by xWhiteWolf if getPlayerVocation(pidd) == 1 then doPlayerSetVocation(pidd, 10) addEvent(doPlayerSetVocation, 1000 * 60 * horaa, pidd, 1) elseif getPlayerVocation(pidd) == 2 then doPlayerSetVocation(pidd, 10) addEvent(doPlayerSetVocation, 1000 * 60 * horaa, pidd, 2) end end doBroadcastMessage("A lua cheia chegou ao mundo avatar, os dobradores de agua tem o dano de suas dobras aumentadas em 50%", 17) return true end function ExecuteLunar() local horaaa = 3 -- horas de duração do evento 1 local onlinii = getPlayersOnline() for _, piddd in pairs(onlinii) do -- by xWhiteWolf if getPlayerVocation(piddd) == 7 then doPlayerSetVocation(piddd, 11) addEvent(doPlayerSetVocation, 1000 * 60 * horaaa, piddd, 7) elseif getPlayerVocation(piddd) == 8 then doPlayerSetVocation(piddd, 11) addEvent(doPlayerSetVocation, 1000 * 60 * horaaa, piddd, 8) elseif getPlayerVocation(piddd) == 1 then doPlayerSetVocation(piddd, 12) addEvent(doPlayerSetVocation, 1000 * 60 * horaaa, piddd, 1) elseif getPlayerVocation(piddd) == 2 then doPlayerSetVocation(piddd, 12) addEvent(doPlayerSetVocation, 1000 * 60 * horaaa, piddd, 2) end end doBroadcastMessage("O eclipe lunar chegou ao mundo avatar, os dobradores de fogo e agua tem o dano de suas dobras reduzidas em 50%", 17) return true end
-
(Resolvido)Global Storage
local Online = getPlayersOnline() -- Retorna uma Tabela local storage,value = 2442, 1 for pid = 1, #Online do setPlayerStorageValue(Online[pid], storage, value) end Ou setGlobalStorageValue(valueid, newvalue)
-
[Ajuda] Impossível criar cliente próprio
@Administrador de Nto Consertei o client. Tibia.exe
-
(Resolvido)!saga
-- <talkaction words="!saga; /saga; /transformar; !transformar" event="script" value="saga.lua"/> local saga = { [1] = {840,91,841,676,842,40,842,40,305,677,686,179,683,397,607,752,875}, -- [ID DA VOC] = { ID DAS NEWTYPES }, } local level = 5 -- Limite para liberar uma saga nova function onSay(cid, words, param, channel) if exhaustion.check(cid, 120) == TRUE then doPlayerSendCancel(cid, "You are exhausted.") doSendMagicEffect(getCreaturePosition(cid), 3) return TRUE end if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") exhaustion.set(cid, 120, 0.5) return true end if not saga[getPlayerVocation(cid)] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce nao pode trocar de saga.") exhaustion.set(cid, 120, 0.5) return true end local t = string.explode(param, ",") if(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Could not understand.") return true end if not (tonumber(t[1])) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o número da saga que você deseja.") exhaustion.set(cid, 120, 0.5) return true end if tonumber(t[1]) > #saga[getPlayerVocation(cid)] or tonumber(t[1]) < 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Essa saga não existe.") exhaustion.set(cid, 120, 0.5) return true end if getPlayerLevel(cid) >= (tonumber(t[1])*level) then doCreatureChangeOutfit(cid, {lookType = saga[getPlayerVocation(cid)][tonumber(t[1])]}) doSendMagicEffect(getThingPos(cid), saga[getPlayerVocation(cid)].effect) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce escolheu uma nova saga!") doPlayerSay(cid, "Saga!!", TALKTYPE_ORANGE_1) exhaustion.set(cid, 120, 0.5) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, você precisa de level "..(tonumber(t[1]) * level).." usar essa saga.") end return true end
-
[PEDIDO] aparecer itens aleatórios no mapa
-- <globalevent name="randomitem" interval="1800000" event="script" value="random.lua"/> local pos = { {x=94, y=130, z=7}, {x=94, y=131, z=7}, {x=94, y=133, z=7}, {x=94, y=135, z=7}, } local count = 10 -- quantos itens irao aparecer no tile. local itemid = 2160 function onThink(interval) doCreateItem(itemid, count, pos[math.random(#pos)]) return true end
-
[PEDIDO] aparecer itens aleatórios no mapa
@seminu Essa X quantidade de itens , seria itens diferentes ou apenas um item com X quantidade de itens ?
-
how can add storage exaust to this script?
function onUse(cid, item, fromPosition, itemEx) local storage = 347356 local hours = 24 -- Hours with storage local player = Player(cid) if not player then return true end pos1 = {x = 33201, y = 31475, z = getCreaturePosition(cid).z} pos2 = {x = 33200, y = 31475, z = getCreaturePosition(cid).z} pos3 = {x = 33199, y = 31475, z = getCreaturePosition(cid).z} pos4 = {x = 33198, y = 31475, z = getCreaturePosition(cid).z} pos5 = {x = 33197, y = 31475, z = getCreaturePosition(cid).z} if(isPlayer(getTopCreature(pos1).uid)) and getPlayerStorageValue(getTopCreature(pos1).uid, storage) == -1 then if(isPlayer(getTopCreature(pos2).uid)) and getPlayerStorageValue(getTopCreature(pos2).uid, storage) == -1 then if(isPlayer(getTopCreature(pos3).uid)) and getPlayerStorageValue(getTopCreature(pos3).uid, storage) == -1 then if(isPlayer(getTopCreature(pos4).uid)) and getPlayerStorageValue(getTopCreature(pos4).uid, storage) == -1 then if(isPlayer(getTopCreature(pos5).uid)) and getPlayerStorageValue(getTopCreature(pos5).uid, storage) == -1 then doSummonCreature("the lord of the lice", {x=33217, y=31454, z=12}) item:transform(item.itemid == 9825 and 9826 or 9825) doTeleportThing(getTopCreature(pos1).uid, {x = 33208, y = 31434, z = 12}) setPlayerStorageValue(getTopCreature(pos1).uid, storage + os.time + hours * 3600000, 1) else doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours") end else doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours") end else doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours") end else doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours") end else doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours") end return true end
-
Modificação no script Hiraishin Kunai
Código editado.
-
Como eu coloco essa Door no meu ot?
@neighbourhood Se o player tiver indo do lado oposto , a porta mandaria para qual posição ?
-
[PEDIDO] NASCE OUTRO MONSTRO APÓS MATAR
@Andreeyyy Não entendi muito bem esse atributo de summon boss , o que seria isso ?
-
Modificação no script Hiraishin Kunai
function onUse(cid, item, fromPosition, itemEx, toPosition) local itemid = 13245 -- Id do item que sera criado na pos local pos = fromPosition local aqui = getPlayerPosition(cid) local vocs = {6, 10} local agua = {4610, 4612, 4611, 4664, 4613, 4666, 4646, 4654, 4609, 4665, 4608, 4625, 4665, 4666, 4645} local parede = {1030, 1029, 1025, 1026, 1027, 1259, 1028, 1032, 1034, 1033, 1536, 1533, 873, 919, 874, 1037, 2700, 2708, 4472, 4475, 4471, 3388, 3373, 3363, 3398, 3408, 3417, 3420, 3407, 3368, 2701, 5130, 6170, 6166, 1596, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422} local pedra = {874, 919, 873, 2707, 2784, 2778, 3330, 4471, 4475, 4473, 4472, 4474, 4468, 4478, 4469, 4470, 4479, 2703, 2704, 1534, 2739, 3867, 5324, 5316, 5315, 5317, 1600, 1597, 1601} if getDistanceBetween(aqui, toPosition) >= 8 then return doPlayerSendTextMessage(cid, 27, "muito longe.") elseif(not(isSightClear(aqui, toPosition, 1))) then return doPlayerSendTextMessage(cid, 27, "Isso é impossivel.") elseif(getTilePzInfo(aqui)) then return doPlayerSendCancel(cid, "nao pode usar a tecnica em casas ou areas protegidas.") elseif(getTilePzInfo(toPosition)) then return doPlayerSendCancel(cid, "nao pode usar a tecnica Deus Dragão em casas ou areas protegidas.") elseif(isInArray(agua, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em agua") elseif(isInArray(parede, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em paredes") elseif(isInArray(pedra, itemEx.itemid)) then return doPlayerSendTextMessage(cid, 27, "voce nao pode usar em pedras") elseif(not(isInArray(vocs, getPlayerVocation(cid)))) then return doPlayerSendTextMessage(cid, 27, "Desculpe, Apenas Minato e Tobirama podem usar a tecnica.") end if(doTeleportThing(cid, toPosition, false)) then doSendMagicEffect(pos, 186) doSendMagicEffect(toPosition, 186) doCreateItem(itemid, 1, toPosition) doCreatureSay(cid, "Shunshin", 19) return doSendDistanceShoot(pos, toPosition, 16) end return doPlayerSendCancel(cid, "Desculpe nao foi possivel.") end
-
(Resolvido)Como que eu coloco para o pokemon que eu adicionei
Remove esse ' id server' , deixe apenas o ID do corpo morto.
-
(Resolvido)Como que eu coloco para o pokemon que eu adicionei
@lassdarck lib/configuration.lua e dê CTRL + F e procure por ' pokecatches '
-
Modificação no script Hiraishin Kunai
@bismarkzika Essa script , ao usar o item em uma posição ela teleporta o player ; pelo visto você quer uma script que marca o chão e possibilita que ele use o teletransporte para lá.
-
(Resolvido)Como que eu coloco para o pokemon que eu adicionei
Configure uma nova tabela em actions/scripts/catch.lua
-
[Help] Regarding Command Script (talkaction)
function onSay(cid) if creature:getCondition(cid, CONDITION_INFIGHT) then player:sendTextMessage(cid, 13, "You can only use the command without being in battle") return false end local player = Player(cid) local totalBlessPrice = getBlessingsCost(player:getLevel()) * 5 * 0.7 if(not(getCreatureCondition(cid, CONDITION_INFIGHT))) then if player:getBlessings() == 5 then player:sendCancelMessage("You already have been blessed!", cid) elseif player:removeMoney(totalBlessPrice) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been blessed by all of eight gods!") for b = 1, 5 do player:addBlessing(b, 1) end player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) else player:sendCancelMessage("You don't have enough money. You need " .. totalBlessPrice .. " to buy bless.", cid) end player:getPosition():sendMagicEffect(CONST_ME_POFF) else player:sendCancelMessage("You can't buy bless while you have battle time left.") end player:getPosition():sendMagicEffect(CONST_ME_POFF) end