Ir para conteúdo

Bodak Reborn

Membro
  • Registro em

  • Última visita

Tudo que Bodak Reborn postou

  1. Remova isso. if(getPlayerLevel(cid) < 120) then return doPlayerSendCancel(cid, "Você estar no level 120.") else return doPlayerSendCancel(cid, "Sorry, not possible.") end
  2. Globalevents que reseta o storage de todos os players. Faça por database.
  3. Script..?
  4. Perdão, erro meu. Troque o "or" por "and".
  5. os.time() é "tempo agora". Dá uma olhada na wiki... local storage = 58486 local tempo = 10 if getPlayerStorageValue (cid, storage) < os.time() then setPlayerStorageValue (cid, storage, os.time() + tempo) doPlayerSendTextMessage (cid, 21, "Blabla") end
  6. if id == 2159 and (getCreatureName (cid) ~= "[ADM] Luan" or getCreatureName (cid) ~= "[ADM] Lerme" then return true end
  7. Adiciona a Red Skull: function onStepIn(cid, item, position, fromPosition) if isPlayer (cid) then if getCreatureSkull (cid) ~= 4 then doCreatureSetSkullType (cid, 4) end end return true end Verifica se está com Red Skull: function onStepIn(cid, item, position, fromPosition) if isPlayer (cid) then if getCreatureSkull (cid) ~= 4 then doTeleportThing(cid, fromPosition, TRUE) doPlayerSendTextMessage(cid, 21, "Apenas quem estiver com RED SKULL pode passar aqui.") return true end end return true end
  8. @luangop, a cada vez que o loop é executado, o "i" aumenta em 1, até chegar em 3. Então: for i = 1, 3 do addEvent (doCreatureAddHealth, i * 1000, cid, -health) end seria a mesma coisa que: addEvent (doCreatureAddHealth, 1 * 1000, cid, -health) addEvent (doCreatureAddHealth, 2 * 1000, cid, -health) addEvent (doCreatureAddHealth, 3 * 1000, cid, -health)
  9. local health = 36000 function onStepIn(cid, item, position, fromPosition) if isPlayer (cid) then for i = 1, 3 do addEvent (doCreatureAddHealth, i * 1000, cid, -health) end end return true end
  10. Yo boyz! Eu estava atrás desse sistema há um tempo e não achava em lugar nenhum. Estudei bastante sobre lua e depois de um tempo eu consegui fazer eu mesmo, então vou disponibilizá-lo para vocês. Eu testei o sistema em PDA (PokeXCyan) TFS 1.0, mas deve funcionar para outras bases. O script em si não é complexo, é apenas chato de adicionar os itens na tabela. Eu vou deixar a tabela que eu fiz com os itens que tem no servidor para qual eu fiz o script aqui embaixo como spoiler, para caso você queira poupar tempo. Essa tabela deve ser adicionada no começo do código em creaturescripts/look.lua. Caso queira adicionar o sistema para pokémon também, basta você pegar a tabela que está localizada em npc/pokemon seller.lua. Ao código: Em look.lua, procure por: elseif getItemAttribute(thing.uid, "unique") then substitue o else return true end que está "linkado" a esse IF por elseif NPCPrice[iname.name] then local qnt = 0 if thing.type == 0 then qnt = 1 else qnt = thing.type end local p = getThingPos(thing.uid) local calculo = NPCPrice[iname.name].price * qnt table.insert(str, "You see ") if thing.type > 1 then table.insert(str, thing.type.." "..iname.plural..".") else table.insert(str, iname.article.." "..iname.name..".") end table.insert(str, "\n"..iname.description.." Price: $"..calculo..".") if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then table.insert(str, "\nItemID: ["..thing.itemid.."]") table.insert(str, "\nPosition: ["..p.x.."]["..p.y.."]["..p.z.."]") end sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str)) return false else return true end Ficando assim: Caso queira que o preço no look funcione para pokémon também, procure por table.insert(str, "It is genderless.") tem 3 linhas iguais a esse no look.lua. A linha na qual eu me refiro é a primeira encontrada no arquivo. Depois do end, adicione: local boosts = getItemAttribute(thing.uid, "boost") or 0 local precocertos = 0 if boosts > 50 then precocertos = ((gastostones[50] * 5) * 400) + ((boosts - 50) * 100000) else precocertos = ((gastostones[boosts] * 5) * 400) end if getItemAttribute (thing.uid, "ehditto") then pokename = "Ditto" end local pokeCost = pokePrice[pokename] or math.floor(pokes[pokename].level * 150) if pokename == "Ditto" then table.insert (str, " Not sellable.") elseif pokes[pokename] then if boosts == 0 then table.insert (str, " Price: $"..pokeCost) else table.insert (str, " Price: $"..pokeCost.. " + $"..precocertos.. " (BOOST)") end end E pronto, o preço no look está adicionado ao seu servidor. @EDIT: Vou postar também o script do Pokémon Seller, porque ele estava bugado no meu servidor, provavelmente estará no servidor de vocês também. npcs/scripts pokemon seller.lua
  11. Script..?
  12. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    Rapaz, tenta explicar melhor... entendi vários nada
  13. Lembre-se de colocar a quantidade de cada item no config. qnt1 se refere ao t1 e a qnt2 se refere ao t2. local config = { ["Magic Plate Armor"] = {t1 = 2476, t2 = 2464, t3 = 2472, qnt1 = 10, qnt2 = 15}, -- t1 = ID do ITEM 1 |---| t2 = ID do ITEM 2 |---| t3 = ID do ITEM a ser FORJADO -- ["Dragon Scale Mail"] = {t1 = 2489, t2 = 2487, t3 = 2492, qnt1 = 20, qnt2 = 5}, } function onUse(cid, item, item2, frompos, topos, pos) local r1 = {x = 222, y = 217, z = 7, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 224, y = 217, z = 7, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 223, y = 217, z = 7} -- Posição do Item a Ser Criado local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) for i, x in pairs(config) do if q1.itemid == x.t1 and q2.itemid == x.t2 then if q1.type >= x.qnt1 and q1.type >= x.qnt2 then doRemoveItem(q1.uid, x.qnt1) doRemoveItem(q2.uid, x.qnt2) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end elseif q1.itemid == x.t2 and q2.itemid == x.t1 then if q1.type >= x.qnt2 and q1.type >= x.qnt1 then doRemoveItem(q1.uid, x.qnt1) doRemoveItem(q2.uid, x.qnt2) addEvent(doCreateItem, 1000, x.t3, 1, r3) doSendMagicEffect(r3, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end end return TRUE end
  14. Troque local bag = doCreateItemEx(12694) -- cubone bag de gratis por local bag = doPlayerAddItem(cid, 12694, 1)
  15. local position2 = getThingPos (getCreatureTarget(cid)) Verifique os effects. Acho que o Susano é o 20 e o fogo é 248.
  16. Tenta assim: function onEquip (cid, item, slot) if getPlayerSlotItem(cid, 5).itemid == 12707 or getPlayerSlotItem(cid, 6).itemid == 12707 then doPlayerSendTextMessage (cid, 19, "Você deve estar equipado com um "..getItemNameById (12707)..".") return false end if getPlayerSlotItem (cid, 10).itemid == 12916 then doPlayerSendTextMessage (cid, 19, getItemNameById (12916).." não é utilizada neste arco.") return false end end
  17. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    doBroadcastMessage (getCreatureName(cid).." Viajou Para Ilha Da Equipe!")
  18. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    doPlayerSendCancel(cid,"ADM Viajou Para Ilha Da Equipe!") -> doBroadcastMessage ("ADM Viajou Para Ilha Da Equipe!")
  19. Bodak Reborn postou uma resposta no tópico em Suporte Tibia OTServer
    @kauan13, doSendMagicEffect(getPlayerPosition(cid), NÚMERO_DO_EFEITO)

Informação Importante

Confirmação de Termo