Posted September 2, 201410 yr comment_453991 Aviso: As scripts que eu fiz nesse tópico são antigas. Fiz quando eu tinha pouca experiência com programação então considero obsoletas. Sendo sincero, não recomendo usa-las. Iae galera, beleza? A um tempo já que estava querendo alguns scripts do otclient, mas ninguém tinha. Então eu tomei coragem e fui tentar fazer algumas... e consegui, e vim compartilhar aqui com vocês. Mining Spoiler Bom, a funcionalidade desse script é quase igual a que usam no tibia auto A unica diferença, é que pra minerar, vc tem que ficar de frente pra parede de mineração. Se ficar de lado, de costas, não funciona. Bom, eu dividi essa script em 3 partes Pra funcionar, basta colar as 3 scripts separadamente no seu terminal.: 1º parte: usa pick na parede cycleEvent( function () if g_game.isOnline() then local player = g_game.getLocalPlayer() local dir = g_game.getLocalPlayer():getDirection() local pos = player:getPosition() local pick = 3456 local cima = g_map.getTile({ x = pos.x, y = pos.y - 1, z = pos.z}) local baixo = g_map.getTile({ x = pos.x, y = pos.y + 1, z = pos.z}) local direita = g_map.getTile({ x = pos.x + 1, y = pos.y , z = pos.z}) local esquerda = g_map.getTile({ x = pos.x - 1, y = pos.y, z = pos.z}) local CIMA = cima:getTopThing() local BAIXO = baixo:getTopThing() local DIREITA = direita:getTopThing() local ESQUERDA = esquerda:getTopThing() if dir == North then Helper.safeUseInventoryItemWith(pick, CIMA) elseif dir == East then Helper.safeUseInventoryItemWith(pick, DIREITA) elseif dir == South then Helper.safeUseInventoryItemWith(pick, BAIXO) elseif dir == West then Helper.safeUseInventoryItemWith(pick, ESQUERDA) end end end,1100) 2º Parte: taca o lixo e as gems no chão cycleEvent( function() if g_game.isOnline() then local player = g_game.getLocalPlayer() local pos = player:getPosition() if player:getItem('1792') ~= nil then g_game.move(player:getItem('1792'), pos, player:getItem('1792'):getCount()) elseif player:getItem('1780') ~= nil then g_game.move(player:getItem('1780'), pos, player:getItem('1780'):getCount()) elseif player:getItem('3147') ~= nil then g_game.move(player:getItem('3147'), pos, player:getItem('3147'):getCount()) elseif player:getItem('3207') ~= nil then g_game.move(player:getItem('3207'), pos, player:getItem('3207'):getCount()) elseif player:getItem('1782') ~= nil then g_game.move(player:getItem('1782'), pos, player:getItem('1782'):getCount()) elseif player:getItem('3041') ~= nil then g_game.move(player:getItem('3041'), pos, player:getItem('3041'):getCount()) elseif player:getItem('3039') ~= nil then g_game.move(player:getItem('3039'), pos, player:getItem('3039'):getCount()) elseif player:getItem('3038') ~= nil then g_game.move(player:getItem('3038'), pos, player:getItem('3038'):getCount()) elseif player:getItem('3037') ~= nil then g_game.move(player:getItem('3037'), pos, player:getItem('3037'):getCount()) elseif player:getItem('3036') ~= nil then g_game.move(player:getItem('3036'), pos, player:getItem('3036'):getCount()) elseif player:getItem('1781') ~= nil then g_game.move(player:getItem('1781'), pos, player:getItem('1781'):getCount()) end end end, 1000/2) 3º Parte : usa moneyrune nas gems. cycleEvent( function() if g_game.isOnline() then local player = g_game.getLocalPlayer() local pos = player:getPosition() local tile = g_map.getTile(pos) local rune = 3193 local pedra = tile:getTopThing() if pedra:getId() == 1781 or pedra:getId() == 3039 or pedra:getId() == 3038 or pedra:getId() == 1782 or pedra:getId() == 3036 or pedra:getId() == 1780 or pedra:getId() == 3041 or pedra:getId() == 3037 then Helper.safeUseInventoryItemWith(rune, pedra) elseif pedra:getId() ~= 1781 and pedra:getId() ~= 3039 and pedra:getId() ~= 3038 and pedra:getId() ~= 1782 and pedra:getId() ~= 3036 and pedra:getId() ~= 1780 and pedra:getId() ~= 3041 and pedra:getId() ~= 3037 then return end end end,1000/5) Anti Push Spoiler Consegui fazer anti push pra alegria da galera. Mas, pra ele funcionar vc precisa estar prescionando uma certa tecla, que é só vc configurar ali. A tecla que esta já, é a tecla End. Em rapidez ele é bem eficiente. Mas por enquanto ele só joga GP no seu pé. Pode ser que daqui um tempo eu faça com worm, e de desativar e ativar. g_keyboard.bindKeyPress('Home', function() local player = g_game.getLocalPlayer() local mypos = player:getPosition() local tile = g_map.getTile(mypos) local bp = player:getInventoryItem(InventorySlotBack) local GP = 3031 local Plat = 3035 local GPNABP = player:getItem(GP) local PlatNaBP = player:getItem(Plat) local verificaSQM = tile:getTopMoveThing():getId() if GPNABP == nil then g_game.use(PlatNaBP) elseif verificaSQM ~= GP then g_game.move(GPNABP, mypos, 2) end end) Auto Mount : Spoiler cycleEvent(function () if g_game.isOnline() then g_game.mount(true) end end, 5000) -------------------------------------Essa script vai colocar sua montaria automaticamente, a cada 5 segundos ela vai tentar colocar. Utura Gran : Spoiler local delay = 60000 cycleEvent(function () if g_game.isOnline() then g_game.talk('utura gran') end end, delay) ---------------------------------------Essa script vai soltar a magia Utura Gran a cada 1 minuto, se tiver exausted de heal no momento ele não vai soltar, e a próxima tentativa será só dps de 1 minuto. Dropar Potions Vazias Spoiler esse script dropa suas potions vazias, é só colocar o id da potion desejada, eu já deixei comentado ali no script --[[ script de dropar potions id das potions = {283 = Strong ,284 = Great, 285 = Normal} ]] cycleEvent( function() if g_game.isOnline() then local id = '284' local player = g_game.getLocalPlayer() local mypos = player:getPosition() local flask = player:getItem(id) if flask == nil then return elseif flask:getCount() > 0 then g_game.move(flask, mypos, flask:getCount()) end end end, 1000/2) Vita /Utevo gran sio " Spoiler vita gran sio que não buffa quando vc ta buffado, só rodar no terminal e pronto cycleEvent( function () if g_game.isOnline() then local Level = g_game.getLocalPlayer():getLevel() local LifePercent = (((Level*5)+145)*40) /100 local Name = g_game.getLocalPlayer():getName() local Life = ((Level*5)+145) local LifeBuffado = ((Level*5)+145)+((((Level*5)+145)*40) /100) local MaxHealth = g_game.getLocalPlayer():getMaxHealth() local itemLife = MaxHealth - ((Level*5)+145) if MaxHealth < ((Level*5)+145)+((((Level*5)+145)*40) /100) or MaxHealth < (((Level*5)+145)+((((Level*5)+145)*40) /100)+itemLife) then g_game.talk('Vita Gran Sio "'..Name) end end end, 30000) ------------------ local delay = 600000 cycleEvent(function () if g_game.isOnline() then g_game.talk('utevo gran sio "Nome Do Seu Char"') end end, delay) --------------------------------Essa 2 scripts você tem que colocar o nome do seu char ali entre aspas pra buffar, ele só vai buffar inicialmente dps de 10 minutos ( o tempo que dura o buff), dps disso ele vai funcionar normalmente. Lembrando que se tiver exausted de heal no momento o buff não vai sair. Estourar Potions Vazias Spoiler Essa script verifica se vc tem potions vazias ao seu redor, se tiver ele estoura.. Só colocar no terminal e pronto cycleEvent( function() if g_game.isOnline() then local player = g_game.getLocalPlayer() local pos = player:getPosition() local rune = 3193 local tileN = g_map.getTile({ x = pos.x, y = pos.y - 1, z = pos.z}) local tileS = g_map.getTile({ x = pos.x, y = pos.y + 1, z = pos.z}) local tileL = g_map.getTile({ x = pos.x + 1, y = pos.y, z = pos.z}) local tileO = g_map.getTile({ x = pos.x - 1, y = pos.y, z = pos.z}) local tileNE = g_map.getTile({ x = pos.x + 1, y = pos.y - 1, z = pos.z}) local tileSE = g_map.getTile({ x = pos.x + 1, y = pos.y + 1, z = pos.z}) local tileNO = g_map.getTile({ x = pos.x - 1, y = pos.y - 1, z = pos.z}) local tileSO = g_map.getTile({ x = pos.x - 1, y = pos.y + 1, z = pos.z}) local tile = g_map.getTile(pos) local flask = tile:getTopThing() local flaskN = tileN:getTopThing() local flaskS = tileS:getTopThing() local flaskL = tileL:getTopThing() local flaskO = tileO:getTopThing() local flaskNE = tileNE:getTopThing() local flaskSE = tileSE:getTopThing() local flaskNO = tileNO:getTopThing() local flaskSO = tileSO:getTopThing() if flask:getId() == 283 or flask:getId() == 284 or flask:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flask) elseif flaskN:getId() == 283 or flaskN:getId() == 284 or flaskN:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskN) elseif flaskS:getId() == 283 or flaskS:getId() == 284 or flaskS:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskS) elseif flaskL:getId() == 283 or flaskL:getId() == 284 or flaskL:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskL) elseif flaskO:getId() == 283 or flaskO:getId() == 284 or flaskO:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskO) elseif flaskNE:getId() == 283 or flaskNE:getId() == 284 or flaskNE:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskNE) elseif flaskSE:getId() == 283 or flaskSE:getId() == 284 or flaskSE:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskSE) elseif flaskNO:getId() == 283 or flaskNO:getId() == 284 or flaskNO:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskNO) elseif flaskSO:getId() == 283 or flaskSO:getId() == 284 or flaskSO:getId() == 285 then Helper.safeUseInventoryItemWith(rune, flaskSO) end end end, 1000) Auto Soft Boots Spoiler essa script repoem a soft boots, tem um delay de 3 segundos. só colocar o terminal e apertar enter --[[ Script de Auto Soft Boots id da soft boots = 6529 id da soft boots(sendo usada) = 3549 id da worn soft boots = 6530 slot da boots = InventorySlotFeet ]] cycleEvent( function() if g_game.isOnline() then local player = g_game.getLocalPlayer() local slot = InventorySlotFeet local back = InventorySlotBack local bootsSlot = player:getInventoryItem(slot) local soft = player:getItem('6529') local botaPos = {['x'] = 65535, ['y'] = slot, ['z'] = 0} local backPos = {['x'] = 65535, ['y'] = back, ['z'] = 0} if bootsSlot == nil then g_game.move(soft, botaPos, soft:getCount()) elseif bootsSlot:getId() == 6530 then g_game.move(bootsSlot, backPos, bootsSlot:getCount()) elseif bootsSlot:getId() == 3549 then return end end end, 5000) Ring por Hotkey Spoiler script que tira e coloca ring quando a tecla apertada é pageUp, mas pode facilmente ser editada pra qualquer ring e qualquer tecla local Tecla = 'PageUp' g_keyboard.bindKeyPress(Tecla, function() local player = g_game.getLocalPlayer() local slot = InventorySlotFinger local back = InventorySlotBack local ringSlot = player:getInventoryItem(slot) local item = player:getItem('3051') local anelPos = {['x'] = 65535, ['y'] = slot, ['z'] = 0} local backPos = {['x'] = 65535, ['y'] = back, ['z'] = 0} if ringSlot == nil then g_game.move(item, anelPos, item:getCount()) elseif ringSlot:getId() == 3088 then g_game.move(ringSlot, backPos, ringSlot:getCount()) end end) Exani hur up/down nas setinhas Spoiler essa script solta exani hur up/ down todas as vezes que vc estiver correndo. local switch = 0 function doExaniHurUp() if switch == 0 then switch = 1 g_game.talk('exani hur "up') else switch = 0 g_game.talk('exani hur "down') end end g_keyboard.bindKeyPress('Up', doExaniHurUp) g_keyboard.bindKeyPress('Left', doExaniHurUp) g_keyboard.bindKeyPress('Right', doExaniHurUp) g_keyboard.bindKeyPress('Down',doExaniHurUp) Auto Amuleto Spoiler Novo Link: http://www.4shared.com/rar/87kvdd5Ice/01-afk.html Devido ao update pra versão 10.41, a script deu um bug.. mas agr eu já arrumei, é só baixar o arquivo do link, extrair e mover/substituir a pasta afk do modulo cavebot. No endereço : otclient-1041-trpgb\mods\otclient-candybot\modules O nome ainda vai ficar "Auto repleace weapons", porque se colocar o outro buga, ainda não sei porque. Nessa script, eu editei o modulo de autoReplaceHands pra puxar amuleto e ainda poder mover itens para mão esquerda (sword/star/spear e etc), o conceito que ela funciona não mudou nada, basta vc selecionar o amuleto que vc quer puxar e escolher 'Amuleto' e pronto Obs: Não tem como usar os 2 ao mesmo tempo, puxar arma e amuleto ao mesmo tempo. Print: Pra rodar as scripts é só apertar ctrl + t, colar e apertar enter e pronto :D Avisando que o terminal do otclient é o mesmo pra todos os chars, ou seja, se vc colocar a script e mudar de char, a script vai continuar ativada. Pra desativar as scripts é só fechar o otclient e abrir outro. Se tiver algum problema com essas scripts , é só postar aqui que eu ajudo. Se tiver scripts também, compartilhe! Algumas scripts como a de auto amuleto tem que instalar mesmo, não adianta rodar no ctrl + t Codigos e funções que podem ajudar a fazer as scripts : Spoiler aqui tem as funcoes do frameworkhttps://github.com/edubart/otclient/blob/master/src/framework/luafunctions.cpp e aqui as funcoes do gamehttps://github.com/edubart/otclient/blob/master/src/client/luafunctions.cpp Vlw
September 2, 201410 yr Author comment_453995 eu ainda não consigo fazer scripts assim tão complexas, essas 3 foram as únicas que consegui :/ Mas é possÃvel fazer :)
September 2, 201410 yr comment_453996 vlw, mas eu sou o Gugu '-' kkkk troquei as letras pkosakposakpoaskos malz :) nem reparei
September 3, 201410 yr comment_454039 vc faz na mão ou usa programa ?? vou tentar fazer aqui tbm "Na mão mesmo". Muito bom GuGu, vai ajudar uma mulekadinha boa ai ;)
September 6, 201410 yr Author comment_454475 faço na mão mesmo Loiro, o unico programa que eu uso é Notepad++, que é só um editor de texto. Spirit, mining ainda não tem :/
September 6, 201410 yr comment_454488 eu ainda não consigo fazer scripts assim tão complexas, essas 3 foram as únicas que consegui :/ Mas é possÃvel fazer :) Man se vc tiver algum tutorial das principais funções dessa linguagem de programação eu posso ajuda a fazer tenho algum conheceimento sobre assunto e gosto de perder um tempo com programação.
September 6, 201410 yr Author comment_454504 Man se vc tiver algum tutorial das principais funções dessa linguagem de programação eu posso ajuda a fazer tenho algum conheceimento sobre assunto e gosto de perder um tempo com programação. Vo pegar os links do codigo fonte do otclient e postar aqui, já adiantar quem quiser fazer script tbm :D
September 16, 201410 yr Author comment_455761 Adicionando script e link pra downloads da script de Auto Amuleto no tópico.
September 16, 201410 yr comment_455762 Adicionando script e link pra downloads da script de Auto Amuleto no tópico. Esse é meu guri, mt bom ;)
September 17, 201410 yr comment_455808 tem como fazer um de mining que as bps não precisem ficar abertas? pq minha net ta zoeira comigo ehaueauehu'
September 17, 201410 yr Author comment_455809 Mining ainda não consegui fazer :x Mas precisa ta cm a bp aberta pro bot usar os itens né shaush'
September 17, 201410 yr comment_455811 Mining ainda não consegui fazer :mad: Mas precisa ta cm a bp aberta pro bot usar os itens né shaush' eu to lgd , mais como minha net ta zoeira e o reconect de vez e nunca abre as bps ai perco muitas pedrinhas , ai e prejuizo eahueauh mais vlw ehauea'
September 20, 201410 yr comment_456241 Gugu tem como fazer pra tacar tal magia quando tiver x bixos ?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.