Ir para conteúdo
  • Cadastre-se
  1. NTORox OTServer

    NTORox OTServer

  2. Sonark

    Sonark

  3. psychonaut

    psychonaut

  4. DboHere

    DboHere

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Bagon
      Bom, hoje venho trazer á vocês um sistema de Pet System DIFERENCIADO de alguns presentes no fórum. Este sistema tem diversos comandos diferenciados, como: 
       
      !pet nomedopet este comando irá sumonar o pet. 
      !remove irá remover o pet.
      !fale eu sou lindo o pet falará "eu sou lindo"
      !conversar o pet irá conversar com vc. 
       
      Então sem mais delongas vamos ao script.
       
      OBS: SCRIPT TESTADO SOMENTE EM TFS 0.4/0.3, e este script foi feito com a intenção de ser vendido no site do ot ou em poderá usar como quest usando o item selecionado como premio. fique ao seu critério.
       
      Primeiro vá até a pasta talkaction/script e crie um arquivo chamado petsystem.lua, depois coloque o seguinte script:
       
       
      Agora em talkactions/talkactions.xml adicione a seguinte tag:
       
      <talkaction words="!pet;!remove;!fale;!conversar" event="script" value="petsystem.lua" />  
      EXPLICAÇÂO:
      As partes em Negrito, são os pets. Você pode alterar ou criar monstros para fazer eles como pets. (Recomendo criar um monstro para que seja somente pet.)
       
      Exemplo: ["dog"]= {stor=78552},      
       
       
      Lembrando que é necessário mudar esta parte no script do monstro colocado a cima.
       
      <flag attackable="1" /> para :
       
      <flag attackable="0" />  
      agora vá em action/script e crie um arquivo chamado pet com o seguinte script:
       
       
      e vá em action.xml e adiciona a seguinte tag:
       
      <action itemid="10063" script="pet.lua"/> Explicação: Na tag da action o itemid é o item que deverá ser usado para ganhar a storage 78552, e assim podera sumonar o monstro com esta storage.
       
                                              
                                                         CRIE UMA ACTION COM A TAG A CIMA PARA CADA MONSTRO COLOCADO NA TALKACTION,
                                                         BASTA VC ALTERAR A STORAGE DO SCRIPT DA ACTION
                                                         EXEMPLO: em action altere as storage que estão em vermelho, como mostra abaixo
       
                                                              if getPlayerStorageValue(cid, 78552) < 1 then
                                                              setPlayerStorageValue(cid, 78552, 1)
       
                                                         aonde tem 78552 altere para 78553 que no caso é a storage do cyclops escolhido lá no script da talkaction
                                                         e assim susecivelmente.
       
       
       
      CREDITOS:
      Mulizeu
      Smartbox
      Bagon 
       
    • Por Imperius
      Olá, pessoal! Acabei encontrando um script que tinha feito a um tempo atrás. Estou compartilhando aqui para quem quiser usar ou melhorar.
       
      É bem parecido com os outros sistemas de roleta, igual deste tópico: https://tibiaking.com/forums/topic/101557-action-cassino-roleta-de-items/
       
      Como funciona?
       
      O "Treasure Chest" é um item custom, onde o jogador têm a possibilidade de ganhar itens raros ou bem meia boca. Tudo dependerá da sorte.
       
      O jogador precisa tacar o treasure chest na bancada e acionar a alavanca. O treasure chest irá se transformar em vários itens de forma randômica no qual o jogador poderá ou não ganhar. No final, apenas um item é entregue ao jogador.
       
      Para entender melhor o seu funcionamento, segue o GIF abaixo:
       

       
       
      em data > actions > actions.xml
       
       
      em data > actions > scripts > crie um arquivo chamado leverTreasureChest.lua
       
       
      no banco de dados do servidor, adicione o seguinte código em "SQL":
       
       
       

      Também estou disponibilizando uma página PHP, para quem quiser usar no site do servidor. Na página tem informações sobre o funcionamento, quais são os possíveis prêmios e a lista de jogadores que ganharam os itens raros.
       

       
       
      Espero ter ajudado de alguma forma! : )
       
      treasure_chest.php
    • Por Linus
      Você  pode configurar se quer que o preço aumente a cada reset, se quer que o level pra resetar aumente e se vc quer que a vida resete junto (e quanto % da vida atual será a vida após resetar).
       
       
      Testado em tfs 1.1, Versão 10.77
       
       
       
       
      Vá em data/npc/lib/ crie npc_resets.lua :
       



       
      Você pode editar mexendo aqui. no script acima :
      config = { minlevel = 150, --- Level inical para resetar price = 10000, --- Preço inicial para resetar newlevel = 20, --- Level após reset priceByReset = 0, --- Preço acrescentado por reset percent = 30, ---- Porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, ---- Maximo de resets levelbyreset = 0 --- Quanto de level vai precisar a mais no próximo reset } agora em data/npc/ crie reseter.XML :
       



       
       
       
      Agora em data/npc/scripts crie reseter.lua :
       



       
       
       
      Img : 
       

    • Por MySticaL
      Como funciona esse sistema?
      R-> Simples caso seu otServ for para todos os players, de todos continentes e você não
      queira deixar as funções em lua apenas em uma língua, você pode utilizar esse sistema.
       
      Como usar?
      R-> Após o sistema estar instalado 100%, vai ter 3 comandos: !lang en (setar a linguagem para english), !lang pt (setar a linguagem portuguese) &
      !lang es (setar a linguagem espanõl).

      Vamos começar, vai em data/lib/ e crie um arquivo chamado lang system.lua e coloque isto dentro:
      function getPlayerLanguage(cid) local Lang = db.getResult("SELECT `language` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1") if Lang:getID() ~= LUA_ERROR then local langid = Lang:getDataInt("language") Lang:free() return langid end return LUA_ERROR end function doPlayerSetLanguage(cid, new) local acc = getPlayerAccountId(cid) if new == 2 then db.executeQuery("UPDATE `accounts` SET language = 2 WHERE `id` = " .. acc) elseif new == 1 then db.executeQuery("UPDATE `accounts` SET language = 1 WHERE `id` = " .. acc) else db.executeQuery("UPDATE `accounts` SET language = 0 WHERE `id` = " .. acc) end end Ainda em data/lib encontre o arquivo 000-constant.lua e coloque ao final dele isto:
      ENGLISH = 2 SPANISH = 1 PORTUGUES = 0 Agora execute este código na sua SQL:
      ALTER TABLE `accounts` ADD `language` INT( 11 ) NOT NULL DEFAULT '0' Pronto, o sistema está pronto agora vamos criar um comando para que troque a linguagem, vá em data/talkactions/scripts
      e crie um arquivo chamado lang.lua e coloque isto dentro:
      function onSay(cid, words, param) if(param == '') then return true end if(param == 'en') then if getPlayerLanguage(cid) == 2 then doPlayerSendTextMessage(cid, 20, "[Language System (Beta)] Your language is alredy set to english.") return true else doPlayerSendTextMessage(cid, 27, "[Language System (Beta)] You have set english as your language.") doPlayerSetLanguage(cid, 2) return true end end if(param == 'pt') then if getPlayerLanguage(cid) == 0 then doPlayerSendTextMessage(cid, 20, "[Language System (Beta)] Sua língua já está definida como português.") return true else doPlayerSendTextMessage(cid, 27, "[Language System (Beta)] Você definiu o português como sua língua.") doPlayerSetLanguage(cid, 0) return true end end if(param == 'es') then if getPlayerLanguage(cid) == 1 then doPlayerSendTextMessage(cid, 20, "[Language System (Beta)] Su lengua ya esta definida como español.") return true else doPlayerSendTextMessage(cid, 27, "[Language System (Beta)] Tu definistes el español como tu lengua.") doPlayerSetLanguage(cid, 1) return true end end end E em data/talkactions abra o talkactions.xml e coloque está tag:
      <talkaction log="yes" words="!lang" event="script" value="lang.lua"/> Vou dar um exemplo de como usa-la em .lua:
      if getPlayerLanguage(cid) == 2 then doPlayerSendTextMessage(cid, 25, "This message will be displayed in English if the language of the player is in -en!") end if getPlayerLanguage(cid) == 0 then doPlayerSendTextMessage(cid, 25, "Está mensagem será exibida em português se a linguagem do jogador estiver em -pt!") end if getPlayerLanguage(cid) == 1 then doPlayerSendTextMessage(cid, 25, "Usted mensaje se mostrará en Espanõl si el jugador está en el lenguaje -es!") end Outro Exemplo:
      function onLogin(cid) local langmsg = { [ENGLISH] = {"This message will be displayed in English if the language of the player is in -en!"} [SPANISH] = {"Usted mensaje se mostrará en Espanõl si el jugador está en el lenguaje -es!"}, [PORTUGUES] = {"Está mensagem será exibida em português se a linguagem do jogador estiver em -pt!"}, } doPlayerSendTextMessage(cid, 25, langmsg[getPlayerLanguage(cid)][1]) return true end Pronto, agora o sistema está perfeito, os comandos estão no começo do tópico em "Como usar?"
       
      créditos:
      Acubens 
      Drazyn1291 
      MySticaL
    • Por MaTTch
      Bom galera eu resolvi fazer o Vault System a pedido de um amigo meu e decidi compartilhar com vocês.
       
      Testado em 8.60 TFS 0.4
       
      EDIT -- O script foi arrumado, pois havia um bug que o player ganhava golds.
       
      Vamos lá.
       
      1° - Vá em data/actions/scripts e crie um arquivo chamado vault.lua, e dentro você coloca isso:
      local vaultStorage = 99991 -- storage em que ficara armazenado os golds ------------------//* Functions //------------------- local function getPlayerFreeSpace(cid) -- by MaTTch     local checkSlots, space = {3,5,6,10}, 0     local function getContainerFree(container)         local free = 0         if(not isContainer(container.uid)) then             return free         end         for i = 0, (getItemInfo(container.itemid).maxItems -1) do             local item = getContainerItem(container.uid, i)             if(item.itemid == 0) then                 free = free + 1             elseif(isContainer(item.uid)) then                 free = free + getContainerFree(item)             end         end         return free     end     for _, i in ipairs(checkSlots) do         local slotItem = getPlayerSlotItem(cid, i)         if(i ~= CONST_SLOT_BACKPACK and slotItem.itemid == 0) then             space = space + 1         elseif(isContainer(slotItem.uid)) then             space = space + getContainerFree(slotItem)         end     end     return space end local function withdrawMoneySecurity(cid, value, storage) -- by MaTTch     local storageMoney, countValue = getPlayerStorageValue(cid, storage), 0     local config = {         [1] = {ITEM_CRYSTAL_COIN, math.floor(value/getItemInfo(ITEM_CRYSTAL_COIN).worth)},         [2] = {ITEM_PLATINUM_COIN, math.floor((value/getItemInfo(ITEM_PLATINUM_COIN).worth)-(math.floor(value/getItemInfo(ITEM_CRYSTAL_COIN).worth)*100))},         [3] = {ITEM_GOLD_COIN, math.floor(value%100)}     }     for i = 1, #config do         local count = config[i][2]         if(count > 0) then             while(count > 0) do                 storageMoney = getPlayerStorageValue(cid, storage)                 local a, itemCap = count > 100 and 100 or count, getItemInfo(config[i][1]).weight                 if(getPlayerFreeCap(cid) >= (itemCap*a)) then                     if(getPlayerFreeSpace(cid) >= 1) then                         doPlayerAddItem(cid, config[i][1], a)                         setPlayerStorageValue(cid, storage, (storageMoney - (getItemInfo(config[i][1]).worth * a)))                         countValue = countValue + (getItemInfo(config[i][1]).worth * a)                         count = count - a                     else                         return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You do not have enough space in container. You have took "..countValue.." gold"..(countValue > 1 and "s" or "").." from vault.")                     end                 else                     return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You do not have enough cap. You have took "..countValue.." gold"..(countValue > 1 and "s" or "").." from vault.")                 end             end         end     end     return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have took "..countValue.." gold"..(countValue > 1 and "s" or "").." from vault.") end ------------------//* End Functions //------------------- function onUse(cid, item, fromPosition, itemEx, toPosition)     local cidMoney, vaultMoney = getPlayerMoney(cid), getPlayerStorageValue(cid, vaultStorage)     if(vaultMoney <= 0) then         if(cidMoney <= 0) then             return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You do not have money.")         end         doPlayerRemoveMoney(cid, cidMoney)         setPlayerStorageValue(cid, vaultStorage, cidMoney)         doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have added "..cidMoney.." gold"..(cidMoney > 1 and "s" or "").." to vault. Now your money is kept in the vault chest, you can take it whenever you want.")     else         withdrawMoneySecurity(cid, vaultMoney, vaultStorage)     end     return true end 2° - Agora em data/actions/actions.xml adicione a tag:
      <action itemid="ID" event="script" value="vault.lua"/> Em ID você escolhe o id do item que quiser.
       
      3° - Agora em data/creaturescripts/scripts crie um arquivo com o nome vaultLook.lua, e dentro coloque isso:
      local config = { vaultId = ID, -- itemid do vault vaultStorage = 99991 -- storage em que ficara armazenado os golds } function onLook(cid, thing, position, lookDistance) local show = getPlayerStorageValue(cid, config.vaultStorage) if(thing.itemid == config.vaultId) then local str = "You see"..(getItemInfo(thing.itemid).article and " "..getItemInfo(thing.itemid).article.." " or " ")..getItemInfo(thing.itemid).name..".\nYou have "..(show < 0 and 0 or show).." gold"..(show > 1 and "s" or "").." in the vault." if(getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then str = str .. "\nItemID: ["..thing.itemid.."].\nPosition: [X: "..getThingPos(thing.uid).x.."] [Y: "..getThingPos(thing.uid).y.."] [Z: "..getThingPos(thing.uid).z.."]." end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return false end return true end 4° - Agora em data/creaturescripts/creaturescripts.xml adicione a tag:
      <event type="look" name="vaultLook" event="script" value="vaultLook.lua"/> 5° - Agora em data/creaturescripts/login.lua lá embaixo adicione junto dos outros:
      registerCreatureEvent(cid, "vaultLook") E agora o sistema já esta pronto para ser usado.
       
      - Aah mas como funciona?
      Você clica uma vez no cofre (vault) e deposita todo seu dinheiro nele, ao clicar de novo você pega-os de volta, e caso não tiver cap ou espaço na bag você pega somente o possível e o restante ficara la até você quiser pegar.
       
      --> Versão do Vault System em editText
       
      Créditos:
      MaTTch (eu)
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo