Ir para conteúdo

GuhPk

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    GuhPk recebeu reputação de Stefan em MAPA NARUTO   
    Olha ai site para alguns, baixa o server e pega o mapa!!!






  2. Gostei
    GuhPk recebeu reputação de GLIVINIS em Como deixar o Centro Pokemon uma área mais segura   
    Olá, eu sou GuhPk, e hoje venho trazer a você 1 tutorial básico de como deixar seu Centro Pokemon uma área mais segura!!!



    (Para que os player's não possam invocar pokemon's e nem usar skills la dentro)





    ==============================================================================================





    Primeiro




    Abra o mapa de seu Server com o Remere's Map Editor, vá até o seu cp, então ficara +/- assim:



    (não ligue pelos itens do meu bugado, é que eu estou usando o client diferente do server) =//










    Segundo




    Abaixo de sua Raw Pallete, tem uma lista de ícones, selecione um que tem a imagem de um escudo amarelo:










    Terceiro




    Agora é só pintar todo o piso do seu Centro Pokemon bem assim:




    Antes










    Depois










    Quarto




    Após você editar os CP's de todas as suas city's você salva o mapa novo e depois fecha!!!




    Para salvar va em: Flie > Save As... (ou aperte Ctrl+Alt+S)





  3. Gostei
    GuhPk deu reputação a Thayam em [TUTORIAL] Adicionando novos Pokémons em seu PDA com e sem Icon System   
    Boa noite meus amigos do TK!
     
    Hoje venho trazer uma vídeo aula que muitos me pediram sobre como adicionar novos pokémons no PDA que possui Icon System! (Funciona nos que não possuem Icon System tbm)
    É um esquema bem simples, porém detalhista.
    Basta seguir o passo a passo que você não terá problemas
     
     
    http://youtu.be/AUlpi33gsgk
     
    OBS: Desculpem, o vídeo ficou muito longo, mas acredito que para aqueles que estiverem com dúvidas, esse vídeo responderá quase tudo!
     
    Edit:
    Item Editor by EdMignari
     
     
    Edit 2.0:
    Esse é um vídeo do membro Dyego que será muito útil sobre como adicionar as sprites novas no seu Object Builder!Não deixem de conferir:
    https://www.youtube.com/watch?v=WInmtmNFjTQ
     
     
    Créditos:
    xandeloko (pyrus OT)
    Thayam (tutorial)
    Skytew (há algum tempo atrás me deu umas dicas de como fazer algumas dessas coisas)
    EdMignari (Item Editor usado no vídeo)
    Dyego (Vídeo sobre como Adicionar Sprites)
  4. Gostei
    GuhPk recebeu reputação de keven90 em MAPA NARUTO   
    Olha ai site para alguns, baixa o server e pega o mapa!!!






  5. Gostei
    GuhPk recebeu reputação de zero390 em MAPA NARUTO   
    Olha ai site para alguns, baixa o server e pega o mapa!!!






  6. Gostei
    GuhPk recebeu reputação de rudff em [Pedido] Lunus OT Server   
    Pessoal, estou criando meu server e queria muito usar como base o server Lunus!!!



    Já olhei na net e em vários outros fóruns e não achei nada... Alguns até falava que tinha o server, e quando eu baixava vinha só o cliente.



    Por favor se alguém tiver tenha a bondade de postar ai... Caso for postar de outro lugar, baixa primeiro para ver se é o server mesmo!! kkkkk'



    Valeu ai para todos e até mais...!!! '-'

  7. Gostei
    GuhPk recebeu reputação de PaulinhoAraujo em [Resolvido] Script Baú ~ Que precisa de item   
    Aquilo é em actions/scripts...
    Tag acho que é:


    <action actionid="xxxx" event="script" value="nomedoarquivo.lua"/>
  8. Gostei
    GuhPk deu reputação a Skyligh em Sistema De Advertência   
    Olá pessoal, venho lhes trazer um sistema, que por minha parte achei legal, feito por mim ele se chama Advertence System.
    Funciona basicamente em cima de advertências; que o player poderá receber caso uma ocasião aconteça. Só existem duas ocasiões até o momento, porque fiquei sem ideias de mais. Vamos ver(ler) um exemplo:

    Quote

    Um player coloca PremiumAccount em um ot(o seu ot), após o login dele ele recebera um item que terá uma imagem de uma Exclamação.
    Quando ele clicar nesse item(com o botão direito) será enviada uma mensagem para ele com a Advertência "Parabéns, você agora é premium account.".
    Há mais um ocasião em que o player pode e recebera uma advertência; quando ele for FreeAccount.

    Chega de Delongas e vamos ao que interessa.
    Crie um arquivo no diretório data/actions/scripts chamado(nomeado) advertenciaSystemAction.lua abra-o e cole o seguinte código dentro:


    function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, advertenceStorage) == 1 then doPlayerPopupFYI(cid, advertencia_Premium) doRemoveItem(item.uid, 1) elseif getPlayerStorageValue(cid, advertenceStorage) == 2 then doPlayerPopupFYI(cid, msgNotIsPremium) doRemoveItem(item.uid, 1) end end Agora abra o arquivo actions.XML encontrado no diretório data/actions e cole a tag a seguir: <action itemid="" script="advertenciaSystemAction.lua"/> Agora vamos em data/creaturescript/script e em seguida crie um arquivo chamado(nomeado) advertenciaSystemCreatureScript.lua e cole o seguinte código dentro: function onLogin(cid) doPlayerSendIconAdvertencia(cid, premium) doPlayerSendIconAdvertencia(cid, notpremium) return true end Agora vamos abrir o arquivo creaturescript.XML e colaremos a tag abaixo: <event type="login" name="advertenciaSystem" event="script" value="advertenciaSystemCreatureScript.lua"/> Agora vamos a parte final dos scripts, vá até a pasta data/lib e crie um arquivo chamado(nomeado) advertenciaSystemLib.lua e cole o seguinte código dentro: ----------- Mensagens de Advertencias ----------- advertencia_Premium = "Congrulations, you now is a player Premium." msgNotIsPremium = ""..getCreatureName(cid)..", you dont have a premium. You need buy! /n Go to WebSite this ot for more informations." ----------- Mensagens de Advertencias ----------- ----------- Configuração Gerais ----------- iconAdvertence = advertenceStorage = 8274 ----------- Configuração Gerais ----------- --[[ Tabela dos Tipos de Advertencias contidos nesta Versão 1.0 types = { ["premium"] ["notpremium"] } ]]-- function doPlayerSendIconAdvertencia(cid, type) if type == "premium" and getPlayerPremiumDays(cid) > 0 then doPlayerAddItem(cid, iconAdvertence, 1) setPlayerStorageValue(cid, advertenceStorage, 1) elseif type == "notpremium" and getPlayerPremiumDays(cid) < 1 then doPlayerAddItem(cid, iconAdvertence, 1) setPlayerStorageValue(cid, advertenceStorage, 2) end end end


    Agora vamos colocar a imagem do Ícone de Advertência em seu cliente.
    Programas necessários:
    Quote

    DatEditor 8.54-8.60
    ItemOtEditor 8.54-8.60
    Imagem do Icone.png




    Siga o tutorial abaixo a risca caso contrário será inútil sua tentativa.
    Abra o DatEditor com o seu cliente como na imagem abaixo:



    Depois de feito vá ate o botão no “FILE->New->Item” como na imagem abaixo:


    Anote o itemtype do novo item:





    Agora vá ao botão “Import->Sprites” e procure a imagem do Ícone que você salvou.


    Agora aperte a tecla “INSERT” do seu teclado e a sua imagem irá aparecer deste lado <<:


    Agora aperte “CTRL+S” para salvar e pronto a 1ª parte de adicionar o item ao seu ot esta completa. Vamos agora introduzir o item no item.XML, abra o ItemOtEditor com o item.OTB do seu ot. Após feito isso vá a “Other” e procure qualquer um dos últimos itens da mesma lista e selecione-o.

    Em “sid” você colocara o “itemtype” do DatEditor que lhe mandei gravar. Agora marque a opção “Pickupable” agora salve e pronto.

    Abra seu item.XML e cole a seguinte linha:
    <item id="idDoItemDaListaOther" article="a" name="Advertence Icon"></item>
    idDoItemDaListaOther = Nesta parte você coloca o id do item da lista other que você selecionou. Pegue este mesmo id e vá na lib colocalo lá.

    Uffffa Terminou...
    Espero que gostem, façam criticas e reportem bugs. Mais por favor reportem bugs e não erro de instalação. Quem quiser postar mais advertências podem me dizer que eu faço...

    Créditos:
    Formatação: SmiX
    Scripts: SmiX
    Tutorial: SmiX
  9. Gostei
    GuhPk deu reputação a Skyligh em [ACTIONS] Tm System -   
    Olá pessoal, venho hoje aqui para postar um sistema de pokemon muito procurado, o famoso, Tm System. Siga o tutorial a risca ou seu trabalho será invão.
    Quote
    Seu Funcionameto: Basícamente funciona assim; ele adiciona um "Attack" novo a um pokemon ou substitui um existente, dependendo da vontado do player.
    Versões testadas: Qualquer derivado do PDA
    http://www.havencrest.co.uk/images/page-divider 2.jpg
    Vamos ao que interessa, vá em actions.xml e cole a seguinte tag:
      <action itemid="id do item que será usado" event="script" value="tmSystem.lua"/> Atenção o item que será usado no system, não deve ter o attributo "Usable" ou você terá erros. Agora crie um arquivo em {data/actions/scripts} chamado tmSystem.lua e cole o seguinte script dentro:
      function onUse(cid, item, frompos, item2, topos) local tm = tmabilities local pokemon = getCreatureSummons(cid)[1] local slotball = getPlayerSlotItem(cid, 8).uid local tmname = getItemNameById(item2.itemid) local i = item2.itemid if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "Need pokemon to learn a "..tmname..".") end if getItemAttribute(slotball, "TM") == tmname then return doPlayerSendCancel(cid, "Your pokemon was learned this TM.") end if isInArray(tm[""..tmname..""], getPokemonName(pokemon)) then doPlayerSetVocation(cid, 49) openChannelDialog(cid) else doPlayerSendCancel(cid, "This TM not compatible in your pokemon.") end return true end http://www.havencrest.co.uk/images/page-divider 2.jpg Agora vamos em {creaturescripts.xml} e colaremos a seguinte tag:
      <event type="joinchannel" name="TmChoose" event="script" value="tmsys.lua"/> Agora crie o arquivo tmsys.lua em {creaturescripts/scripts} e cole isso dentro:
      [CODE] function onJoinChannel(cid, channelId, users, isTv) if getPlayerVocation(cid) == 49 then else return true end local summon = getCreatureSummons(cid)[1] local moves = movestable[getCreatureName(summon)] local n = 1 for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then n = n + 1 end end for b = 13, 23 do if channelId == b then local tm = tmabilities local pokemon = getCreatureSummons(cid)[1] local slotball = getPlayerSlotItem(cid, 8).uid local slotm = getPlayerSlotItem(cid, 9) local tmname = getItemNameById(slotm.itemid) if n >= channelId - 11 then doPlayerSendTextMessage(cid, 27, "Congralutions! Your "..getPokemonName(pokemon).." learn a new TM ("..tmname..").") doItemSetAttribute(slotball, "TM", tmname) doItemSetAttribute(slotball, "TMN", channelId - 11) doSendMagicEffect(getThingPosition(pokemon), 28) doSendMagicEffect(getThingPosition(pokemon), 29) doRemoveItem(slotm.uid) if useKpdoDlls then doUpdateMoves(cid) end else doPlayerSendCancel(cid, "Put tm on at last empty slot.") end return false end end return true end http://www.havencrest.co.uk/images/page-divider 2.jpgNesta parte você precisa de muita atenção, você terá que criar 10 channels como no modelo abaixo:
      <channel id="13" name="[Put on M1]"> <vocation id="49"/> </channel>   <channel id="14" name="[Put on M2]"> <vocation id="49"/> </channel> Em channel id você seguira a ordem 13 a 23, em vocations id pode deixar do jeito que esta. Agora crie uma vocation com o id 49 ou cole a seguinte tag no vocations.xml:
      <vocation id="49" name="TM" description="pokemon trainer" needpremium="0" gaincap="0" gainhp="55" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="2" club="2" sword="2" axe="2" distance="2" shielding="2" fishing="2" experience="1.1"/> </vocation> Imagem Postada http://www.havencrest.co.uk/images/page-divider 2.jpgAgora vamos em {data/lib} e crie um arquivo chamado tmSystem.lua e cole as seguintes linhas nele:
      tmabilities = { ["Solar Beam"] = {"Blastoise", "Venusaur", "Charizard"}, ["Fire Blast"] = {"Blastoise", "Venusaur", "Charizard"}, } Nesta parte você edita, para cada magia[""] = nome dos pokemons que poderam ter essa magia por tm. Tipo do jeito que esta ai, se você for tentar colocar um fire blast em um bulba não vai pegar.. Para adicionar mais magias, basta copiar a linha e colocar o nome da magia nova e seus respectivos pokemons. http://www.havencrest.co.uk/images/page-divider 2.jpg Preste atenção, para cada magia feita, terá que haver um item com o nome da magia. E o id deste item deve ser colocado na tag da actions. ou seja(exemplo): abra o item.xml pegue o item que deseje usar e coloque o nome "Solar Beam"(do mesmo jeito da lib), pegue o id dele e cole na tag da actions. Espero que tenham intendido está parte. http://www.havencrest.co.uk/images/page-divider 2.jpg A ultima parte da instalção, vamos em {data/talkactions/scripts} e abra o arquivo move1.lua e substitua a parte de "if it = 1" até o ultimo "end" antes da parte "if not move then":
      local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local myball = getPlayerSlotItem(cid, 8) if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!") return true end local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) if not p or #p <= 0 then return true end for a = 1, #p do if getItemAttribute(p[a], cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!") return true end end end function onSay(cid, words, param, channel) if param ~= "" then return true end if string.len(words) > 3 then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.") return 0 end --alterado v1.5 local mypoke = getCreatureSummons(cid)[1] if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end if getCreatureName(mypoke) == "Evolution" then return true end if getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto" then name = getPlayerStorageValue(mypoke, 1010) --edited else name = getCreatureName(mypoke) end --local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke) local it = string.sub(words, 2, 3) local move = movestable[name].move1 local cdzin = "move"..it.."" local slotball = getPlayerSlotItem(cid, 8).uid local tmname = getItemAttribute(slotball, "TM") if it == "2" then if getItemAttribute(slotball, "TMN") == 2 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move2 end elseif it == "3" then if getItemAttribute(slotball, "TMN") == 3 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move3 end elseif it == "4" then if getItemAttribute(slotball, "TMN") == 4 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move4 end elseif it == "5" then if getItemAttribute(slotball, "TMN") == 5 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move5 end elseif it == "6" then if getItemAttribute(slotball, "TMN") == 6 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move6 end elseif it == "7" then if getItemAttribute(slotball, "TMN") == 7 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move7 end elseif it == "8" then if getItemAttribute(slotball, "TMN") == 8 then move = {name = ""..tmname.."", level = 0, cd =15, dist = 0, target = 0} else move = movestable[name].move8 end elseif it == "9" then if getItemAttribute(slotball, "TMN") == 9 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move9 end elseif it == "10" then if getItemAttribute(slotball, "TMN") == 10 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move10 end elseif it == "11" then if getItemAttribute(slotball, "TMN") == 11 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move11 end elseif it == "12" then if getItemAttribute(slotball, "TMN") == 12 then move = {name = ""..tmname.."", level = 0, cd = 12, dist = 0, target = 0} else move = movestable[name].move12 end end if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end if getPlayerLevel(cid) < move.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.") return true end if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.") return true end if getTileInfo(getThingPos(mypoke)).protection then doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.") return true end if getPlayerStorageValue(mypoke, 3894) >= 1 then return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3 end --alterado v1.6 if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!") return true end --alterado v1.6 if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) and math.random(1, 100) <= 10 then local target = getCreatureTarget(cid) if isCreature(getMasterTarget(target)) then --alterado v1.6 doSendMagicEffect(getThingPos(target), 211) doSendAnimatedText(getThingPos(target), "TOO BAD", 215) doTeleportThing(target, getClosestFreeTile(target, getThingPos(mypoke)), false) doSendMagicEffect(getThingPos(target), 211) doFaceCreature(target, getThingPos(mypoke)) return true --alterado v1.6 end end if move.target == 1 then if not isCreature(getCreatureTarget(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.") return 0 end if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then return 0 end if getCreatureHealth(getCreatureTarget(cid)) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.") return 0 end if not isCreature(getCreatureSummons(cid)[1]) then return true end if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.") return 0 end if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then return 0 end end local newid = 0 if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.") return 0 else newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) end doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) local summons = getCreatureSummons(cid) --alterado v1.6 addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin) for i = 2, #summons do if isCreature(summons[i]) and getPlayerStorageValue(cid, 637501) >= 1 then docastspell(summons[i], move.name) --alterado v1.6 end end docastspell(mypoke, move.name) doCreatureAddCondition(cid, playerexhaust) if useKpdoDlls then doUpdateCooldowns(cid) end return 0 end Até que enfim.. Se fizeram tudo certo o sistema vai funcionar se não.... Caso não itendam alguma parte da explicação podem me perguntar por aqui...
    Creditos
    Smix
  10. Gostei
    GuhPk recebeu reputação de thiagobji em MAPA NARUTO   
    Olha ai site para alguns, baixa o server e pega o mapa!!!






  11. Gostei
    GuhPk deu reputação a Skyligh em Evento Labirinto   
    Iae , galera hoje trago um script meio diferente

    Um De Evento De Labirinto

    Irei Explicar O Evento Pra Quem Nao Sabe





    agora vamos ao script

    va em data / movements / scripts / ponha o nome de algum arquivo para labirinto.lua

    e adicione la


    function onStepIn(cid, item, pos) pos ={x=160, y=54, z=7} -- pos que o player vai voltar se n for lvl 50 if isPlayer(cid) then if getPlayerLevel(cid) == 40 then -- ponha o numero que vai passar pelo piso doTeleportThing(cid,pos) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você Nao E Lvl 40") end return true end end dps em movements.xml <movevent type="StepIn" uniqueid="4710" event="script" value="labirinto.lua"/> agora em data / talkactions / scripts / e ponha o nome de algum arquivo para labirinto.lua function onSay(cid, words, param) local pos = {x=1017 , y=1020 , z=7} -- onde o item sera removido local pos = {x=1017 , y=1021 , z=7} -- onde o item sera removido local pos = {x=1017 , y=1022 , z=7} -- onde o item sera removido if words=="!openevento" then broadcastMessage("Evento De Labirinto Esta Aberto" , 22) return TRUE end if words=="!closeevento" then doRemoveItem(getThingfromPos(pos).uid,1) end return TRUE end dps em talkactions.xml <talkaction log="no" words="!closeevento;!openevento" access="5" event="script" value="labirinto.lua"/>

    Download do map
    http://speedy.sh/r9xUu/labirinto.otbm

    Print do map


    Créditos
    Skyligh 80 % (Por criar o script do movements e edita o talkaction , ideia , mapa)
    smartbox 20 % (por criar o do talkaction)

    Gostou ? rep+
  12. Gostei
    GuhPk recebeu reputação de Skyligh em (RESOLVIDO) [AJUDA] Talkaction BP e Action GP   
    Cara, segunda sei se tem como não, mas vai ai a 1ª!!!

    Va em data/talkactions/scripts copia 1 arquivo, renomeie para nome-do-arquivo.lua, e dentro apague tudo e cole isso:



    function onSay(cid, words, param, channel) local dinheiro = 1000000 -- quanto vai custar o item local recompensa = 2548 -- id do item que será vendido if doPlayerRemoveMoney(cid, dinheiro) then doPlayerAddItem(cid, recompensa, 1) -- o 1 é o tanto de itens que vai ganhar doPlayerSendTextMessage(cid, 19, "Você acabou de receber x item") else doPlayerSendTextMessage(cid, 19, "Você não tem dinheiro suficiente para comprar o item") end return true end Depois você vai até data/talkactions abra o arquivo talkactions.xml e adicione em qualquer lugar esta tag aqui: <talkaction log="yes" words: !comando-para-comprar-o-item event="script" value="nome-do-arquivo.lua"/>


    É isso ai, como ja deu para ver é bem simples fazer... xD



    Se ajudei da REP+ ai??!! ;]
  13. Gostei
    GuhPk recebeu reputação de Skyligh em Como deixar o Centro Pokemon uma área mais segura   
    Olá, eu sou GuhPk, e hoje venho trazer a você 1 tutorial básico de como deixar seu Centro Pokemon uma área mais segura!!!



    (Para que os player's não possam invocar pokemon's e nem usar skills la dentro)





    ==============================================================================================





    Primeiro




    Abra o mapa de seu Server com o Remere's Map Editor, vá até o seu cp, então ficara +/- assim:



    (não ligue pelos itens do meu bugado, é que eu estou usando o client diferente do server) =//










    Segundo




    Abaixo de sua Raw Pallete, tem uma lista de ícones, selecione um que tem a imagem de um escudo amarelo:










    Terceiro




    Agora é só pintar todo o piso do seu Centro Pokemon bem assim:




    Antes










    Depois










    Quarto




    Após você editar os CP's de todas as suas city's você salva o mapa novo e depois fecha!!!




    Para salvar va em: Flie > Save As... (ou aperte Ctrl+Alt+S)





  14. Gostei
    GuhPk recebeu reputação de Skyligh em Como vender itens por Talkactions   
    Olá, eu sou GuhPk e hoje estou vindo aqui para ensinar vocês a vender itens por Talkactions...



    Estou aprendendo agora também sobre script's, então o unico modo que eu sei é criando 1 script para 1 item a venda...



    Caso eu descobra outra maneira de criar em 1 script só eu posto aqui!!! =]





    ==========================================================================





    Vai em data/talkactions/scripts copie 1 arquivo.lua, renomeie, apague tudo dentro e coloco isso: (editando da maneira que você quizer)




    function onSay(cid, words, param, channel) local dinheiro = 1000000 -- quanto vai custar o item local recompensa = 2548 -- qual item sera vendido if doPlayerRemoveMoney(cid, dinheiro) then doPlayerAddItem(cid, recompensa, 1) -- o 1 é o tanto de itens que vai ganhar doPlayerSendTextMessage(cid, 19, "Você acabou de receber x item") else doPlayerSendTextMessage(cid, 19, "Você não tem dinheiro suficiente para comprar o item") end return true end Depois, vá até data/talkactions/talkactions.xml e adicione esta seguinte tag: (editando da maneira que você quizer) <talkaction log="yes" words="!comando-para-comprar-o-item" event="script" value="nome-do-arquivo.lua"> Observação: Caso você queira vender com mais de 1 comando você faria os comandos separados sempre por " ; ", veja no exemplo a seguir: <talkaction log="yes" words="!comando1;!comando2;!comando3;!comando4;!comando5" event="script" value="nome-do-arquivo.lua">





    ==========================================================================






    Agora eu irei postar aqui uns print's dos script's!!! ;]













    ==========================================================================




    Agora eu irei postar aqui uns print's do poketibia!!! ;]













    Ajudei? REP +++!!!

  15. Gostei
    GuhPk deu reputação a Skyligh em Funções .lua   
    Funções.lua aki irei postar todas as funções .lua para vocês nao terem que procurar nas sourcers igual um doido .


    //get* getCreatureHealth(cid) getCreatureMaxHealth(cid) getCreatureHideHealth(cid) getCreatureMana(cid) getCreatureMaxMana(cid) getCreatureSpeakType(cid) getCreatureMaster(cid) getCreatureSummons(cid) getCreatureOutfit(cid) getCreaturePosition(cid) getCreatureLookDirection(cid) getCreatureName(cid) getCreatureSpeed(cid) //TODO getCreatureBaseSpeed(cid) //TODO getCreatureTarget(cid) //TODO getCreatureByName(name) getCreatureSkullType(cid) getCreatureCondition(cid, condition[, subId]) //TODO getCreatureNoMove(cid) //TODO getMonsterInfo(name) getMonsterHealingSpells(name) //TODO getMonsterAttackSpells(name) //TODO getMonsterLootList(name) //TODO getMonsterSummonList(name) //TODO getMonsterTargetList(cid) //TODO getMonsterFriendList(cid) //TODO getPlayerByNameWildcard(name~[, ret = false]) //TODO getPlayerLossSkill(cid) //TODO getPlayerLossPercent(cid, lossType) //TODO getPlayerGUIDByName(name[, multiworld = false]) //TODO getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]]) //TODO getPlayerFood(cid) getPlayerLevel(cid) getPlayerExperience(cid) getPlayerMagLevel(cid[, ignoreBuffs = false]) //TODO getPlayerSpentMana(cid) //TODO getPlayerAccess(cid) getPlayerGhostAccess(cid) getPlayerSkillLevel(cid, skillId) getPlayerSkillTries(cid, skillId) //TODO getPlayerTown(cid) getPlayerVocation(cid) getPlayerRequiredMana(cid, magicLevel) //TODO getPlayerRequiredSkillTries(cid, skillId, skillLevel) //TODO getPlayerItemCount(cid, itemid[, subType = -1]) getPlayerSoul(cid) getPlayerAccountId(cid) //TODO getPlayerAccount(cid) //TODO getPlayerIp(cid) //TODO getPlayerFreeCap(cid) getPlayerLight(cid) getPlayerSlotItem(cid, slot) getPlayerWeapon(cid[, ignoreAmmo = false]) //TODO getPlayerItemById(cid, deepSearch, itemId[, subType = -1]) //TODO getPlayerDepotItems(cid, depotid) getPlayerGuildId(cid) getPlayerGuildName(cid) getPlayerGuildRank(cid) getPlayerGuildNick(cid) getPlayerGuildLevel(cid) //TODO: From here, all bottoms getPlayerSex(cid) getPlayerStorageValue(uid, key) getPlayerGUID(cid) getPlayerFlagValue(cid, flag) getPlayerCustomFlagValue(cid, flag) getPlayerPromotionLevel(cid) getPlayerGroupId(cid) getPlayerLearnedInstantSpell(cid, name) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getPlayerBlessing(cid, blessing) getPlayerStamina(cid) getPlayerExtraExpRate(cid) getPlayerPartner(cid) getPlayerParty(cid) getPlayerPremiumDays(cid) getPlayerBalance(cid) getPlayerMoney(cid) getPlayerSkullTicks(cid, type) getPlayerRates(cid) getPlayerLastLogin(cid) getPlayerLastLoginSaved(cid) getPlayerAccountManager(cid) getInstantSpellInfo(cid, name) getPlayersByAccountId(accountNumber) getPlayersByIp(ip[, mask = 0xFFFFFFFF]) getChannelUsers(channelId) getPlayersOnline() getPartyMembers(lid) getAccountIdByName(name) getAccountByName(name) getAccountIdByAccount(accName) getAccountByAccountId(accId) getIpByName(name) getItemRWInfo(uid) getItemProtection(uid) getItemDescriptionsById(itemid) getItemWeightById(itemid, count[, precise]) getItemDescriptions(uid) getItemWeight(uid[, precise]) getItemAttack(uid) getItemExtraAttack(uid) getItemDefense(uid) getItemExtraDefense(uid) getItemArmor(uid) getItemAttackSpeed(uid) getItemHitChance(uid) getItemShootRange(uid) getItemIdByName(name[, displayError = true]) getItemLevelDoor(itemid) getItemWeaponType(uid) getFluidSourceType(type) getContainerSize(uid) getContainerCap(uid) getContainerCapById(itemid) getContainerItem(uid, slot) getDepotId(uid) getTileItemById(pos, itemId[, subType = -1]) getTileItemByType(pos, type) getTileThingByPos(pos) getTileInfo(pos) getTopCreature(pos) getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]]) getThingFromPos(pos) getThing(uid) getThingPos(uid) getHouseInfo(id) getHouseAccessList(houseid, listid) getHouseByPlayerGUID(playerGUID) getHouseFromPos(pos) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getTownHouses(townId) getWorldType() getWorldTime() getWorldLight() getWorldCreatures(type) //0 players, 1 monsters, 2 npcs, 3 all getWorldUpTime() getHighscoreString(skillId) getVocationInfo(id) getGuildId(guildName) getGuildMotd(guildId) getSpectators(centerPos, rangex, rangey[, multifloor = false]) getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]]) getWaypointPosition(name) getGameState() getNotationsCount(accId) getBanData(value) getBanList(type[, value]) getBanReason(id) getBanAction(id[, ipBanishment]) getGlobalStorageValue(valueid) getExperienceStage(level) getConfigFile() getConfigValue(key) getModList() loadmodlib(libName) domodlib(libName) getLogsDir() getDataDir() getWaypointList() getTalkActionList() getExperienceStageList() //set* setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) setHouseOwner(houseid, ownerGUID) setHouseAccessList(houseid, listid, listtext) setItemName(uid) setItemPluralName(uid) setItemArticle(uid) setItemAttack(uid, attack) setItemExtraAttack(uid, extraattack) setItemDefense(uid, defense) setItemArmor(uid, armor) setItemExtraDefense(uid, extradefense) setItemAttackSpeed(uid, attackspeed) setItemHitChance(uid, hitChance) setItemShootRange(uid, shootRange) setCombatArea(combat, area) setCombatCondition(combat, condition) setCombatParam(combat, key, value) setConditionParam(condition, key, value) setCombatCallBack(combat, key, function_name) setCombatFormula(combat, type, mina, minb, maxa, maxb) setConditionFormula(combat, mina, minb, maxa, maxb) setGlobalStorageValue(key, newValue) setWorldType(type) //do* doCreatureAddHealth(cid, health[, force]) doCreatureAddMana(cid, mana) doCreatureSetDropLoot(cid, doDrop) doCreatureSetSkullType(cid, skull) doCreatureSetSpeakType doCreatureSetLookDirection(cid, dir) doPlayerSetMaxCapacity(cid, cap) doCreatureChangeOutfit(cid, outfit) doCreatureSay(uid, text, type[, ghost = false[, cid = 0[, pos]]]) doCreatureSetNoMove(cid, cannotMove) doSetCreatureLight(cid, lightLevel, lightColor, time) doSetCreatureOutfit(cid, outfit, time) doRemoveCreature(cid[, executeLogout = true]) doMoveCreature(cid, direction) doConvinceCreature(cid, target) doChallengeCreature(cid, target) doChangeSpeed(cid, delta) doSummonMonster(name, pos) doCreateMonster(name, pos) doMonsterChangeTarget(cid) doMonsterSetTarget(cid, target) doCreateNpc(name, pos) doSetMonsterOutfit(cid, name, time) doPlayerBroadcastMessage(cid, message[, type]) doPlayerSetSex(cid, newSex) doPlayerSetTown(cid, townid) doPlayerSetVocation(cid, voc) doPlayerSetStorageValue(uid, key, newValue) doPlayerSetGroupId(cid, newGroupId) doPlayerSetPromotionLevel(cid, level) doPlayerSetStamina(cid, minutes) doPlayerSetBalance(cid, balance) doPlayerSetExtraExpRate(cid, value) doPlayerSetPartner(cid, guid) doPlayerRemoveItem(cid, itemid, count[, subtype]) doPlayerAddExperience(cid, amount) doPlayerSetGuildId(cid, id) doPlayerSetGuildRank(cid, rank) doPlayerSetGuildNick(cid, nick) doPlayerAddOutfit(cid,looktype, addons) doPlayerRemoveOutfit(cid,looktype, addons) doPlayerSetRedSkullTicks(cid, amount) doPlayerSetLossPercent(cid, lossType, newPercent) doPlayerSetLossSkill(cid, doLose) doPlayerAddSkillTry(cid, skillid, n) doPlayerAddSpentMana(cid, amount) doPlayerAddSoul(cid, soul) doPlayerAddItem(uid, itemid[, count/subtype[, canDropOnMap = true]]) doPlayerAddItemEx(cid, uid[, canDropOnMap = false]) doPlayerSendTextMessage(cid, MessageClasses, message) doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel) doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time]) doPlayerAddMoney(cid, money) doPlayerRemoveMoney(cid, money) doPlayerTransferMoneyTo(cid, target, money) doPlayerPopupFYI(cid, message) doPlayerSendTutorial(cid, id) doPlayerAddMapMark(cid, pos, type[, description]) doPlayerAddPremiumDays(cid, days) doPlayerAddBlessing(cid, blessing) doPlayerAddStamina(cid, minutes) doPlayerResetIdleTime(cid) doPlayerLearnInstantSpell(cid, name) doPlayerUnlearnInstantSpell(cid, name) doPlayerFeed(cid, food) doPlayerSendCancel(cid, text) doPlayerSendDefaultCancel(cid, ReturnValue) doPlayerSetRate(cid, type, value) doPlayerJoinParty(cid, lid) doPlayerSendOutfitWindow(cid) doPlayerSave(cid[, shallow = false]) doCreateItem(itemid, type/count, pos) doCreateItemEx(itemid[, count/subtype]) doAddContainerItemEx(uid, virtuid) doAddContainerItem(uid, itemid[, count/subtype]) doChangeTypeItem(uid, newtype) doDecayItem(uid) doRemoveItem(uid[, count]) doTransformItem(uid, toitemid[, count/subtype]) doSetItemActionId(uid, actionid) doSetItemText(uid, text[, writer[, date]]) doSetItemSpecialDescription(uid, desc) doSetItemOutfit(cid, item, time) doSetItemProtection(uid, value) doTileAddItemEx(pos, uid) doTileQueryAdd(uid, pos[, flags]) doAddCondition(cid, condition) doRemoveCondition(cid, type[, subId]) doRemoveConditions(cid[, onlyPersistent]) doAreaCombatHealth(cid, type, pos, area, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doAreaCombatMana(cid, pos, area, min, max, effect) doTargetCombatMana(cid, target, min, max, effect) doAreaCombatCondition(cid, pos, area, condition, effect) doTargetCombatCondition(cid, target, condition, effect) doAreaCombatDispel(cid, pos, area, type, effect) doTargetCombatDispel(cid, target, type, effect) doCombat(cid, combat, param) doTeleportThing(cid, newpos[, pushmove = true]) doCreateTeleport(itemid, topos, createpos) doSendMagicEffect(pos, type[, player]) doSendDistanceShoot(frompos, topos, type[, player]) doSendAnimatedText(pos, text, color[, player]) doShowTextDialog(cid, itemid, text) doRelocate(pos, toPos[, creatures = true]) doBroadcastMessage(message, type) doWaypointAddTemporial(name, pos) doSetGameState(stateId) doAddIpBanishment(ip[, length[, comment[, admin]]]) doAddNamelock(name[, reason[, action[, comment[, admin]]]]) doAddBanishment(accId[, length[, reason[, action[, comment[, admin]]]]]) doAddDeletion(accId[, reason[, action[, comment[, admin]]]]]) doAddNotation(accId[, reason[, action[, comment[, admin]]]]]) doRemoveIpBanishment(ip[, mask]) doRemoveNamelock(name) doRemoveBanisment(accId) doRemoveDeletion(accId) doRemoveNotations(accId) doSaveServer() doReloadInfo(id[, cid]) doCleanHouse(houseId) doCleanMap() doRefreshMap() //is* isCreature(cid) isMonster(uid) isNpc(uid) isPlayer(cid) isPlayerPzLocked(cid) isItemStackable(itemid) isItemRune(itemid) isItemMovable(itemid) isItemDoor(itemid) isItemContainer(itemid) isItemFluidContainer(itemid) isContainer(uid) isCorpse(uid) isMovable(uid) isSightClear(fromPos, toPos, floorCheck) isIpBanished(ip[, mask]) isPlayerNamelocked(name) isAccountBanished(accId) isAccountDeleted(accId) isInArray({array}, value[, lower = true]) //others registerCreatureEvent(uid, eventName) createCombatArea({area}[, {exArea}]) createConditionObject(type[, ticks[, buff[, subId]]]) addDamageCondition(condition, rounds, time, value) addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet) createCombatObject() numberToVariant(number) stringToVariant(string) positionToVariant(pos) targetPositionToVariant(pos) variantToNumber(var) variantToString(var) variantToPosition(var) canPlayerWearOutfit(cid, lookType, addons) executeRaid(name) addEvent(callback, delay, ...) stopEvent(eventid) hasProperty(uid) md5(str) sha1(str) //db table db.executeQuery(query) db.storeQuery(query) db.escapeString(str) db.escapeBlob(s, length) db.stringComparisonOperator() db.lastInsertId() //result table result.getDataInt(resId, s) result.getDataLong(resId, s) result.getDataString(resId, s) result.getDataStream(resId, s, length) result.next(resId) result.free(resId) //bit table #bit.cast bit.bnot(n) bit.band(type, n) bit.bor(type, n) bit.bxor(type, n) bit.lshift(type, n) bit.rshift(type, n) #bit.arshift #bit.ucast bit.ubnot(n) bit.uband(type, n) bit.ubor(type, n) bit.ubxor(type, n) bit.ulshift(type, n) bit.urshift(type, n) #bit.uarshift //compats table.getPos = table.find doSetCreatureDropLoot = doCreatureSetDropLoot doPlayerSay = doCreatureSay doPlayerAddMana = doCreatureAddMana playerLearnInstantSpell = doPlayerLearnInstantSpell doPlayerRemOutfit = doPlayerRemoveOutfit pay = doPlayerRemoveMoney broadcastMessage = doBroadcastMessage getPlayerName = getCreatureName getPlayerPosition = getCreaturePosition getCreaturePos = getCreaturePosition creatureGetPosition = getCreaturePosition getPlayerMana = getCreatureMana getPlayerMaxMana = getCreatureMaxMana hasCondition = getCreatureCondition isMoveable = isMovable isItemMoveable = isItemMovable saveData = saveServer savePlayers = saveServer getPlayerSkill = getPlayerSkillLevel getPlayerSkullType = getCreatureSkullType getCreatureSkull = getCreatureSkullType getAccountNumberByName = getAccountIdByName getIPByName = getIpByName getPlayersByIP = getPlayersByIp getThingfromPos = getThingFromPos getPlayersByAccountNumber = getPlayersByAccountId getIPByPlayerName = getIpByName getPlayersByIPNumber = getPlayersByIp getAccountNumberByPlayerName = getAccountIdByName convertIntToIP = doConvertIntegerToIp convertIPToInt = doConvertIpToInteger queryTileAddThing = doTileQueryAdd getTileHouseInfo = getHouseFromPos executeRaid = doExecuteRaid saveServer = doSaveServer cleanHouse = doCleanHouse cleanMap = doCleanMap shutdown = doShutdown mayNotMove = doCreatureSetNoMove doPlayerSetNoMove = doCreatureSetNoMove getPlayerNoMove = getCreatureNoMove getConfigInfo = getConfigValue doPlayerAddExp = doPlayerAddExperience isInArea = isInRange doPlayerSetSkillRate = doPlayerSetRate getCreatureLookDir = getCreatureLookDirection getPlayerLookDir = getCreatureLookDirection getPlayerLookDirection = getCreatureLookDirection doCreatureSetLookDir = doCreatureSetLookDirection getPlayerLookPos = getCreatureLookPosition setPlayerStamina = doPlayerSetStamina setPlayerPromotionLevel = doPlayerSetPromotionLevel setPlayerGroupId = doPlayerSetGroupId setPlayerPartner = doPlayerSetPartner setPlayerStorageValue = doPlayerSetStorageValue setPlayerBalance = doPlayerSetBalance doAddMapMark = doPlayerAddMapMark doSendTutorial = doPlayerSendTutorial //lua-made functions doPlayerGiveItem(cid, itemid, amount, subType) doPlayerTakeItem(cid, itemid, amount) doPlayerBuyItem(cid, itemid, count, cost, charges) doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges) doPlayerSellItem(cid, itemid, count, cost) doPlayerWithdrawMoney(cid, money) doPlayerDepositMoney(cid, money) comparePos(pos, posEx) isInRange(pos, fromPos, toPos) getArea(pos, rangeX, rangeY) isPremium(cid) getMonthDayEnding(day) getMonthString(m) getArticle(str) isNumber(str) getDistanceBetween(firstPosition, secondPosition) doPlayerAddAddons(cid, addon) isSorcerer(cid) isDruid(cid) isPaladin(cid) isKnight(cid) isRookie(cid) getDirectionTo(pos, posEx) getCreatureLookPosition(cid) getPosByDir(fromPosition, direction, size) doPlayerWithdrawAllMoney(cid) doPlayerDepositAllMoney(cid) doPlayerTransferAllMoneyTo(cid, target) doPlayerAddLevel(cid, amount, round) doPlayerAddMagLevel(cid, amount) doPlayerAddSkill(cid, amount) playerExists(name) getTibiaTime() doWriteLogFile(file, text) isInArea(pos, fromPos, toPos) getExperienceForLevel(lv) doMutePlayer(cid, time) getPlayerGroupName(cid) getPlayerVocationName(cid) getPromotedVocation(vid) doPlayerRemovePremiumDays(cid, days) getPlayerMasterPos(cid) getHouseOwner(houseId) getHouseName(houseId) getHouseEntry(houseId) getHouseRent(houseId) getHousePrice(houseId) getHouseTown(houseId) getHouseTilesCount(houseId) getItemNameById(itemid) getItemPluralNameById(itemid) getItemArticleById(itemid) getItemName(uid) getItemPluralName(uid) getItemArticle(uid) getItemText(uid) getItemSpecialDescription(uid) getItemWriter(uid) getItemDate(uid) getTilePzInfo(pos) getTileZoneInfo(pos) debugPrint(text) doShutdown() doSummonCreature(name, pos) getOnlinePlayers() getPlayerByName(name) isPlayerGhost(cid) getPlayerFrags(cid) getPartyLeader(cid) isInParty(cid) isPrivateChannel(channelId) doConvertIntegerToIp(int, mask) doConvertIpToInteger(int, mask) getBooleanFromString(str) doCopyItem(item, attributes) exhaustion.check(cid, storage) exhaustion.get(cid, storage) exhaustion.set(cid, storage, time) exhaustion.make(cid, storage, time) table.find(table, value) table.isStrIn(txt, str) table.countElements(table, item) table.getCombinations(table, num) string.split(str) string.trim(str) string.explode(str, sep)

    Explicações

    Funções //get

    As funções get e as functions que trabalha checkando Ex : getPlayerStorage(cid) ira checkar uma storage do player getPlayerMaxMana(cid) ja ira checkar a max mana do player acho que ja eu pra inteder .

    Funções do & set elas geralmente representam que você player ira receber Ex : doPlayerSendTextMessa() ira enviar uma msg para o player . ja essa function setPlayerStorage(cid) enviara uma storage para o player

    Funçoes string. nao sei oq fala muito sobre elas eu nao so se usar elas entao nao sei muito oq falar : ahuauhahua

    Então e so isso galera !
  16. Gostei
    GuhPk deu reputação a Skyligh em Training Offline   
    Vou ensinar a criar um sistema de treinamento offline igual ao global.

    Requisitos: Apenas um ot com items.xml e items.otb que possuem as estátuas de treino ^-^

    Seguindo.
    PastaDoOt/data//lib/ crie um arquivo chamado "103-offline-training.lua" Coloque isso dentro:

    -- config, in percent of normal training with 2 trainers and player vocation mana regeneration [by food] OfflineTraining_rates = { [SKILL_CLUB] = 100, [SKILL_SWORD] = 100, [SKILL_AXE] = 100, [SKILL_DISTANCE] = 100, [SKILL_SHIELD] = 100, [SKILL__MAGLEVEL] = 100 } -- function that you should edit to make it add other skill etc. function OfflineTraining_canStartTraining(cid) -- return bool return getCreatureStorage(cid, 62669) > 0 end function OfflineTraining_onstartTraining(cid) -- maybe someone will need -- to save your time, this: doPlayerPopupFYI(cid, "You started offline training.") -- NOT WORK end function OfflineTraining_onendTraining(cid) doCreatureSetStorage(cid, 62669, 0) end function OfflineTraining_addTrainedSkills(cid, trainTime) -- time in minutes! local timeInSeconds = trainTime * 60 local vocInfo = getVocationInfo(getPlayerVocation(cid)) if(getCreatureStorage(cid, 62669) == SKILL_SWORD) then doPlayerAddSkillTry(cid, SKILL_SWORD, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_SWORD] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_AXE) then doPlayerAddSkillTry(cid, SKILL_AXE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_AXE] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL__MAGLEVEL) then doPlayerAddSpentMana(cid, ((timeInSeconds / vocInfo["manaGainTicks"]) * vocInfo["manaGain"]) * OfflineTraining_rates[SKILL__MAGLEVEL] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_CLUB) then doPlayerAddSkillTry(cid, SKILL_CLUB, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_CLUB] / 100, true) elseif(getCreatureStorage(cid, 62669) == SKILL_DISTANCE) then doPlayerAddSkillTry(cid, SKILL_DISTANCE, ((timeInSeconds * 1000) / vocInfo["attackSpeed"]) * OfflineTraining_rates[SKILL_DISTANCE] / 100, true) end doPlayerAddSkillTry(cid, SKILL_SHIELD, timeInSeconds * OfflineTraining_rates[SKILL_SHIELD] / 100, true) end -- 4 functions to show right values on 'bar' in Tibia 9.6 function OfflineTraining_getTime(cid) return getCreatureStorage(cid, 62666) end function OfflineTraining_setTime(cid, newTime) -- set values only between 0 - 720 [12 hours] doCreatureSetStorage(cid, 62666, math.max(0, math.min(newTime, 720))) -- now code to force server to send 'PlayerStats' (including Offline Time) -- we must change any stat: hp,mana,stamina,cap,soul,exp,level doPlayerAddSoul(cid, 1) doPlayerAddSoul(cid, -1) end function OfflineTraining_addTime(cid, addTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + addTime) end function OfflineTraining_removeTime(cid, removeTime) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) - removeTime) end -- functions for library to add skills/mlvl function OfflineTraining_initialize(cid) if(OfflineTraining_getTime(cid) == -1) then OfflineTraining_setTime(cid, 720) OfflineTraining_setLogoutTime(cid) -- block problem with first login 'add time' end end function OfflineTraining_isTraining(cid) return (getCreatureStorage(cid, 62667) > 0) end function OfflineTraining_turnOnTraining(cid) doCreatureSetStorage(cid, 62667, 1) end function OfflineTraining_turnOffTraining(cid) doCreatureSetStorage(cid, 62667, 0) end function OfflineTraining_getOfflineTime(cid) return math.floor((os.time() - getCreatureStorage(cid, 62668)) / 60) end function OfflineTraining_setLogoutTime(cid) return doCreatureSetStorage(cid, 62668, os.time()) end [/code] [color=#000000][b]em Data/actions/actions.xml adicione as seguintes tags[/b][/color] [code] <action itemid="18492" script="offtrain_statue.lua"/> <action itemid="18491" script="offtrain_statue.lua"/> <action itemid="18490" script="offtrain_statue.lua"/> <action itemid="18489" script="offtrain_statue.lua"/> <action itemid="18488" script="offtrain_statue.lua"/> Os números 18488 - 18492 são os id's dos objetos a serem os "Treiners offline" ou seja, se vc trocar por exemplo o 18492 por um outro id tipo "1026" ( id de um muro) todos os muros que possui esse id, ao clicarem nele, o player irá deslogar, então prestem atenção e coloquem um id existente e que nao seja "usável" como exemplo, uma estátua. em data/actions/script crie um arquivo chamado "offtrain_statue.lua" Coloque isso dentro: -- example 'action' when you click on statue: function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 18488) then -- sword doCreatureSetStorage(cid, 62669, SKILL_SWORD) elseif(item.itemid == 18489) then -- axe doCreatureSetStorage(cid, 62669, SKILL_AXE) elseif(item.itemid == 18492) then -- mlvl doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL) elseif(item.itemid == 18490) then -- club doCreatureSetStorage(cid, 62669, SKILL_CLUB) elseif(item.itemid == 18491) then -- distannce doCreatureSetStorage(cid, 62669, SKILL_DISTANCE) end -- we remove player, so it will execute onLogout(cid) function and save time of training start doRemoveCreature(cid) end ../data/creaturescripts/creaturescripts.xml <event type="login" name="offtrain_PlayerLogin" event="script" value="offtrain_login.lua"/> <event type="logout" name="offtrain_PlayerLogout" event="script" value="offtrain_logout.lua"/> ../data/creaturescripts/scripts/offtrain_login.lua -- 0.4 - offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onendTraining(cid) else -- offline training time also regenerate when you are offline, but NOT train OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) end return true end -- 0.4 - offline training - logout.lua function onLogout(cid) if(OfflineTraining_canStartTraining(cid)) then OfflineTraining_turnOnTraining(cid) OfflineTraining_onstartTraining(cid) end OfflineTraining_setLogoutTime(cid) return true end ./data/globalevents/globalevents.xml <globalevent name="offtrain_add_minutes" interval="60000" event="script" value="offtrain_addMinutes.lua"/> ../data/globalevents/scripts/offtrain_addMinutes.lua function onThink(interval) -- run it with interval 60 seconds for _, cid in pairs(getPlayersOnline()) do OfflineTraining_addTime(cid, 1) end return true end


    pronto, seu sistema de treino offline está criado

    Créditos:
    Gesior.pl
    LookMe
  17. Gostei
    GuhPk recebeu reputação de madaras em [Resolvido][AJUDA] Script Monstro   
    Titulo irregular.
    Reportado para um superior alterar.
  18. Gostei
    GuhPk recebeu reputação de thiagobji em Sistema de dar lvl   
    Aew, sou bem iniciante em Script... Mas tenta isso aqui:

    Cria 1 arquivo "recompensa.lua" em "data/creaturescripts/script" e cole isso dentro:






    Em "data/creaturescripts" abra o arquivo "creaturescripts.xml" e adicione esta tag:






    Em "data/creaturescripts/scripts" abra o arquivo "login.lua" e adicione esta tag (antes do ultimo "return true"):



  19. Gostei
    GuhPk recebeu reputação de thiagobji em Como vender itens por Talkactions   
    Olá, eu sou GuhPk e hoje estou vindo aqui para ensinar vocês a vender itens por Talkactions...



    Estou aprendendo agora também sobre script's, então o unico modo que eu sei é criando 1 script para 1 item a venda...



    Caso eu descobra outra maneira de criar em 1 script só eu posto aqui!!! =]





    ==========================================================================





    Vai em data/talkactions/scripts copie 1 arquivo.lua, renomeie, apague tudo dentro e coloco isso: (editando da maneira que você quizer)




    function onSay(cid, words, param, channel) local dinheiro = 1000000 -- quanto vai custar o item local recompensa = 2548 -- qual item sera vendido if doPlayerRemoveMoney(cid, dinheiro) then doPlayerAddItem(cid, recompensa, 1) -- o 1 é o tanto de itens que vai ganhar doPlayerSendTextMessage(cid, 19, "Você acabou de receber x item") else doPlayerSendTextMessage(cid, 19, "Você não tem dinheiro suficiente para comprar o item") end return true end Depois, vá até data/talkactions/talkactions.xml e adicione esta seguinte tag: (editando da maneira que você quizer) <talkaction log="yes" words="!comando-para-comprar-o-item" event="script" value="nome-do-arquivo.lua"> Observação: Caso você queira vender com mais de 1 comando você faria os comandos separados sempre por " ; ", veja no exemplo a seguir: <talkaction log="yes" words="!comando1;!comando2;!comando3;!comando4;!comando5" event="script" value="nome-do-arquivo.lua">





    ==========================================================================






    Agora eu irei postar aqui uns print's dos script's!!! ;]













    ==========================================================================




    Agora eu irei postar aqui uns print's do poketibia!!! ;]













    Ajudei? REP +++!!!

  20. Gostei
    GuhPk deu reputação a Markin em Bora joga ot de war!   
    reboucas.sytes.net



    oito.seis!




    Entra all ae, meu nick: Rawr






  21. Gostei
    GuhPk deu reputação a MaXwEllDeN em [Aula 1] Introdução   
    Introdução
    Aula 1
    O que é scripting?
    Do modo mais simples possível: scripting é o ato de programar. O nome scripting vem do nome "script".
    O que é um script?
    De um modo geral, um script é um bloco de código escrito em uma linguagem de programação interpretada, ou seja, ele precisa que alguma coisa leia ele e possa "traduzir" seu conteúdo. Lembre-se de que "script" não é um termo específico de Open Tibia Servers.
    O que é uma linguagem de programação interpretada?
    Os brasileiros falam português, ingleses falam inglês e chineses falam mandarim, e com isso o mundo é composto por várias línguas.
    No mundo da programação não é diferente. Existem várias línguas que podem ser usadas, cada uma com uma característica e modo de escrever diferente (Assim como o português é diferente do inglês).
    Entre estas linguagens, existem 2 tipos: as linguagens interpretadas e as linguagens compiladas (Não-interpretadas). Podemos fazer uma comparação tosca com a vida real: o português seria uma linguagem interpretada (Nosso cérebro precisa "traduzir" a mensagem), e os desenhos seriam a língua compilada (Nosso cérebro reconhece automaticamente a "mensagem" do desenho).
    As linguagens compiladas são aquelas que não precisam ser lidas por nenhum programa, pois "conversam" diretamente com o computador, enquando a linguagem interpretada não consegue se comunicar com o computador, então a linguagem compilada recebe a mensagem do codigo interpretado e traduz numa linguagem que o computador entenda, dai a linguagem interpretada pode conversar com o computador (Desde que alguém traduza suas mensagens).
    Voltando para a parte de Open Tibia Servers, a linguagem compilada é a linguagem usada no seu servidor: o .exe no Windows, por exemplo, e a linguagem interpretada são os scripts .lua. O seu servidor compilado vai ler os scripts .lua e traduzir o conteúdo deles para que o computador possa executar o que o script manda.
    Se os scripts são escritos em linguagens interpretadas, qual é a linguagem dos script usados nos Open Tibia Servers?
    Os Open Tibia Servers usam uma linguagem de programação (Interpretada) chamada Lua, que foi feita aqui no Brasil mesmo.
    Características da linguagem de programação Lua:
    Linguagem de Programação Interpretada Linguagem de Programação Imperativa ou Programação Procedural Linguagem de Scripts ou Linguagem de Extensão Pequena, Fácil, Leve e Eficiente " Lua foi criada por um time de desenvolvedores do Tecgraf da PUC-Rio, a princípio, para ser usada em um projeto da Petrobras. Devido à sua eficiência, clareza e facilidade de aprendizado, passou a ser usada em diversos ramos da programação, como no desenvolvimento de jogos (a LucasArts, por exemplo, usou a linguagem no jogo Escape from Monkey Island), controle de robôs, processamento de texto, etc. Também é freqüentemente usada como uma linguagem de propósito geral. "
    Wikipédia - Lua (Linguagem de Programação)
    O que eu preciso para aprender Lua e começar a produzir meus scripts?
    Paciência (Embora seja de fácil aprendizado, você vai levar algum tempo para aprender a linguagem)
      Humildade (Nunca se sinta o melhor, nem ridicularize aqueles que tiverem um conhecimento menor que o seu)
      Vontade (Não adianta fazer as coisas sem o menor interesse, você não chegará a lugar nenhum sem vontade)
      Criatividade (O principal para produzir um script é ter a idéia do que você vai fazer)
      Conhecer a Lógica da Programação (Não se preocupe, eu vou ensinar a Lógica da Programação nas próximas aulas.)
      Interpretador Lua (Para testar seus scripts, claro. Você pode usar o seu OTServer para testar, e ainda usar um interpretador Lua para testar seus scripts simples fora do OTServer)
      Editor Lua (Não é realmente necessário, uma vez que você pode usar um editor de textos qualquer, como o bloco de notas, mas ter um Editor Lua vai ajudar muito, e alguns até vêm com um Interpretador Lua junto!)
      Pagar uma taxa de R$ 700,00, afinal, não estou escrevendo estas aulas de graça! (OK, não precisa pagar nada, mas no mínimo poste seus scripts aqui e ajude a seção a crescer ) Onde posso encontrar um Interpretador e/ou Editor Lua?
    Como interpretador (No caso de produzir scripts para Open Tibia Servers) você deve usar um servidor próprio, pessoal somente para testar os scripts que você fez, e pode usar também um Interpretador Lua geral, para testar seus scripts fora dos OTServers.
    Como Editor Lua você pode usar qualquer editor de textos, mas eu recomendo usar um editor que seja próprio para a linguagem Lua. Existem dois editores que já vem com um Interpretador Lua "embutido". São eles: OTScript Live! [Download] e SciTE (Scintilla) [Download].
    Exercício-Tarefa:
    Pesquise mais na internet sobre a linguagem Lua, Scripts, etc...
    Somente dúvidas serão aceitas aqui! Comentários que não forem dúvidas serão apagados e os autores serão reportados!
    Essa aula foi escrita por uma raposa levada Skyen Hasus, todos os créditos são dele.
    Aula 2 - Lógica da programação >> Script Live By colex.rar
  22. Gostei
    GuhPk recebeu reputação de kaique16 em Ajuda quest   
    Se a duvida for para a pessoa poder fazer a quest mais de 1 vez...
    Você só deve ir em data/actions/scripts procura o arquivo.lua da sua quest...
    Sua quest provavelmente você estará desta maneira:





    Ou talvez parecido, ai você deixa +/- assim:





    Você terá que apagar isto:


    setPlayerStorageValue(cid,STORAGE_VALUE,1) else doPlayerSendTextMessage(cid,22,"Vazio você já completou.")
  23. Gostei
    GuhPk recebeu reputação de Ariius em (RESOLVIDO) [AJUDA] Talkaction BP e Action GP   
    Cara, segunda sei se tem como não, mas vai ai a 1ª!!!

    Va em data/talkactions/scripts copia 1 arquivo, renomeie para nome-do-arquivo.lua, e dentro apague tudo e cole isso:



    function onSay(cid, words, param, channel) local dinheiro = 1000000 -- quanto vai custar o item local recompensa = 2548 -- id do item que será vendido if doPlayerRemoveMoney(cid, dinheiro) then doPlayerAddItem(cid, recompensa, 1) -- o 1 é o tanto de itens que vai ganhar doPlayerSendTextMessage(cid, 19, "Você acabou de receber x item") else doPlayerSendTextMessage(cid, 19, "Você não tem dinheiro suficiente para comprar o item") end return true end Depois você vai até data/talkactions abra o arquivo talkactions.xml e adicione em qualquer lugar esta tag aqui: <talkaction log="yes" words: !comando-para-comprar-o-item event="script" value="nome-do-arquivo.lua"/>


    É isso ai, como ja deu para ver é bem simples fazer... xD



    Se ajudei da REP+ ai??!! ;]

Informação Importante

Confirmação de Termo