

fernandobermude
Campones-
Total de itens
1 -
Registro em
-
Última visita
Sobre fernandobermude

Informações
-
Char no Tibia
Não mais eu jogar.
-
Forma que conheci o xTibia
Amigos
-
Sou
Scripter
Últimos Visitantes
O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.
fernandobermude's Achievements
-
[7.6 Fix] Change Gold Com Bic Trainer.
um tópico no fórum postou fernandobermude Actions e Talkactions
[scripts feitos (editados) por mim Fernando(Gahadux/Tiradentes) para OTs 7.6] Como eu cansei de ver todos os OTs dessa versão ou com o bug do BIC ou sem sistema de troca de dinheiro por click, resolvi da uma editada lá no sistema que vem normalmente nesses OTs. Com o que eu editei só será possível trocar o dinheiro na mão esquerda. Evitando o sisteminha que o BIC usa (o sistema pode ser burlado em alguns OTs). Basta substituír o que tem dentro dos arquivos gold.lua, platinum.lua e crystal.lua (que se encontram na pasta data/actions/scripts) pelos respectivos scripts abaixo. gold.lua: function onUse(cid, item, frompos, item2, topos) --Config lan = 2 --1 para port, 2 para ing. time = 2 --Tempo entre as trocadas msg_time = {'Calminha ai cowboy, pra que a pressa?','Easy down cowboy, why the hurry?'} msg_local = {'Para trocar o dinheiro por favor coloque-o em sua mão esquerda.','To change gold please put it in your left hand'} --Funcionais now = os.time() stor = getPlayerStorageValue(cid,6161) if frompos.y == 6 then if item.itemid == 2148 and item.type == 100 then if stor+time <= now then doRemoveItem(item.uid,item.type) setPlayerStorageValue(cid,6161,now) doPlayerAddItem(cid,2152,1) doPlayerSendTextMessage(cid,22,"You have changed 100 gp to 1 platnium coin") else doPlayerSendTextMessage(cid,22,msg_time[lan]) end elseif item.itemid == 2148 and item.type < 100 then doPlayerSendTextMessage(cid,22,"You have to got 100 gp's to change for platinum coin") end else doPlayerSendTextMessage(cid,22,msg_local[lan]) end end platinum.lua: function onUse(cid, item, frompos, item2, topos) --Config lan = 2 --1 para port, 2 para ing. time = 2 --Tempo entre as trocadas msg_time = {'Calminha ai cowboy, pra que a pressa?','Easy down cowboy, why the hurry?'} msg_local = {'Para trocar o dinheiro por favor coloque-o em sua mão esquerda.','To change gold please put it in your left hand'} --Funcionais now = os.time() stor = getPlayerStorageValue(cid,6161) if frompos.y == 6 then if item.itemid == 2152 and item.type == 100 then if stor+time <= now then doRemoveItem(item.uid,item.type) doPlayerAddItem(cid,2160,1) setPlayerStorageValue(cid,6161,now) doPlayerSendTextMessage(cid,22,"You have changed 100 platinum to 1 crystal coin") else doPlayerSendTextMessage(cid,22,msg_time[lan]) end elseif item.itemid == 2152 and item.type < 100 then if stor+time <= now then doRemoveItem(item.uid,1) doPlayerAddItem(cid,2148,100) setPlayerStorageValue(cid,6161,now) doPlayerSendTextMessage(cid,22,"You have changed 1 platinum to 100 gold coins") else doPlayerSendTextMessage(cid,22,msg_time[lan]) end end else doPlayerSendTextMessage(cid,22,msg_local[lan]) end end crystal.lua: function onUse(cid, item, frompos, item2, topos) --Config lan = 2 --1 para port, 2 para ing. time = 2 --Tempo entre as trocadas msg_time = {'Calminha ai cowboy, pra que a pressa?','Easy down cowboy, why the hurry?'} msg_local = {'Para trocar o dinheiro por favor coloque-o em sua mão esquerda.','To change gold please put it in your left hand'} --Funcionais now = os.time() stor = getPlayerStorageValue(cid,6161) if frompos.y == 6 then if stor+time <= now then if doRemoveItem(item.uid,1) then doPlayerSendTextMessage(cid,22,"You have changed 1 crystal coin to 100 platinum coins") setPlayerStorageValue(cid,6161,now) doPlayerAddItem(cid,2152,100) end else doPlayerSendTextMessage(cid,22,msg_time[lan]) end else doPlayerSendTextMessage(cid,22,msg_local[lan]) end end *Caso os arquivos não existam em seu OT, crie-los e lembre de colocar a extensão como .lua então va no arquivo actions.xml (dentro da pasta data/actions) e cole o seguinte: <action itemid="2148" script="gold.lua" /> <action itemid="2152" script="platinum.lua" /> <action itemid="2160" script="crystal.lua" /> *Os scripts tem um sistema de delay entre as trocadas, caso não queira isto deixe a variável time com valor igual a zero. [lembrando que o config foi feito para ser editado .-.] SCRIPT DO ACCOUNT CREATOR(NPC) com esse NPC você póde escolher a account e a vocação. abra a pasta data/npcs/scripts, copie um arquivo, renomeie-lo para Account Creator abra ele e delete tudo, então cole o seguinte: focus = 0 talk_start = 0 target = 0 following = false attacking = false status_cconta = 0 genero = 0 meu_nome = '' meu_accnumber = '' meu_password = '' minha_voc = 0 acctamanho_min = 6 acctamanho_max = 9 nicktamanho_max = 10 passtamanho_max = 14 acc_carac = '[0-9]' allow_carac = '^[a-zA-Z0-9 -]+$' origmsg = '' meu_password_check = '' meu_nome_check = '' real_config = {} account_config = { exp =4200, level =8, cap =420, mana =35, hp =185} sorc_config= { name= "sorcerer", weapon= 2190, mlevel= 0, helmet= 2481, armor= 2465, legs= 2478, boots= 2643, shield= "<slot slotid=\"5\"><item id=\"2525\"\/><\/slot>", bp = 1988, extra= "<item id=\"2260\"\/>"} pally_config= { name= "paladin", weapon= 2455, mlevel= 0, helmet= 2459, armor= 2654, legs= 2468, boots= 2642, shield= "", bp = 1988, extra= "<item id=\"2543\" count=\"50\"\/>"} kina_config= { name= "knight", weapon= 2409, mlevel= 0, helmet= 2490, armor= 2463, legs= 2647, boots= 2643, bp = 1988, shield= "<slot slotid=\"5\"><item id=\"2525\"\/><\/slot>", extra= ""} druid_config= { name= "druid", weapon= 2182, mlevel= 0, helmet= 2481, armor= 2465, legs= 2478, boots= 2643, bp = 1988, shield= "<slot slotid=\"5\"><item id=\"2525\"\/><\/slot>", extra= "<item id=\"2260\"\/><item id=\"2674\" count=\"5\"\/>"} temple_xyz = { x=199, y=100, z=6} spawn_xyz = { x=199, y=100, z=6} function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Tchaus!') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) origmsg = msg msg = string.lower(msg) if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then selfSay('Olá, gostaria de criar sua account agora?') status_cconta = 1 focus = cid talk_start = os.clock() elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Desculpe, Falo com você em um minuto.') elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Boa sorte!') status_cconta = 0 focus = 0 elseif status_cconta == 1 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') or msgcontains(msg, 'vamos') then selfSay('Otimo! vamos começar... Primeiramente diga-me você é homem ou mulher?') status_cconta = 2 elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Tabom, volte quando estiver pronto!') status_cconta = 0 focus = 0 end elseif status_cconta == 2 then if msgcontains(msg, 'male') or msgcontains(msg, 'homem') then selfSay('Que ótimo... mais um homem no server yay ¬¬, agora me fale a account que você deseja!') status_cconta = 3 genero = 1 elseif msgcontains(msg, 'female') or msgcontains(msg, 'mulher') then selfSay('Uma garota :>, seja bem vinda ao server, agora me fale a account que você deseja!') status_cconta = 3 genero = 0 else selfSay('Desculpe-nos mais não aceitamos esse sexo em nosso servidor, nada contra... mas... escolha outro fazendo favor.') end elseif status_cconta == 3 then meu_accnumber = origmsg meu_accnumbercheck = msg if string.len(meu_accnumbercheck) <= acctamanho_max and string.len(meu_accnumbercheck) >= acctamanho_min then if string.find(meu_accnumbercheck, acc_carac) then if io.open("data/accounts/"..meu_accnumber..".xml" , "r") == nil then selfSay('Então sua account é '..meu_accnumber..'. Correto?') status_cconta = 4 else selfSay('Esta account ja está em uso.') end else selfSay('Por favor use somente numeros.') end else selfSay('Sua account foge dos parâmetros, por favor escolha uma com menos de '..acctamanho_min..' e mais que '..acctamanho_max..' numeros.') end elseif status_cconta == 4 then if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then selfSay('Certo... bela account... mas qual será seu nickname?') status_cconta = 5 elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Tudo bem, escolha outra...') status_cconta = 3 end elseif status_cconta == 666 then status_conta = 5 elseif status_cconta == 5 then meu_nome = origmsg meu_nome_check = msg if string.find(meu_nome, '(%a*)GM(%a*)') or string.find(meu_nome, '(%a*)GOD(%a*)') or string.find(meu_nome, '(%a*)TUTOR(%a*)') or string.find(meu_nome, '(%a*)ADM(%a*)') then selfSay('Nick illegal, por favor escolha outro.') status_cconta = 666 end if status_cconta == 5 then if string.len(meu_nome_check) <= nicktamanho_max then if string.find(meu_nome_check, allow_carac) then if io.open("data/players/"..meu_nome..".xml" , "r") == nil then selfSay(meu_nome..' mesmo? você que sabe.') status_cconta = 6 else selfSay('Já existe alguem com este nome, escolha outro!!') end else selfSay('Por favor contenha-se as letras e numeros.') end else selfSay('Nome muito longo!') end end elseif status_cconta == 6 then if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then selfSay('Então será '..meu_nome..'! agora qual vocação você gostaria de ter?') status_cconta = 7 elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Tudo bem, escolha outro...') status_cconta = 5 end elseif status_cconta == 7 then if msgcontains(msg, 'druid') then selfSay('Então você gostaria de ser um mistorioso Druid, correto?') status_cconta = 8 minha_voc = 2 real_config = druid_config elseif msgcontains(msg, 'sorcerer') then selfSay('Então você gostaria de ser um mistico Sorcerer, correto?') status_cconta = 8 minha_voc = 1 real_config = sorc_config elseif msgcontains(msg, 'knight') then selfSay('Então você gostaria de ser um poderoso knight, correto?') status_cconta = 8 minha_voc = 4 real_config = kina_config elseif msgcontains(msg, 'paladin') then selfSay('Então você gostaria de se tornar um habilidoso paladin, correto?') status_cconta = 8 minha_voc = 3 real_config = pally_config else selfSay('Desculpe-nos '..meu_nome..' mas não temos esta vocação em nosso servidor, porfavor escolha entre "sorcerer", "paladin", "knight" ou "druid".') end elseif status_cconta == 8 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then selfSay('Certo, diga-me agora sua senha.') status_cconta = 9 elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Tudo bem, escolha outra vocação!') status_cconta = 7 end elseif status_cconta == 9 then meu_password = origmsg meu_password_check = msg if string.len(meu_password_check) <= passtamanho_max then if string.find(meu_password_check, allow_carac) then selfSay('Sua senha será '..meu_password..', né?') status_cconta = 10 else selfSay('Por favor, contenha-se aos numeros e letras') end else selfSay('Sua senha está muito longa, tente outra vez') end elseif status_cconta == 10 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then selfSay('Vamos conferir seus dados, senha: '..meu_password..', account: '..meu_accnumber..', nick: '..meu_nome..' vocação: '..real_config.name..'. Tudo okay?') status_cconta = 11 elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Tudo bem, escolha outra senha!') status_cconta = 9 end elseif status_cconta == 11 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then f = assert(io.open("./data/accounts/"..meu_accnumber..".xml", "w")) f = io.open("./data/accounts/"..meu_accnumber..".xml", "w") f:write("<?xml version=\"1.0\"?><account pass=\""..meu_password.."\" type=\"1\" premDays=\"0\"><characters><character name=\""..meu_nome.."\"\/><\/characters><\/account>") f:close() f = assert(io.open("./data/players/"..meu_nome..".xml", "w")) f = io.open("./data/players/"..meu_nome..".xml", "w") f:write("<?xml version=\"1.0\"?><player name=\""..meu_nome.."\" account=\""..meu_accnumber.."\" sex=\""..genero.."\" lookdir=\"2\" exp=\""..account_config.exp.."\" voc=\""..minha_voc.."\" level=\""..account_config.level.."\" access=\"0\" cap=\""..account_config.cap.."\" maglevel=\""..real_config.mlevel.."\" lastlogin=\"0\" premticks=\"0\" promoted=\"0\" banned=\"0\"><spawn x=\""..spawn_xyz.x.."\" y=\""..spawn_xyz.y.."\" z=\""..spawn_xyz.z.."\"\/><temple x=\""..temple_xyz.x.."\" y=\""..temple_xyz.y.."\" z=\""..temple_xyz.z.."\"\/><skull type=\"0\" kills=\"0\" ticks=\"0\" absolve=\"0\"\/><health now=\""..account_config.hp.."\" max=\""..account_config.hp.."\" food=\"1000\"\/><mana now=\""..account_config.mana.."\" max=\""..account_config.mana.."\" spent=\"1\"\/><look type=\"128\" head=\"78\" body=\"117\" legs=\"116\" feet=\"95\"\/><skills><skill skillid=\"0\" level=\"10\" tries=\"0\"\/><skill skillid=\"1\" level=\"10\" tries=\"0\"\/><skill skillid=\"2\" level=\"10\" tries=\"0\"\/><skill skillid=\"3\" level=\"10\" tries=\"0\"\/><skill skillid=\"4\" level=\"10\" tries=\"0\"\/><skill skillid=\"5\" level=\"10\" tries=\"0\"\/><skill skillid=\"6\" level=\"10\" tries=\"0\"\/><\/skills><spells><\/spells><deaths\/><inventory><slot slotid=\"1\"><item id=\""..real_config.helmet.."\"\/><\/slot><slot slotid=\"3\"><item id=\""..real_config.bp.."\"><inside>"..real_config.extra.."<\/inside><\/item><\/slot><slot slotid=\"4\"><item id=\""..real_config.armor.."\"\/><\/slot>"..real_config.shield.."<slot slotid=\"6\"><item id=\"" ..real_config.weapon.. "\"\/><\/slot><slot slotid=\"7\"><item id=\""..real_config.legs.."\"\/><\/slot><slot slotid=\"8\"><item id=\""..real_config.boots.."\"\/><\/slot><\/inventory><depots><depot depotid=\"1\"><item id=\"2591\"><inside><item id=\"2594\"\/><\/inside><\/item><\/depot><\/depots><storage><data key=\"777\" value=\""..genero.."\"\/><\/storage><\/player>") f:close() selfSay('Yes, terminamos agora vaza daqui') elseif msgcontains(msg, 'no') or msgcontains(msg, 'nao') then selfSay('Então vamos lá, des do começo! diga "vamos"') status_cconta = 1 meu_nome = '' meu_password = '' meu_accnumber = '' minha_voc = 0 genero = '' end elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then selfSay('Falou, ' .. creatureGetName(cid) .. '!') focus = 0 status_cconta = 0 meu_nome = '' meu_password = '' meu_accnumber = '' minha_voc = 0 genero = '' talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Tchaus!') focus = 0 end end end Agora volte para a pasta data/npcs copie um arquivo .xml qualquer, renomeie-lo para Account Creator.xml, abra ele e delete tudo de dentro depois cole o seguinte: <?xml version="1.0"?> <npc name="Account Creator" script="data/npc/scripts/Account Creator.lua" access="3" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="73" head="0" body="0" legs="0" feet="0"/> </npc> Salve tudo e fexe (para colocar no OT você precisa adicionar o NPC em data/world/npcs.xml). MANARUNE COM EXHAUST CONFIGUTAVEL(action) este script impede que botters usem manarune "na velocidade da luz" substitua seu script de manarune (data/actions/scripts/manarune.lua) por: function onUse(cid, item, frompos, item2, topos) --EDITAVEL time = 2 --Tempo entre as trocadas now = os.time() stor = getPlayerStorageValue(cid,7135) addmanapos = topos addmanapos.stackpos = 253 playeraddmana = getThingfromPos(addmanapos) if stor+time <= now then if getPlayerMagLevel(cid) >= 4 then if playeraddmana.itemid > 0 then random_number = math.random(100,200) doSendMagicEffect(topos,12) doPlayerAddMana(playeraddmana.uid,random_number) doPlayerSay(cid,"Aaaaah...",1) if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end else doSendMagicEffect(frompos,2) return 0 end else doSendMagicEffect(frompos,2) doPlayerSendCancel(cid,"You dont have the magic level.") end else doPlayerSendCancel(cid,"You are exhausted.") end return 1 end salve fexe, e se o seu servidor estiver aberto use o comando '/reload actions' e pronto a manarune deve estar com exhaust. USE e ABUSE, Fernando~
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.