Ir para conteúdo

Diego Rulez

Membro
  • Registro em

  • Última visita

Tudo que Diego Rulez postou

  1. @xWhiteWolf Vou estar postando duas screen shot, pra você entender melhor e poder ajudar a galera. Correto Incorreto No modelo numero 2 (Incorreto), o trainer invocado pelo sistema não ataca o player que utiliza os trainers.. Caso você sumone o trainer com o GM, ou qualquer outro monster, também não vai funcionar e se você andar extremamente para cima com os monsters na tela, você toma debug. (Isso corre em TFS 0.4, OTX2 e qualquer um baseado em TFS 0.4, nas outras não sei dizer).
  2. Se seu servidor estiver em desenvolvimento aconselho contratar um vps de R$ 15 em www.ovh.ca (É meio burocrático porque tem que enviar foto, scan de RG e tal, mas é o melhor). Se o seu servidor estiver pronto aconselho hospedar em http://www.jnetworks.com.br você vai ter um atendimento 24hrs por telefone/whatsapp e qualquer problema em relação a ataque ou a otserv você terá suporte. O dono dessa empresa já teve 3 OTS com 800+ online. Uso esse host, e já indiquei para vários aqui no TK, inclusive pra muita gente no Discord do TK. Todo mundo teve seus problemas resolvidos em 100% E qualquer host que funcione por meio de "ticket", se for revenda BR não presta: porque é sempre demorado e quando responde não soluciona nada.
  3. @xWhiteWolf eu consegui resolver o problema. Não sei dizer o porque acontece isso, mas no map editor quando você está muito pra cima no mapa, ou muito pra baixo, ele buga e da problema, em tudo, não só em scripts. Então eu recomendo um espaço de pelo menos uns 50 sqm para todas as direções quando for fazer qualquer coisa em um mapa, pois fica mais centralizado e funciona tudo. Sobre o sistema Pela OTland eu vi alguns scripts parecidos. Mas nesses scripts você precisa ficar limitando quantos slots de trainers vão ter, e cada tile no mapa editor vai com uma UniqId diferente e em sequencia. No seu script não, você cria apenas uma sala de trainer e vai dando ctrl+c e ctrl+v e vai colocando a quantidade de salas conforme a sua necessidade. Depois disso só informa no script as distancias e quantidades. Isso torna o script mais simples e rápido para quem configura e o torna o melhor sistema de trainers da atualidade. Sem contar que você faz um trainer room pequeno e fácil e tem uma área eficiente e bonita sem ficar se preocupando em mapear uma sala de trainer toda bonitona.. De qualquer forma, obrigado pela contribuição disponibilizando o sistema e pelo suporte em que tentou me ajudar. Rep+
  4. @xWhiteWolf Testei fazendo uma sala dessa maneira, e não deu resultados.. Puxei o trainer com o GM pra fora da área e também não funciona.. Quando tentei sumonar um trainer por ali sem entrar no TP eu tomei debug nos 2 chares..
  5. @xWhiteWolf já verifiquei sim.. Vou estar postando tudo certinho como estou usando e com imagens, tudo bem explicado pra facilitar.. Posso estar errando em algo simples, mesmo já tendo revisado várias vezes.. movements.xml <!-- Sistema de Trainers --> <movevent type="StepIn" actionid="14876" event="script" value="trainertp.lua"/> <movevent type="StepIn" actionid="14877" event="script" value="trainertp2.lua"/> Em data/movements/scripts/trainertp.lua local position = {x = 605, y = 7, z = 7} -- posicao da primeira pos (linha 1 coluna 1) local config = { distX= 3, -- distancia em X entre cada sala (de uma mesma linha) distY= 6, -- distancia em Y entre cada sala (de uma mesma coluna) rX= 60, -- numero de colunas rY= 48 -- numero de linhas } local storage = 18481 -- storage que salva a ultima vez que o player entrou (pra evitar spams) local function isWalkable(pos, creature, proj, pz)-- by Nord -- só adicione se vc já não tiver ela if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end local function check_disponivel(npos) if isWalkable(npos, true, true) then return true end return false end local function countdown(pos, Arraypos) if not check_disponivel(pos) then for lugares = 1, #Arraypos do creature = getTopCreature(Arraypos[lugares]).uid if not isCreature(creature)then doCreateMonster("Trainer", Arraypos[lugares]) doSendAnimatedText(Arraypos[lugares], "GO!!", TEXTCOLOR_ORANGE) doSendMagicEffect(Arraypos[lugares], 10) end end end end local function fazQualquerCoisa(cid, pos, i, j) -- isso é o coração do nosso script, nao mexa nisso j = j or 0 p = i or 0 if p >= config.rX then p = 0 j = j < config.rY -1 and j + 1 or false end if j then posi = {x = pos.x + ( p * config.distX), y = pos.y + (j * config.distY), z = pos.z} if check_disponivel(posi) then doTeleportThing(cid, posi) doSendMagicEffect(posi, 10) countdown(posi, {{x = posi.x - 1, y = posi.y + 1, z = posi.z}, {x = posi.x + 1 , y = posi.y + 1, z = posi.z}}) else fazQualquerCoisa(cid, pos, p + 1, j) end else doPlayerSendCancel(cid, "Couldn't find any position for you right now.") end end function onStepIn(cid, item, pos, lastPos, fromPos, toPos, actor) if getPlayerStorageValue(cid, storage) - os.time() <= 0 then fazQualquerCoisa(cid, position) else doTeleportThing(cid, fromPos) doPlayerSendCancel(cid, "You gotta wait a few seconds before you can enter trainning room again") end return true end Em data/movements/scripts/trainertp2.lua local npos = {x = 612, y = 642, z = 7} -- posição que ele vai ao sair da sala local storage = 18481 -- storage que salva a ultima vez que o player entrou (pra evitar spams) function onStepIn(cid, item, pos, lastPos, fromPos, toPos, actor) ArrayPos = {{x = fromPos.x - 1, y = fromPos.y + 1, z = fromPos.z}, {x = fromPos.x + 1 , y = fromPos.y + 1, z = fromPos.z}} for _, pos in ipairs(ArrayPos) do creature = getTopCreature(pos).uid if isMonster(creature)then doSendMagicEffect(getThingPos(creature), 14) doRemoveCreature(creature) end end doTeleportThing(cid, npos) doPlayerSetStorageValue(cid, storage, os.time() + 5) return true end Quando o player está no trainer, ele consegue atacar o trainer, mas o trainer não ataca ele.. A parte de rodar o char e comer food, eu não adicionei pois não pretendo usar por causa do otservlist..
  6. @xWhiteWolf Tudo está funcionando e sem nenhum erro no console.. Porém quando o player entra na sala de treinamento o trainer NÃO ataca ele.. O mesmo "trainer" quando sumonado por mim em outro lugar ataca normalmente o player Saberia me dizer como resolver? '-'
  7. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Gostaria de um script, para sempre que a pessoa entrar em um teleport, ela seja teleportada 20 sqm (configuravel quantos sqms e em qual direção: direita, esquerda, cima baixo) O numero de SQM e a direção são independentes da coordenada aonde está o teleport.. Exemplo: Se a pessoa está em X=10 e o script foi configurado em 10sqm para direita quando a pessoa entrar ela vai teleportar para o X=20 Se alguém puder ajudar eu agradeço!
  8. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Alguém pode ajudar? @xWhiteWolf
  9. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    @pablobion Tem como fazer um ring que da storage? Porque ai quando tiver com o ring ele anda pelos tiles.. quando tiver sem, ou o ring acabar, ele toma teleport!
  10. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Boa Tarde, gostaria de um script simples para teleportar quem não tem X storage.. A action é para ser colocada em um piso. Se o player tiver a storage X nada acontece, e ele pode andar pelo local normalmente. Se o player não tiver a storage X ele deve ser teleportado para o local xyz O intuito é se ele estiver com um ring, ele pode andar pela hunt se o ring acabar, ele vai para o templo Agradeço a quem puder ajudar!
  11. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    O script abaixo evolui a wand/rod do player conforme ele upa de level. Gostaria que me ajudassem a fazer o mesmo procedimento só que para paladins. local items = { {13,2191,2186,-1}, {19,2188,2185,0}, {22,8921,8911,1}, {26,2189,2181,2}, {33,2187,2183,3}, {37,8920,8912,4}, {45,8922,8910,5}, {99999999999} } local stuff = {2190,2182,2191,2188,8921,2189,2187,8920,8922,2186,2185,8911,2181,2183,8912,8910} function onAdvance(cid, skill, oldlevel, newlevel) local place = 0 local st = 23636 local blala = newLevel if isInArray({1,2,5,6},getPlayerVocation(cid)) then if skill == 8 then for x = 1, #items do if newlevel >= items[x][1] and newlevel < items[x+1][1] then place = x end end if place > 0 then if getPlayerStorageValue(cid,st) <= items[place][4] then local byvoc = getPlayerVocation(cid) if getPlayerVocation(cid) > 4 then byvoc = getPlayerVocation(cid)-4 end if isInArray(stuff,getPlayerSlotItem(cid,5).itemid) then doRemoveItem(getPlayerSlotItem(cid,5).uid) elseif isInArray(stuff,getPlayerSlotItem(cid,6).itemid) then doRemoveItem(getPlayerSlotItem(cid,6).uid) end doPlayerAddItem(cid,items[place][byvoc+1],1) doPlayerSendTextMessage(cid,4,"While upar his wand also evolved: "..getItemNameById(items[place][byvoc+1])..".") setPlayerStorageValue(cid,st,items[place][4]+1) end end end end return TRUE end Paladin (3), Royal Paladin (7) Item Inicial - Spear Level 20 - Hunting Spear Level 25 - Royal Spear Level 42 - Enchanted Spear Level 80 - Assassin Star Spear - ID:2389 | Hunting - ID:3965 | Royal - ID:7378 | Enchanted - ID:7367 | Assassin - ID:7368 Como as munições serão infinitas ao evoluir deve receber o item em 1x e não em 100x Se alguém puder ajudar eu agradeço.. Vlw :D
  12. @MaTTch @Biinhows Obrigado por ajudarem! Não precisei alterar a source e nem nada, acontece que em alguns itens nem tem o "showattributes" e o atributo aparece. No caso das bags e backpacks não aparece, e tem que ter a tag.. Enfim, pra ficar mais fácil vou postar abaixo o código completo que fez funcionar! Items.xml <item id="2365" article="a" name="backpack of holding"> <attribute key="weight" value="1800"/> <attribute key="containerSize" value="20"/> <attribute key="slotType" value="backpack"/> <attribute key="magiclevelpoints" value="3"/> <attribute key="showattributes" value="1" /> </item> O movements.xml não alterei nada, ficou igual ao postado lá em cima por mim!
  13. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Preciso que a primeira vez que um player logue e sua premium tenha expirado ele seja teleportado para o templo e tenha seu Outfit alterado. Mas somente na primeira vez em que ele logar e tiver sem premium.. Não utilizo sistema vip, e sim a propria premium do game.. O membro @pablobion fez um script pra mim, mas toda vez que um player free loga ele é teleportado e tem o outfit alterado, e deveria ser como expliquei acima.. if getPlayerPremiumDays(cid) < 1 then doTeleportThing(cid, {x=655, y=1014, z=7}) -- pos to tp doPlayerSetTown(cid, 1) -- town id doCreatureChangeOutfit(cid, {lookType = 128, lookHead = 78, lookBody = 69, lookLegs = 58, lookFeet = 76 }) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You got teleported to temple, as your premium has expired.") doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) end Alguém poderia ajudar?
  14. @MaTTch, acredito que seja isso, porque quando eu determino uma vocação, ele funciona! Só realmente não aparece o atributo atribuído.. Saberia me dizer como eu ajeito isso na source? @pablobion já tentei de tudo mano..
  15. Gostaria de saber como posso colocar atributos em uma backpack.. Parece simples né? Mas não estou conseguindo! Provavelmente isso não tem haver, mas antes que perguntem: Distro OTX, baseada em TFS 0.4 Item.xml <item id="2365" article="a" name="backpack of holding"> <attribute key="weight" value="1800"/> <attribute key="containerSize" value="20"/> <attribute key="slotType" value="backpack"/> <attribute key="magiclevelpoints" value="3"/> </item> Movements.xml <!-- Backpacks --> <movevent type="Equip" itemid="2365" slot="backpack" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2365" slot="backpack" event="function" value="onDeEquipItem"/> Alguém pode me ajudar? :x
  16. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Upei o tópico porque depois de um tempo percebi um erro.. No primeiro teste, tudo deu certo, mas percebi um erro depois. Quando o player é free, sempre que ele loga ele tem o Outfit alterado e é teleportado, e na verdade isso deveria acontecer sempre no primeiro login quando a premium acabar.. Alguém poderia ajudar? @pablobion
  17. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    SOLVED! RESOLVIDO @pablobion obrigado REP+
  18. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Distro OTX Gostaria de um creaturescript para: - Transportar o player para a cidade principal (town 1) - Mudar para o outfit citizen - Voltar a vocação (de 8 para 4, de 7 para 3, de 6 para 2 e de 5 para 1) Tudo isso quando a PREMIUM terminar. Não utilizo sistema vip, utilizo a premium do próprio server. Obrigado!!
  19. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    @xWhiteWolf Teria como fazer o script pra mim tudo certinho? Não entendo quase nada de scripts :\
  20. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Versão 8.60 Distro OTX Gostaria da spell Sharpshooter (utito tempo san) funcional igual a do global que contém as seguintes características: 1- Aumentar o distance em 50% por 10 segundos 2- Enquanto a magia estiver ativa por 10 segundos o player fica paralisado 3- Durante os 10 segundos não ser possível utilizar spells de correr e nem spells de healing 4- Não ter nenhuma possibilidade de "cancelar" a magia. Será obrigatório esperar os 10 segundos Parece ser muito simples né, mas já vi centenas de tópicos sobre isso e nenhum tem a resolução. E por favor, não quero ser arrogante, mas não copie o script de alguma pasta data e venha postar, pois não funciona. Poste apenas se você tiver um script realmente funcional ou se entender de scripts. @Absolute @Vodkart @xWhiteWolf
  21. Muito obrigado @Liipe Silva Testei aqui, coloquei um item em cada porcentagem e o que coloquei em 90% veio 16/20 Script feito, problema resolvido! REP+
  22. @Liipe Silva Ainda não testei, mas parece funcional.. Só que no caso esqueci de citar que eu colocaria mais itens.. Como ficaria?
  23. Estou utilizando um script feito pelo @Wise e @Absolute que sorteia um item para o player quando ele utiliza certo item. function onUse(cid, item, fromPos, toPos) local items = {2160, 2157} doPlayerAddItem(cid, items[math.random(1, #items)], 1) doSendMagicEffect(fromPos, CONST_ME_GIFT_WRAPS) doCreatureSay(cid, 'Congratulations!', TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) return true end Teria como adicionar a chance que o player tem de ganhar os itens? Por exemplo tem 10% de chance de ganhar o 2157 e 90% de chance de ganhar o 2160. Desde já agradeço, e fico no aguardo para alguma solução!
  24. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Meu pedido é bem simples, ultimamente tenho trabalho em Old Server, na versão 7.72 e como é caracteristico da versão, os players podem viajar enquanto estão com PZ/Skull. Porém em um NPC normal como é da versão, ele conversa com 1 por vez.. Então eu gostaria de 2 coisas no NPC: 1- Ele conversar e transportar quem fala: hi, city, yes 2- Ele automaticamente transportar qualquer um que não fala HI, ou que ele não esteja conversando, quando o player falar: bring me to city (em city o nome da cidade, ex: carlin - bring me to carlin) 3- /\ Cobrar o mesmo preço nas 2 opçoes. Tenho 2 scripts que fazem essa função, porém um faz só a primeira e o outro faz só a segunda. Gostaria no caso, que fizessem uma junção dos dois, ou algo diferente mas que funcione como expliquei. Espero que possam me ajudar, abaixo os scripts Utilizo a distro OTX Version Lord Zedd para 7.72 Normal --------------------By Jpkulik!---------------------------- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end -- Set the greeting message. npcHandler:setMessage(MESSAGE_GREET, HelloText) function onThink() npcHandler:onThink() end -- OTServ event handling functions end ---------------------------------------MENSAGES CONFIG-------------------------------------------- local HelloText = 'Hello |PLAYERNAME|. Welcome to my Boat!' local HelpText = 'Do you need help?I can tell you some {destinations}.' local DestinationText = 'I can take you to {Carlin}, {Gengia}, {Ab\'Dendriel}, {Thais}, {Venore}, {Edron}, {Darashia}, {Ankrahmun} and {Port Hope}.' local CitysText = 'I can take you to {Carlin}, {Gengia}, {Ab\'Dendriel}, {Kazordoon}, {Thais}, {Venore}, {Edron}, {Darashia}, {Ankrahmun} and {Port Hope}.' local JobText = 'Im an Captain, and this is my Boat.' ---------------------------------------END MENSAGES CONFIG---------------------------------------- ---------------------------------------CARLIN CONFIG---------------------------------------------- local CarlinPosition = {x=32388, y=31821, z=6} ----> Destination from Carlin Boat <---- local CarlinCost = 0 ----> Cost to Travel for Carlin <---- carlin = true ---->TRUE:Working/FALSE:Not Working<---- ---------------------------------------END CARLIN CONFIG------------------------------------------ ---------------------------------------GENGIA CONFIG---------------------------------------------- local GengiaPosition = {x=31634, y=32029, z=4} ----> Destination from Gengia Boat <---- local GengiaCost = 0 ----> Cost to Travel for Gengia <---- gengia = true ---->TRUE:Working/FALSE:Not Working<---- ---------------------------------------END GENGIA CONFIG------------------------------------------ ---------------------------------------AB'DENDRIEL CONFIG----------------------------------------- local AbDendrielPosition = {x=32734, y=31669, z=6} ----> Destination from Ab\'Dendriel Boat <---- local AbDendrielCost = 0 ----> Cost to Travel for Ab\'Dendriel <---- AbDendriel = true ----> TRUE:Working/FALSE:Not Working <---- ---------------------------------------END AB'DENDRIEL CONFIG------------------------------------- ---------------------------------------VENORE CONFIG---------------------------------------------- local VenorePosition = {x=32954, y=32022, z=6} ----> Destination from Venore Boat <---- local VenoreCost = 0 ----> Cost to Travel for Venore <---- Venore = true ----> TRUE:Working/FALSE:Not Working<--- ---------------------------------------END VENORE CONFIG------------------------------------------ ---------------------------------------THAIS CONFIG----------------------------------------------- local ThaisPosition = {x=32310, y=32210, z=6} ----> Destination from Thais Boat <---- local ThaisCost = 0 ----> Cost to Travel for Thais <---- Thais = true ---->TRUE:Working/FALSE:Not Working<--- ---------------------------------------END THAIS CONFIG------------------------------------------- ---------------------------------------EDRON CONFIG----------------------------------------------- local EdronPosition = {x=33176, y=31764, z=6} ----> Destination from Edron Boat <---- local EdronCost = 0 ----> Cost to Travel for Edron <---- Edron = true ----> TRUE:Working/FALSE:Not Working<-- ---------------------------------------END EDRON CONFIG------------------------------------------- ---------------------------------------DARASHIA CONFIG-------------------------------------------- local DarashiaPosition = {x=33290, y=32481, z=6} ----> Destination from Darashia Boat <---- local DarashiaCost = 0 ----> Cost to Travel for Darashia <---- Darashia = true ----> TRUE:Working/FALSE:Not Working <---- ---------------------------------------END DARASHIA CONFIG---------------------------------------- ---------------------------------------PORT HOPE CONFIG------------------------------------------- local PortHopePosition = {x=32530, y=32784, z=6} ----> Destination from Port Hope Boat <---- local PortHopeCost = 0 ----> Cost to Travel for Port Hope <---- PortHope = true ----> TRUE:Working/FALSE:Not Working <---- ---------------------------------------END PORT HOPE CONFIG--------------------------------------- ---------------------------------------ANKRAHMUN CONFIG------------------------------------------- local AnkPosition = {x=33092, y=32884, z=6} ----> Destination from Ankrahmun Boat <---- local AnkCost = 0 ----> Cost to Travel for Ankrahmun <---- Ank = true ----> TRUE:Working/FALSE:Not Working <---- ---------------------------------------END ANKRAHMUN CONFIG--------------------------------------- ---CARLIN----------------------------------------------------------------------------------------------------------------------------------------- local CarlinText = 'Do you want to Travel to Carlin for 0 gold coins?' local CarlinTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local CarlinLvl = 8 local CarlinPremium = true --True/false --Carlin-- if carlin == true then local travelNode = keywordHandler:addKeyword({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = CarlinText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = CarlinPremium, level = CarlinLvl, cost = CarlinCost, destination = CarlinPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = CarlinTextNo }) else local travelNode = keywordHandler:addKeyword({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Carlin-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Venore----------------------------------------------------------------------------------------------------------------------------------------- local VenoreText = 'Do you want to Travel to Venore for 0 gold coins?' local VenoreTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local VenoreLvl = 8 local VenorePremium = true --True/false --Venore-- if Venore == true then local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = VenoreText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = VenorePremium, level = VenoreLvl, cost = VenoreCost, destination = VenorePosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = VenoreTextNo }) else local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Venore-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Kazordoon----------------------------------------------------------------------------------------------------------------------------------------- local KazordoonText = 'Do you want to Travel to Kazordoon for 0 gold coins?' local KazordoonTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local KazordoonLvl = 8 local KazordoonPremium = false --True/false --Kazordoon-- if Kazordoon == true then local travelNode = keywordHandler:addKeyword({'kazordoon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = KazordoonText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = KazordoonPremium, level = KazordoonLvl, cost = KazordoonCost, destination = KazordoonPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = KazordoonTextNo }) else local travelNode = keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Venore-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Thais----------------------------------------------------------------------------------------------------------------------------------------- local ThaisText = 'Do you want to Travel to Thais for 0 gold coins?' local ThaisTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local ThaisLvl = 8 local ThaisPremium = true --True/false --Thais-- if Thais == true then local travelNode = keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = ThaisText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = ThaisPremium, level = ThaisLvl, cost = ThaisCost, destination = ThaisPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = ThaisTextNo }) else local travelNode = keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Thais-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---AbDendriel----------------------------------------------------------------------------------------------------------------------------------------- local AbDendrielText = 'Do you want to Travel to Ab\'Dendriel for 90 gold coins?' local AbDendrielTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local AbDendrielLvl = 8 local AbDendrielPremium = true --True/false --AbDendriel-- if AbDendriel == true then local travelNode = keywordHandler:addKeyword({'ab\'dendriel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = AbDendrielText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = AbDendrielPremium, level = AbDendrielLvl, cost = AbDendrielCost, destination = AbDendrielPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = AbDendrielTextNo }) else local travelNode = keywordHandler:addKeyword({'ab\'dendriel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End AbDendriel-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Edron----------------------------------------------------------------------------------------------------------------------------------------- local EdronText = 'Do you want to Travel to Edron for 0 gold coins?' local EdronTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local EdronLvl = 8 local EdronPremium = true --True/false --Edron-- if Edron == true then local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = EdronText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = EdronPremium, level = EdronLvl, cost = EdronCost, destination = EdronPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = EdronTextNo }) else local travelNode = keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End AbDendriel-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Darashia----------------------------------------------------------------------------------------------------------------------------------------- local DarashiaText = 'Do you want to Travel to Darashia for 0 gold coins?' local DarashiaTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local DarashiaLvl = 8 local DarashiaPremium = true --True/false --Darashia-- if Darashia == true then local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = DarashiaText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = DarashiaPremium, level = DarashiaLvl, cost = DarashiaCost, destination = DarashiaPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = DarashiaTextNo }) else local travelNode = keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Darashia-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Port Hope----------------------------------------------------------------------------------------------------------------------------------------- local PortHopeText = 'Do you want to Travel to Port Hope for 0 gold coins?' local PortHopeTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local PortHopeLvl = 8 local PortHopePremium = true --True/false --Port Hope-- if PortHope == true then local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = PortHopeText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = PortHopePremium, level = PortHopeLvl, cost = PortHopeCost, destination = PortHopePosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = PortHopeTextNo }) else local travelNode = keywordHandler:addKeyword({'port hope'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Port Hope-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Liberty Bay----------------------------------------------------------------------------------------------------------------------------------------- local LibertyBayText = 'Do you want to Travel to Liberty Bay for 0 gold coins?' local LibertyBayTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local LibertyBayLvl = 8 local LibertyBayPremium = true --True/false --Liberty Bay-- if LibertyBay == true then local travelNode = keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = LibertyBayText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = LibertyBayPremium, level = LibertyBayLvl, cost = LibertyBayCost, destination = LibertyBayPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = LibertyBayTextNo }) else local travelNode = keywordHandler:addKeyword({'liberty bay'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Liberty Bay-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Ankrahmun----------------------------------------------------------------------------------------------------------------------------------------- local AnkText = 'Do you want to Travel to Ankrahmun for 0 gold coins?' local AnkTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local AnkLvl = 8 local AnkPremium = true --True/false --Ankrahmun-- if Ank == true then local travelNode = keywordHandler:addKeyword({'ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = AnkText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = AnkPremium, level = AnkLvl, cost = AnkCost, destination = AnkPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = AnkTextNo }) else local travelNode = keywordHandler:addKeyword({'ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End Ankrahmun-- --------------------------------------------------------------------------------------------------------------------------------------------------- ---Svargrond----------------------------------------------------------------------------------------------------------------------------------------- local SvargrondText = 'Do you want to Travel to Svargrond for 0 gold coins?' local SvargrondTextNo = 'Ok, come back when you want then!' local NoTravel = 'Sorry, i do not travel to this city..' local SvargrondCost = 10 local SvargrondPremium = true --True/false --Svargrond-- if Svargrond == true then local travelNode = keywordHandler:addKeyword({'svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = SvargrondText }) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = SvargrondPremium, level = SvargrondLvl, cost = SvargrondCost, destination = SvargrondPosition }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = SvargrondTextNo }) else local travelNode = keywordHandler:addKeyword({'svargrond'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = NoTravel }) end --End AbDendriel-- --------------------------------------------------------------------------------------------------------------------------------------------------- keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = DestinationText }) keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = JobText }) keywordHandler:addKeyword({'citys'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = CityText }) keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = HelpText }) -- Makes sure the npc reacts when you say hi, bye etc. npcHandler:addModule(FocusModule:new()) Com o bring me to: -- Town name, Price, x.pos, y.pox, z.pos -- local config = { ["Thais"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}}, ["Venore"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}}, ["Carlin"] = {cost = 100, location = {x = 32388, y = 31821, z = 6}}, ["Ab'dendriel"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}}, ["Darashia"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}}, ["Ankrahmun"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}}, ["Por Hope"] = {cost = 100, location = {x = 31310, y = 32210, z = 6}} } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState, xmsg = {}, {} local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local tm = config[msg:lower()] if msgcontains(msg, "bring me to") then for mes, t in pairs(config) do if msgcontains(msg, mes) then if isPlayerPzLocked(cid) == true then doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Those hands look pretty bloody") npcHandler:say("Hah, Seems like you got blood on your hands you shall not sail with me.", cid) return false end if doPlayerRemoveMoney(cid, t.cost) then npcHandler:say("You paid ".. t.cost .." gold coins to travel and you have ".. getPlayerMoney(cid) .." gold coins left in your backpack", cid) doTeleportThing(cid, t.location) else npcHandler:say("I am sorry you have ".. getPlayerMoney(cid) .." gold coins and it costs ".. t.cost .." gold coins to travel.", cid) end end end elseif tm then if getPlayerMoney(cid) >= tm.cost then npcHandler:say("Do you want to go to ".. msg .." for ".. tm.cost .." gold coins? ... you do have ".. getPlayerMoney(cid) .." gold coins!", cid) talkState[talkUser] = 1 xmsg[cid] = msg else npcHandler:say("I am sorry you have ".. getPlayerMoney(cid) .." gold coins and it t.cost's ".. tm.cost .." gold coins to travel.", cid) end elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then local tm = config[xmsg[cid]:lower()] if isPlayerPzLocked(cid) == true then doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Those hands look pretty bloody") npcHandler:say("Hah, Seems like you got blood on your hands you shall not sail with me.", cid) return false end if doPlayerRemoveMoney(cid, tm.cost) == true then npcHandler:say("You paid ".. tm.cost .." gold coins to travel and you have ".. getPlayerMoney(cid) .." gold coins left in your backpack", cid) doTeleportThing(cid, tm.location) else npcHandler:say("I am sorry you have ".. getPlayerMoney(cid) .." gold coins and it t.cost's ".. cost[cid] .." gold coins to travel.", cid) end talkState[talkUser] = 0 elseif msgcontains(msg, "no") and talkState[talkUser] > 0 then npcHandler:say("Ok.", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  25. Diego Rulez postou uma resposta no tópico em Suporte Tibia OTServer
    Estou precisando de alguns scripts para meu servidor. Agradeço a quem puder ajudar. Estou utilizando sources OTX baseadas no 0.3.7 Crying Damson 1- Hunts Exclusivas: Tenho uma área com vários teleports que levam as hunts. Gostaria que quando o Player1 usasse um item ele ganhasse acesso a cave que ele escolhesse, onde no período de 24hrs só ele pode entrar e sair da hunt. Caso um outro player utilize o mesmo item, ele pode acessar as outras caves disponíveis, mas não a cave que já esta sendo usada pelo Player1 2- Sell Points: Quando o player utiliza o comando !sellpoints, 10 ele retira 10 premium points de sua account no site e quando ele da use no item que ele fez, ele adiciona 10 premium points em sua account no site 3- Script de Mensagem: Toda vez que o Player logar aparecer uma mensagem no centro da tela em azul. Gostaria de lembrar que esses scripts já estão sendo utilizados atualmente em servidores baiak/styller mas procurei e não encontrei eles aqui no fórum.

Informação Importante

Confirmação de Termo