Ir para conteúdo

WillOliveira

Campones
  • Total de itens

    88
  • Registro em

  • Última visita

Tudo que WillOliveira postou

  1. Gostaria de um script de um npc que adicionasse o nome de players numa tabela e quando atingir o numero de 30 players na tabela não será possivel adicionar mais nada na tabela
  2. Na verdade não da pra fazer isso pelo map editor, no map editor você pode configurar apenas uma posição pra onde o teleport vai levar
  3. Fiz um script que teleporta o player pra cidade natal dele, espero que ajude. Coloque o uniqueid 2053 no teleport pelo map editor, o teleport tem que ser o de id 1387 (magic forcefield) Na pasta movements, em movements.xml adicione essa tag: <movevent type="StepIn" itemid="1387" event="script" value="pvptp.lua"/> Na pasta movements/scripts adicione o arquivo pvptp.lua com isso dentro: function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if item.uid ~= 2053 then return true end local cidades = 5 -- Aqui você coloca o numero de cidades do seu ot for t = 1, cidades do if getPlayerTown(cid) == t then doTeleportThing(cid, getTownTemplePosition(t)) end end end
  4. @SkyDarkyes Acho que até tem como, mas não fui eu que fiz o script, foi o Mock @luanluciano93 Se quer usar no login tem que ser pelo creaturescripts, tenta assim: <event type="login" name="Functions" event="script" value="functions.lua"/> function onLogin(cid) if getGlobalStorageValue(7056) > 0 then return true end setGlobalStorageValue(7056, 1) local k = getLuaFunctions() --- Create file content your server function list local file__ = io.open('Your Server Function List.txt','w') table.sort(k) for i=1,#k do if k[i] ~= "" then file__:write((i-1)..' - '..k[i]..'\n') end end file__:close() return true end function getLuaFunctions()-- by Mock local str = "" for f,k in pairs(_G) do if type(k) == 'function' then str = str..f..',' elseif type(k) == 'table' then for d,o in pairs(k) do if type(o) == 'function' then if f ~= '_G' and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..',' end elseif type(o) == 'table' then for m,n in pairs(o) do if type(n) == 'function' then if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..m.."," elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..',' end elseif type(n) == 'table' then for x,p in pairs(n) do if type(p) == 'function' then if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..x..',' elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..x..',' elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f..'.'..m..'.'..x..',' elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..'.'..x..',' end end end end end end end end end return string.explode(str,',') end Em login.lua antes do ultimo return true adicione isso: registerCreatureEvent(cid, "Functions") OBS: Não testei
  5. @luanluciano93 <action itemid="2561" event="script" value="other/functions.lua"/> Em itemid você coloca o id de um item qualquer, depois é só dar use nele
  6. Essa função é muito útil pra scripters, ela cria um arquivo .txt na pasta do ot (onde fica o .exe) com TODAS funções da distro, TODAS mesmo. function onUse(cid, item) local k = getLuaFunctions() --- Create file content your server function list local file__ = io.open('Your Server Function List.txt','w') table.sort(k) for i=1,#k do if k[i] ~= "" then file__:write((i-1)..' - '..k[i]..'\n') end end file__:close() return true end function getLuaFunctions()-- by Mock local str = "" for f,k in pairs(_G) do if type(k) == 'function' then str = str..f..',' elseif type(k) == 'table' then for d,o in pairs(k) do if type(o) == 'function' then if f ~= '_G' and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..',' end elseif type(o) == 'table' then for m,n in pairs(o) do if type(n) == 'function' then if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..m.."," elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..',' end elseif type(n) == 'table' then for x,p in pairs(n) do if type(p) == 'function' then if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..x..',' elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..x..',' elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f..'.'..m..'.'..x..',' elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..'.'..x..',' end end end end end end end end end return string.explode(str,',') end É só criar uma tag de um item qualquer e dar use nele e pronto, a lista está pronta. OBS: Acho que não tem necessidade de explicar como instala. Créditos: Mock e iuniX
  7. BananaFight GustavoCastilho Omega Blueheaven
  8. Provavelmente o script do !love deve estar na pasta talkactions, poste aqui o script e a tag do talkactions.xml
  9. @cmgabriel Ta errado esse script, não funcionaria, o correto seria assim: function onUse(cid, item, frompos, item2, topos) if getPlayerMagLevel(cid) == 24 then doPlayerSendTextMessage(cid, "Hmmm... Boiola") elseif getPlayerMagLevel(cid) == 25 then doPlayerSendTextMessage(cid, "Voce ja pode usar o Buff Kienzan") elseif getPlayerMagLevel(cid) == 50 then doPlayerSendTextMessage(cid, "Voce ja pode usar o buff Flash") elseif getPlayerMagLevel(cid) == 70 then doPlayerSendTextMessage(cid, "Voce ja pode usar o Buff Punch") elseif getPlayerMagLevel(cid) == 80 then doPlayerSendTextMessage(cid, "Voce ja pode usar o buff Explosion este e o seu ultimo Buff") elseif getPlayerLevel(cid) == 250 then doPlayerSendTextMessage(cid, "Voce ja esta preparado para fazer a Reborn Quest junte a sua party e DIVIRTA-SE") doPlayerAddItem(cid, itemid, 2) doBroadcastMessage("ESTA PREPARADO PARA FAZER A REBORN QUEST") end end Pra entender seu erro leia a aula 4, e pra entender o que as functions fazem leia a aula 7.
  10. Poste aqui o script do summon que eu tento te ajudar
  11. Esses ots de pokemon são feitos com muitas gambiarras nos scripts... Quer uma dica? Vá aprender um pouco sobre scripting e tente resolver o problema
  12. Quando o player colocar o outfit de looktype 372 vai aparecer uma animação sobre o player, não vejo nada de importante nisso
  13. Se quiser me manda seu skype por pm que eu tento te ajudar
  14. Da pra arrumar isso pelo Dat Editor mas explicar tudo por aqui é complicado, procure algum tutorial no forum
  15. A lista de comandos vai aparecer quando você digitar !commands ou /commands, se você estiver com o god vai aparecer todos os comandos incluindo os do god, mas se você estiver com um player normal vai aparecer só os comandos que um player pode usar. Tag talkactions.xml: <talkaction words="/commands;!commands" event="script" value="commands.lua"/> Script talkactions/scripts/commands.lua local config = { guildTalksEnabled = getBooleanFromString(getConfigValue('ingameGuildManagement')) } function onSay(cid, words, param, channel) local playerAccess, t = getPlayerAccess(cid), {} for i, talk in ipairs(getTalkActionList()) do if(not talk.hide and playerAccess >= talk.access) then local tmp = talk.words:sub(1, 1):trim() if((guildTalksEnabled or (talk.words ~= "!joinguild" and talk.words ~= "!createguild")) and (tmp == "!" or tmp == "/")) then table.insert(t, talk) end end end table.sort(t, function(a, b) return a.access > b.access end) local lastAccess, str = -1, "" for i, talk in ipairs(t) do local line = "" if(lastAccess ~= talk.access) then if(i ~= 1) then line = "\n" end lastAccess = talk.access end str = str .. line .. talk.words .. "\n" end doShowTextDialog(cid, 1948, str) return true end
  16. Tag creaturescripts.xml: <event type="kill" name="TpPoke" event="script" value="tppoke.lua"/> creaturescripts/scripts/tppoke.lua: local createpos = {x = 95, y = 122, z = 7} -- Aqui é a posição onde o teleport vai aparecer local topos = {x = 94, y = 129, z = 7} -- Aqui é a posição pra onde o teleport vai levar o player local pokemon = "Pikachu" -- Aqui é o nome do pokemon (tem que ser entre aspas) function onKill(cid, target, lastHit) if getCreatureName(target) == pokemon and getPlayerStorageValue(cid, 5558) < 1 then doCreateTeleport(1387, topos, createpos) doPlayerSetStorageValue(cid, 5558, 1) else return true end end Coloque isso no creaturescripts/scripts/login.lua antes do ultimo return true: registerCreatureEvent(cid, "TpPoke")
  17. Vê se funciona, não testei function onUse(cid, item, frompos, item2, topos) local useless = { [7635] = 100, [7634] = 75, [7636] = 30, [2260] = 15, } local us = useless[item2.itemid] if not us then return false end local x,money = item2.type,item2.type*us doRemoveItem(item2.uid) doPlayerDepositMoney(cid, money) doSendAnimatedText(getCreaturePosition(cid), "$"..money.."", 210) doSendMagicEffect(getCreaturePosition(cid), 7) doPlayerSendTextMessage(cid, 19, "You collapsed a "..x.." frask {"..getItemNameById(item2.itemid).."} and received {"..money.." gold coins}.") return true end
  18. WillOliveira

    Raid Automatica

    Em globalevents você pode fazer um script de uma invasão que aconteça no intervalo de x segundos, aqui vai um exemplo de uma invasão que acontece de 15 em 15 dias (2 vezes por mês): tag globalevents.xml: <globalevent name="invasion" interval="1296000" event="script" value="invasion.lua"/> globalevents/scripts/invasion.lua: local pos_invas = {x=94,y=128,z=7} -- Coordenada da invasão! (Basta configurar essa) local monster1 = "Vampire Bride" -- Boss que irá aparecer na invasão! local monster2 = "Vampire" -- Monstro de apoio que irá aparecer na invasão! local mensage1 = "A powerful vampire is invading the north of Carlin with intent to destroy everything!" -- 1º Mensagem da invasão! local mensage2 = "It seems not to reach monsters, come fight!" -- 2º Mensagem da invasão! function onThink(interval, lastExecution, thinkInterval) broadcastMessage(mensage1, MESSAGE_EVENT_ADVANCE) doSummonCreature(monster1, {x=pos_invas.x, y=pos_invas.y, z=pos_invas.z}) doSummonCreature(monster2, {x=pos_invas.x, y=pos_invas.y+3, z=pos_invas.z}) doSummonCreature(monster2, {x=pos_invas.x+2, y=pos_invas.y, z=pos_invas.z}) doSummonCreature(monster2, {x=pos_invas.x, y=pos_invas.y, z=pos_invas.z-5}) addEvent(broadcastMessage, 20*1000, mensage2, MESSAGE_EVENT_ADVANCE) end Na tag, em interval você coloca em segundos de quanto em quanto tempo a invasão vai acontecer, no caso coloquei 1296000 segundos que corresponde a 15 dias, ou seja, a invasão vai acontecer duas vezes por mês. OBS: Em algumas distros o interval é por milésimos.
  19. Qual sistema de vip você usa? E não entendi a ultima linha, o player fala "!addon barbarian" e ganha o que?
  20. Abra a pasta movements e em movements.xml adicione isso: <movevent type="StepIn" itemid="406" event="script" value="effect.lua"/> Na pasta movements/scripts adicione um script chamado effect.lua com isso dentro: function onStepIn(cid, item, position, fromPosition) doSendMagicEffect(position, 61) end
  21. qual o id do piso e qual é o efeito?
  22. Explica melhor isso ai, você quer 5 hits seguidos no target com o effect do exori san? Acho que posso fazer pra você
  23. @Slicer Dá pra encurtar esse script e corrigir o que o DrakyLucas falou: function onUse(cid, item) if getPlayerLevel(cid) <= 45 then doRemoveItem(item.uid) doPlayerAddItem(cid, 7834, 1) doPlayerSendTextMessage(cid, "Você ganhou 1 Fire Stone!") else doPlayerAddItem(cid, 7834, 2) doRemoveItem(item.uid) doPlayerSendTextMessage(cid, "VocÊ ganhou 2 Fire Stones!") end return true end @Roksas Achei um erro na aula 6, da uma olhada la
  • Quem Está Navegando   0 membros estão online

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