Ir para conteúdo

zipter98

Herói
  • Total de itens

    2553
  • Registro em

  • Última visita

  • Dias Ganhos

    73

Tudo que zipter98 postou

  1. Actions. function onUse(cid, item, frompos, item2, topos) setPlayerStorageValue(cid,Storage,1) doPlayerSendTextMessage(cid, 27, "Você ganhou uma storage.") end
  2. zipter98

    npc roupa

    Só mudar a mensagem '-'
  3. zipter98

    npc roupa

    Tenta:
  4. O primeiro: function onSay(cid, words, param, channel) local stt = "" for i = 1, #getPlayersOnline() do local staff = getPlayersOnline()[i] if getPlayerGroupId(staff) >= 4 then if stt == "" then stt = getPlayerName(staff) else stt = stt..", "..getPlayerName(staff) end end end if stt ~= "" then doPlayerSendTextMessage(cid, 27, "Staff online: "..stt..".") else doPlayerSendCancel(cid, "Ninguém da staff on, no momento.") end return true end
  5. registerCreatureEvent(cid, "poketele") não precisa da outra tag.
  6. Registrou no login.lua? Ah, a tag deve ser assim: <event type="think" name="Tele" event="script" value="poketele.lua"/>
  7. local name = getCreatureName(cid) local a = name:gsub("_", "") local newMonster = doCreateMonster(a, pos) Com isso, vai retirar o símbolo desejado do nome (no caso, _). Se funcionar, e você pretender dar rep+, dê ao Akumah, e não a mim.
  8. Veja se dá o mesmo erro. Se der, avise. Eu mudei o que, ao meu ver, estava dando erro. Como estou de saída, na volta dou uma olhada melhor.
  9. Pra configurar a distância máxima entre pokémon e treinador, basta configurar no arquivo poketele.lua. [data/creaturescripts/scripts]. (caso seu servidor não tenha este arquivo, basta procurá-lo aqui no fórum) E pra deixar os shinies selvagens mais fortes, basta ir em data/lib/configuration.lua, e procurar pela configuração de status do pokémon. Por exemplo, do shiny marowak: ["Shiny Marowak"] = {offense = 8.8, defense = 10.2, specialattack = 9, vitality = 9.1, agility = 387, exp = 2136.4, level = 100, wildLvl = 370, type = "ground", type2 = "no type"}, Em wildLvl, você configura o lv desejado que o shiny selvagem tenha.
  10. zipter98

    TP SCROLL

    Testado, funcionando perfeitamente. function onUse(cid, item, topos, item2, frompos) local pos = {x = 696, y = 829, z = 7} --Coordenadas para onde o player será teleportado. local efeito = 12 function teleport_thing(cid, toPos, time, storage, cd) if isCreature(cid) then doPlayerSetNoMove(cid, true) addEvent(doTeleportThing, time*1000, cid, toPos) addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd) end return true end if getCreatureSkull(cid) >= 3 then return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end if getPlayerStorageValue(cid, 141029) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.") end local a = 10 for i = 1, 9 do a = a - 1 addEvent(doCreatureSay, i*1000, cid, "" ..a.."", TALKTYPE_ORANGE_1) addEvent(doSendMagicEffect, i*1000, getThingPos(cid), efeito) addEvent(doPlayerSetNoMove, 10*1000, cid, false) end teleport_thing(cid, pos, 10, 141029, 30) return true end
  11. zipter98

    TP SCROLL

    Tenta: function onUse(cid, item, topos, item2, frompos) local pos = {x = xxx, y = yyy, z = zzz} --Coordenadas para onde o player será teleportado. local efeito = 12 function teleport_thing(cid, toPos, time, storage, cd) if isCreature(cid) then addEvent(doTeleportThing, time*1000, cid, toPos) addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd) end return true end if getCreatureSkull(cid) >= 3 then return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end if getPlayerStorageValue(cid, 141029) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.") end local a = 10 for i = 1, 10 do a = a - 1 addEvent(doCreatureSay, i*1000, cid, "" ..a.."", TALKTYPE_ORANGE_1) addEvent(doSendMagicEffect, i*1000, getThingPos(cid), efeito) addEvent(doPlayerSetNoMove, i*1000, cid, false) doPlayerSetNoMove(cid, true) end teleport_thing(cid, pos, 10, 141029, 30) return true end
  12. data/movements, movements.xml <movevent type="StepIn" itemid="id do tile" event="script" value="nome do arquivo.lua"/> No lugar de id do tile, você coloca um ID que não esteja em uso no seu servidor. Então, basta ir no map editor, selecionar o tile desejado, e configurá-lo de acordo com o itemid que você colocou na tag; no lugar de nome do arquivo, você coloca o nome do arquivo .lua que passei acima.
  13. zipter98

    TP SCROLL

    function onUse(cid, item, topos, item2, frompos) local pos = {x = xxx, y = yyy, z = zzz} --Coordenadas para onde o player será teleportado. local efeito = 12 function teleport_thing(cid, toPos, time, storage, cd) if isCreature(cid) then addEvent(doTeleportThing, time*1000, cid, toPos) addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd) end return true end if getCreatureSkull(cid) >= 3 then return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end if getPlayerStorageValue(cid, 141029) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.") end local a = 10 for i = 1, 10 do a = a - 1 addEvent(doCreatureSay, i*1000, cid, "" ..a.."", TALKTYPE_ORANGE_1) addEvent(doSendMagicEffect, i*1000, getThingPos(cid), efeito) end teleport_thing(cid, pos, 10, 141029, 30) return true end Testado, funcionando perfeitamente. Basta configurar o que é indicado.
  14. zipter98

    TP SCROLL

    function onUse(cid, item, topos, item2, frompos) local pos = {x = xxx, y = yyy, z = zzz} --Coordenadas para onde o player será teleportado. function teleport_thing(cid, toPos, time, storage, cd) if isCreature(cid) then addEvent(doTeleportThing, time*1000, cid, toPos) addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd) end return true end if getCreatureSkull(cid) >= 3 then return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end if getPlayerStorageValue(cid, 141029) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.") end local a = 10 for i = 1, 10 do a = a - 1 addEvent(doCreatureSay, i*1000, cid, "" ...a..."", TALKTYPE_ORANGE_1) addEvent(doSendMagicEffect, i*1000, getThingPos(cid), 12) --No lugar de 12, coloque o efeito desejado. end teleport_thing(cid, pos, 10, 141029, 30) return true end
  15. Tenta assim: function onStepIn(cid, item, position, fromPosition) local flag = 0 local pos = {x = xxx, y = yyy, z = zzz} --Para onde o player será teleportado. for i = 12252, 12259 do if getPlayerItemCount(cid, i) >= 1 then flag = flag + 1 end end if flag == 8 then doTeleportThing(cid, pos) doSendMagicEffect(getThingPos(cid), 21) else doPlayerSendCancel(cid, "Você precisa de todas as insígnias para passar por aqui.") doTeleportThing(cid, fromPosition) end return true end A tag, você sabe fazer?
  16. Sobre esse NPC de task diária, foi algo que eu já tentei criar, mas faz um tempo já. E, como você deve imaginar, não funcionou e.e Sobre onde colocar essa proteção que passei, é abaixo do doPlayerSendCancel(cid, "Your ditto is not transformed.") markPos(mysum, unfix) return true end
  17. zipter98

    TP SCROLL

    Fiz correndo aqui, qualquer erro, só postar. function onUse(cid, item, topos, item2, frompos) local pos = {x = xxx, y = yyy, z = zzz} --Coordenadas para onde o player será teleportado. function teleport_thing(cid, toPos, time, storage, cd) if isCreature(cid) then addEvent(doTeleportThing, time*1000, cid, toPos) addEvent(setPlayerStorageValue, time*1000, cid, storage, os.time () + cd) end return true end if getCreatureSkull(cid) >= 3 then return doPlayerSendCancel(cid, "Você não pode usar este item enquanto está PK.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end if getPlayerStorageValue(cid, 141029) > os.time () then return doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, 141029) - os.time ().." para se teleportar novamente.") end local a = 10 for i = 1, 10 do a = a - 1 addEvent(doPlayerSendTextMessage, i*1000, cid, 27, "Você será teleportado em "..a.." segundo(s).") end teleport_thing(cid, pos, 10, 141029, 30) return true end
  18. Foi mal, tinha esquecido de colocar uma coisa e.e Testado, funcionando perfeitamente! if string.find(getCreatureName(item2.uid), "Shiny") or string.find(getCreatureName(item2.uid), "shiny") then doPlayerSendCancel(cid, "Seu Ditto não pode se transformar em pokémons shinies.") markPos(mysum, unfix) return true end
  19. zipter98

    /Name

    Tenta assim, fica rapidin: function onSay(cid, words, param, channel) local p = string.explode(param, ',') local item_id = 2145 local item_count = 1 --Mude aqui a qnt de diamonds q vai remover do player. local proibido = {"tutor", "gm", "cm", "god", "mapper", "scripter", "programador", "spriter", "account manager", "character"} -- simbolos proibidos if(param == "") then doPlayerSendCancel(cid, "Command requires param.") return true end if getPlayerItemCount(cid, item_id) <= 4 then return doPlayerSendCancel(cid, "vc precisa de 5 diamonds.") end if(string.find(param:lower(), "[^%l%s]") ~= nil) then doPlayerSendCancel(cid, 20, "Voce nao pode usar simbolos no nome.") return TRUE end if getPlayerGroupId(p[1]) >= 3 then return doPlayerSendCancel(cid, "Você não pode alterar o nick de tutores, GMs, Subs e GODs.") end if(db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(p[1]) .. ";"):getID() == -1) then return doPlayerSendCancel(cid, "Sorry, but player [" .. p[1] .. "] does not exist.") elseif(isPlayerBanished(p[1], PLAYERBAN_LOCK)) then return doPlayerSendCancel(cid, "Sorry, but " .. p[1] .. " is name locked.") elseif(db.getResult("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(p[2]) .. ";"):getID() == 1) then return doPlayerSendCancel(cid, "Sorry, but the name [" .. p[2] .. "] already exists.") end doPlayerRemoveItem(cid, item_id, item_count) db.executeQuery("UPDATE `players` SET `name` = '" .. p[2] .. "' WHERE name = '" .. p[1] .. "';") doPlayerSendTextMessage(cid, 20, "You have changed " .. p[1] .. "'s name to " .. p[2] .. " You will be logged out in 5 seconds.") addEvent(doRemoveCreature, 5*1000, cid, true) return true end
  20. Muito obrigado pela informação, Maenilse e Oneshot (só não dou rep+ no momento, porque atingi meu limite de reputações positivas diárias )! Editei o código acima com essa função, espero que agora esteja tudo correto.
  21. Ah, entendi. A maneira de usar o doPlayerSetPromotionLevel(cid, promotion) é a mesmo do setvocation? (cid, id da vocação)?
  22. zipter98

    Livro de p.a

    data/movements/scripts. Tentou o script que passei acima? Usei como base uma talkaction que adiciona VIP do sistema do Mock.
  23. Qual o servidor que você utiliza? PDA by slicer, by bolz? Poderia informar? Talvez seja alguma coisa adicionada pela pessoa que editou o server, que tenha bugado o broke count system.
  24. Oneshot, poderia dizer qual a diferença entre essas duas funções? Possibilidade de bug sobre o primeiro? Alguma limitação?
  25. Tentei fazer uma coisa aqui, não sei se vai funcionar. Suponho que as tags, você já saiba. Spell: function onCastSpell(cid, var) local config = { [2] = {level = 15, newvoc = 18, outfit = 125, eff = 59}, [18] = {level = 200, newvoc = 2, outfit = 144, eff = 59} } trans = config[getPlayerVocation(cid)] if not trans then doPlayerSendCancel(cid, "You can not transform.") return false elseif getPlayerLevel(cid) >= trans.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You not level " .. trans.level .. " to transform.") end doSetCreatureOutfit(cid, {lookType = trans.outfit}, -1) doPlayerSetPromotionLevel(cid, 1) doSendMagicEffect(getCreaturePosition(cid), trans.eff) doPlayerSendCancel(cid, "You Transformed!") setPlayerStorageValue(cid, 102913, 1) return true end Creaturescript: function onLogin(cid) if getPlayerStorageValue(cid, 102913) >= 1 then doPlayerSetPromotionLevel(cid, 0) setPlayerStorageValue(cid, 102913, -1) else return true end return true end O que eu fiz, foi simplesmente setar uma storage no player ao usar a spell. Ai, quando ele logar/relogar, caso tenha esta storage, será setado nele a vocation Druid (não esqueça de configurar o ID dela na variável voc_id).
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...