Ir para conteúdo

luangop

Membro
  • Registro em

  • Última visita

Tudo que luangop postou

  1. luangop analisou o(a) análise em um evento de Bruno Carvalho em Calendário Oficial

    Data abençoada por Deus! Esse fórum já me ajudou inúmeras vezes, e agora tento ajudar a quem precisa com o conhecimento que aqui aprendi! =)
  2. Pequeno erro meu de digitação. Nos scripts das portas, onde tem essa linha: doPlayerAddMoney(cid, atualPremioo * 20000) Substitua por: doPlayerAddMoney(cid, atualPremioo * 200000)
  3. NPC: PORTA 150+: PORTA 150-:
  4. Achei muita bagunça no movement Teste assim: function onStepIn(cid, item, position, fromPosition) local newPosition = {x=632, y=737, z=7} if not isPlayer(cid) then return true end if getPlayerStorageValue(cid, 10102) and (getPlayerStorageValue(cid, 10102) - os.time()) <= 0 then doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 19, "Voce nao possui acesso vip, faça a quest!.") return true end doPlayerSendTextMessage(cid, 19, "Bem Vindo a ViP 1.") doSendMagicEffect(getPlayerPosition(cid), 2) doTeleportThing(cid, newPosition) doSendMagicEffect(newPosition, 10) return true end
  5. Poste também a lib desse sistema, pois esta faltando informações. Seu servidor responde bem a globalstorage?
  6. Script que eu usava em um antigo servidor meu... (é um creaturescript, baseado no sistema de premium, caso seu sistema de vip for por storage, poste qual a storage que eu modifico para vc) data/creaturescripts/creaturescripts.xml <event type="login" name="VipText" event="script" value="VipText.lua"/> data/creaturescripts/scripts VipText.lua function VipText(cid) local texts = {"[VIP]", "[ViP]", "[vIp]", "[Vip]", "[viP]"} if isPlayer(cid) and isPremium(cid) and getPlayerGroupId(cid) <= 3 then doSendAnimatedText(getThingPos(cid), texts[math.random(1, #texts)], math.random(255)) addEvent(function() if isPlayer(cid) then VipText(cid) end end, 500) end return true end function onLogin(cid) registerCreatureEvent(cid, "VipText") VipText(cid) return true end Opa, foi mal @Guilty, quando vc respondeu eu ja estava digitando rsrs
  7. local poke = {"Arceus", "Black Mega Alakazam", "Shiny Arceus", "Shiny King Arceus", "Black Arceus", "King Arceus", "Shiny Mr. Mime", "Mega Mewtwo", "Shadow Jirachi", 'Mew', 'Mewtwo', 'Mesprit', 'Mega Alakazam', 'Jirachi', 'Shiny Jirachi', 'Shadow Jirachi', 'Red Jirachi', 'Azelf', 'Manaphy', 'Reshiram', 'Zekrom', 'Ancient Slowking', 'Deoxys', 'Shiny Deoxys', 'Deoxys Attck', 'Deoxys Defense', 'Deoxys Speed', 'Abra', 'Kadabra', 'Alakazam', 'Drowzee', 'Hypno', 'Mr. Mime', 'Porygon', 'Shiny Abra', 'Shiny Alakazam', 'Shiny Hypno', 'Porygon2', "Jynx", "Shiny Jynx", "Slowking", "Girafarig", "Misdreavus", "Exeggutor", "Shiny Espeon"} --alterado v1.9 local etele = 9 local cdtele = 1 local config = { premium = false, -- se precisa ser premium account (true or false) battle = true -- se precisa estar sem battle (true). Se colocar false, poderá usar teleport no meio de batalhas } local places = { [1] = {name = "Saffron", id = 1, sto = 897530}, [2] = {name = "Cerulean", id = 2, sto = 897531}, [3] = {name = "Lavender", id = 3, sto = 897532}, [4] = {name = "Fuchsia", id = 4, sto = 897533}, [5] = {name = "Celadon", id = 5, sto = 897534}, [6] = {name = "Viridian", id = 6, sto = 897535}, --alterado v1.7 [7] = {name = "Vermilion", id = 7, sto = 897536}, [8] = {name = "Pewter", id = 8, sto = 897537}, [9] = {name = "Pallet", id = 9}, [10] = {name = "Cinnabar", id = 10, sto = 897538}, [11] = {name = "Snow", id = 11, sto = 897539}, [12] = {name = "House Isle", id = 17, sto = 897540}, [13] = {name = "Duos", id = 15, sto = 897541}, [14] = {name = "Orre", id = 18, sto = 897542}, [15] = {name = "Canavale", id = 20, sto = 897543}, [16] = {name = "LaRose", id = 19, sto = 897544}, } function onSay(cid, words, param) if #getCreatureSummons(cid) == 0 then doPlayerSendCancel(cid, "You need a pokemon to use teleport.") return true end if not isInArray(poke, getCreatureName(getCreatureSummons(cid)[1])) then return 0 end if getPlayerStorageValue(cid, 22545) == 1 then --golden arena doPlayerSendCancel(cid, "You can't do that while the golden arena!") return true end if getPlayerStorageValue(cid, 212124) >= 1 then --alterado v1.6 return doPlayerSendCancel(cid, "You can't do it with a pokemon with mind controlled!") end if getPlayerStorageValue(cid, 52480) >= 1 then return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v1.6 end if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v1.7 end if exhaustion.get(cid, etele) and exhaustion.get(cid, etele) > 0 then local tempo = tonumber(exhaustion.get(cid, etele)) or 0 local min = math.floor(tempo) doPlayerSendCancel(cid, "Your pokemon is tired, wait "..getStringmytempo(tempo).." to teleport again.") return true end if config.premium and not isPremium(cid) then doPlayerSendCancel(cid, "Only premium members are allowed to use teleport.") return true end if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.") return true end if (param == '') then local str = "" str = str .. "Places to go :\n\nHouse\n" for a = 1, #places do str = str..""..places[a].name.."\n" end doShowTextDialog(cid, 7416, str) return true end local item = getPlayerSlotItem(cid, 8) local nome = getPokeballName(item.uid) local summon = getCreatureSummons(cid)[1] local lastppos = getThingPos(cid) local lastspos = getThingPos(summon) local telepos = {} local myplace = "" local townid = 0 local citySto = 0 --alterado v1.7 if string.lower(param) == "house" then if not getHouseByPlayerGUID(getPlayerGUID(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You don't own a house.") return true end telepos = getHouseEntry(getHouseByPlayerGUID(getPlayerGUID(cid))) myplace = "our home" else for x = 1, #places do if string.find(string.lower(places[x].name), string.lower(param)) then townid = places[x].id myplace = places[x].name citySto = places[x].sto or -1 --alterado v1.7 end end if myplace == "" then doPlayerSendCancel(cid, "That place doesn't exist.") return true end end if myplace ~= "" and townid > 0 then telepos = getTownTemplePosition(townid) end if getDistanceBetween(getThingPos(cid), telepos) <= 15 then doPlayerSendCancel(cid, "You are too near to the place you want to go!") return true end if myplace == ("Orre" or "Canavale" or "LaRose") and not isPremium(cid) then doPlayerSendCancel(cid, "Somente jogadores VIP podem ir para esta cidade!") return true end doSendMagicEffect(getThingPos(summon), 29) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, telepos, false) local pos2 = getClosestFreeTile(cid, getPosByDir(getThingPos(cid), SOUTH)) doTeleportThing(summon, pos2, false) doSendMagicEffect(getThingPos(cid), 29) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1) doCreatureSay(cid, ""..nome..", teleport to "..myplace.."!", 1, false, 0, lastppos) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER) doCreatureSay(summon, "TELEPORT!", TALKTYPE_MONSTER, false, 0, lastspos) doCreatureSetLookDir(cid, SOUTH) doCreatureSetLookDir(summon, SOUTH) doSendMagicEffect(getThingPos(summon), CONST_ME_TELEPORT) exhaustion.set(cid, etele, cdtele) setPlayerStorageValue(cid, 98796, -1) setPlayerStorageValue(cid, 98797, -1) return true end Não testei.
  8. Olá, já vi vários tópicos aqui no fórum falando sobre o limite de level (717217), encontrei alguns tutoriais por talkaction, achei um que altera na source, mas nenhum foi 100% funcional. Pois por estes meios, quando funciona, se o player morre depois do 717217 volta para level 1. E vi em alguns servidores, um deles o The Heroes of Time, que é possível upar até level 1kk, sem nenhum bug de voltar level ao morrer nem nada. Então lanço o desafio: Será que conseguimos fazer isso? TFS 0.4 rev 3777 Conto com a ajuda e colaboração de vocês pessoal!
  9. Yurots mais remoto que este, apenas se buscar pelos 8.0~8.1.... Mapa completamente cru, ao estilo Yurots do GOD Bon. Yurots_1.2_[8.6].rar
  10. function onThink(interval, lastExecution, thinkInterval) local pos1 = {x=160, y=70, z=8} local pos2 = {x=400, y=340, z=5} local pos3 = {x=300, y=600, z=9} local monsters = {"Dragon", "Demon", "Hydra"} local possibilidades = {pos1, pos2, pos3} local xpos = possibilidades[math.random(1,#possibilidades)] local monster = monsters[math.random(#monsters)] doCreateMonster(monster, xpos, false) doBroadcastMessage("[INVASAO AUTOMATICA] Acabou de nascer um ".. monster .." em algum lugar aleatorio do mapa!") return true end
  11. data/globalevents/scripts crie o arquivo cria_tp.lua function onTimer() local config = { pos_criar_tp = {x=XXX,y=YYY,z=Z}, pos_do_evento = {x=XXX,y=YYY,z=Z}, tempo_tirar_teleport = 2, -- Em minutos mensagem_quando_abre = "Zombie event foi aberto, portal fechará em 2 minutos.", mensagem_quando_fecha = "Zombi Event Começou !" } function removeTp() local t = getTileItemById(pos_criar_tp, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(pos_criar_tp, CONST_ME_POFF) doBroadcastMessage(config.mensagem_quando_fecha) end end doBroadcastMessage(config.mensagem_quando_abre) doCreateTeleport(1387, config.pos_do_evento, config.pos_criar_tp) addEvent(removeTp, config.tempo_tirar_teleport * 60 * 1000) return true end Acho que está bem fácil de entender e configurar. data/globalevents/globalevents.xml Adicione a tag: <globalevent name="CriaTeleport" time="08:00" event="script" value="cria_tp.lua"/> <globalevent name="CriaTeleport" time="12:00" event="script" value="cria_tp.lua"/> <globalevent name="CriaTeleport" time="17:00" event="script" value="cria_tp.lua"/> <globalevent name="CriaTeleport" time="22:00" event="script" value="cria_tp.lua"/> Tem como definir mais de um horario na mesma tag, mas n lembro como faz, entao cria uma tag para cada horario que deseja criar o teleport.
  12. Data/movements/movements.xml Add a tag: <movevent type="StepIn" actionid="666" event="script" value="verificar_item.lua"/> actionid="666" ~ altere para o action ID que deseja utilizar, o qual deve botar no tile pelo map editor. data/movements/scripts crie o arquivo verificar_item.lua script: function onStepIn(cid, item, position, fromPosition) local itemproibido = ID_DO_ITEM if not isPlayer(cid) then return true end if getPlayerItemCount(cid, itemproibido) >= 1 then doSendAnimatedText(getThingPos(cid), "[FAIL]", 187) doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce nao pode entrar aqui tendo ".. getItemNameById(itemproibido) .."!") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED) return true else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Boa viajem!") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN) doSendAnimatedText(getThingPos(cid), "[OK]", 102) return true end end local itemproibido = ID_DO_ITEM ~ coloque o ID do item que o script deve verificar.
  13. function onThink(interval, lastExecution, thinkInterval) local pos1 = {x=160, y=70, z=8} local pos2 = {x=400, y=340, z=5} local pos3 = {x=300, y=600, z=9} local monsters = {"Dragon", "Demon", "Hydra"} local xpos = math.random(pos1, pos2, pos3) local monster = monsters[math.random(#monsters)] doCreateMonster(monster, xpos, false) doBroadcastMessage("[INVASAO AUTOMATICA] Acabou de nascer um ".. monster .." em algum lugar aleatorio do mapa!") return true end Ai está o script para sua globalevent, basta criar a tag no globalevents.xml com interval de 1 hora.
  14. function onUse(cid, item, fromPosition, itemEx, toPosition) local value = math.random(1, 100) local ids = { gold = XXXX, platinum = XXXX, small = XXXX, crystal = XXXX, -- raro } if value > 0 and value <= 30 then premio = ids.gold elseif value > 30 and value < 61 then premio = ids.platinum elseif value > 60 and value < 91 then premio = ids.small elseif value > 90 and value < 101 then premio = ids.crystal end if(itemEx.itemid == 11221) then doRemoveItem(itemEx.uid, 1) doPlayerAddItem(cid, premio, 1, TRUE) doSendMagicEffect(toPosition, CONST_ME_POFF) return true end return false end
  15. Qual seu TFS? Poste aqui o ID dessa shiny stone e descreva melhor o que ela deve fazer, que a gente cria pra vc.
  16. Apenas delete as linhas: E o sistema da stone não vai alterar o HP e Happy do poke.
  17. function onLogin(player) local targetVocation = config[player:getVocation():getId()] if not targetVocation then return true end if player:getLastLoginSaved() ~= 0 then return true end for i = 1, #targetVocation.items do player:addItem(targetVocation.items[1], targetVocation.items[2]) end if player:getStorageValue(15002) == 0 then player:setStorageValue(15002, 1) -- Mining Skill player:setStorageValue(15003, 0) -- Mining Skill Tries return true end local backpack = player:addItem(1988) if not backpack then return true end for i = 1, #targetVocation.container do backpack:addItem(targetVocation.container[1], targetVocation.container[2]) end return true end
  18. Tente assim: local config = { pos = {x=753, y=1544, z=6}, topos = {x=892, y=2659, z=7}, time = 5, -- tempo que o teleport ira sumir em minutos msg_open = "O Portal para a Quest Diaria Vai se Abrir. E Tente Ganhar Blue Tokens. Corra para a sala de Quests, Voce tem 5 Minutos!", msg_close = "O Portal para Quest Diaria se Fechou. Tente Amanha no mesmo Horario!" } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onTime() if (os.date("%A") == "Monday" or "Tuesday" or "Wednesday" or "Thursday" or "Friday" or "Sunday") then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time*60*1000) addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close) end return true end
  19. luangop postou uma resposta no tópico em Suporte Tibia OTServer
    function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Você precisa ser vip3.", msgWelcome = "Bem-Vindo a Area Vip3!." } if isPlayer(cid) then if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return true end end Desculpe a demora, estive meio ausente.
  20. Tente assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 29000) local timenow = os.time() if getPlayerStorageValue(cid, 29000) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 29000, time) local quantity = math.floor((getPlayerStorageValue(cid, 29000) - timenow)/(24 * 60 * 60)) local voc = getPlayerVocation(cid) if voc <= 4 then newvoc = voc + 8 elseif voc > 4 and voc <= 8 then newvoc = voc + 4 end doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") db.executeQuery("UPDATE `players` SET `vocation` = '".. newvoc .."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"Você será kickado em 5 segundos para mudança de nome.") doPlayerAddAddons(cid, 1) addEvent(doRemoveCreature, 5*1000, cid, true) end return TRUE end Se funcionar dessa forma, assim como o nick, o player vai vir com a promotion quando relogar.
  21. E a VIP, se mantém ou some também? Procure e poste pra mim a LIB do seu sistema de VIP, onde tem essa função function vip.hasVip e poste o script.
  22. action function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 29000) local timenow = os.time() if getPlayerStorageValue(cid, 29000) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 29000, time) local quantity = math.floor((getPlayerStorageValue(cid, 29000) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"Você será kickado em 5 segundos para mudança de nome.") doPlayerAddAddons(cid, 1) local voc = getPlayerVocation(cid) if voc <= 4 then newvoc = voc + 8 elseif voc > 4 and voc <= 8 then newvoc = voc + 4 end doPlayerSetVocation(cid, newvoc) addEvent(doRemoveCreature, 5*1000, cid, true) end return TRUE end Creaturescript function onLogin(cid) local temple = { x =156, y = 112, z = 7} if vip.hasVip(cid) == true then if getPlayerStorageValue(cid,29000) ~= 1 then setPlayerStorageValue(cid,29000,1) end else if getPlayerStorageValue(cid,29000) == 1 then doTeleportThing(cid, temple) doPlayerSendTextMessage(cid, 22, "Sua vip acabou!") local voc = getPlayerVocation(cid) if voc > 8 and voc < 13 then newvoc = voc - 4 doPlayerSetVocation(cid, newvoc) end db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";") setPlayerPromotionLevel(cid, 1) setPlayerStorageValue(cid, 29000, 0) end end return true end function onLogin(cid) local name = string.gsub(""..getCreatureName(cid).."", ".VIP. ", "") if getPlayerStorageValue(cid, 29000) <= 0 then if getCreatureName(cid) ~= name then db.executeQuery("UPDATE `players` SET `name` = '"..name.."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 2*1000, cid, true) end end return true end
  23. Seu script de addvip está botando uma storage diferente. Isso irá corrigir: function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 29000) local timenow = os.time() if getPlayerStorageValue(cid, 29000) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 29000, time) local quantity = math.floor((getPlayerStorageValue(cid, 29000) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) db.executeQuery("UPDATE `players` SET `name` = '[VIP] "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"Você será kickado em 5 segundos para mudança de nome.") doPlayerAddAddons(cid, 1) addEvent(doRemoveCreature, 5*1000, cid, true) end return TRUE end Sobre a promotion, vc já tem ela configurada no vocations.xml? Se tiver, poste o ID das vocations que eu faço pra vc.
  24. function onTime() if not realCastle.isOpen() and (os.date("%A") == "Tuesday" or "Thursday" or "Saturday") then realCastle.open() else realCastle.close() end return true end

Informação Importante

Confirmação de Termo