Dark 3 #1 Postado 1 Outubro, 2007 ....Você esta cançado daquelas salas de treino, onde o player entra, mata o training monk, ou vem um pk e mata ele, ou até mesmo vem pega as food que é para ajudar a treinar e depois sai, seus problemas acabaram. Vantagens: Não presisa de respaw do monstro, o script verifica se há algum monstro na posição, se não tiver, ele sumona. Se já houver alguem treinando naquela cabine, ele te avisa e não permite que você acesse ela. Para entrar é simples, você fica na frente da cabine e fala enter, apos isso, um efeito é solto no lugar aonde não há monstro, e então depois de 1 segundo, você é teleportado para dentro. Para ajudar na hora de treinar, você fala help dentro da cabine, e por um preço de 50 de seu hp, você recebe uma ajuda, se você ganha 1 ham, e caso seja paladin, alem de 1 ham você ainda ganha 2 spear. Para você sair, você fala exit, então todas as ham são retiradas de você (e no caso do paladin, spears tambem), fazendo com que você não consiga os itens de graça Montando a Area ....Primeiro, monte no map editor, uma cabine de treino, do mesmo geito que mostra a figura abaixo (a cabine tem que ser igual a 4° figura), abaixo segue encinado como fazer a cabine(não presisa ser nessesariamente assim, mas no final tem que ficar igual a 4° figura) ....Depois de ter montado as cabines, você ira adicionar um actionId no piso emque o player ficara em cima e dira a palavra enter para entrar na cabine: ....Caso você não tenha intendido ainda: ....Resumindo: se a cabine tiver virada para lá (<) será adicionada o actionId 9875, se a cabine estiver virada para lá (>) será adicionada o actionId 9874, se a cabine estiver virada para lá (/\) será adicionada o actionId 9876, se a cabine estiver virada para lá (\/) será adicionada o actionId 9873. Fazendo o Script Abra a pasta do seu Ot e vá até data/talkactions/scripts, copie qualquer arquivo de lá e renomei para trainer.lua, abra o arquivo apague tudo que estiver lá e cole isso: ------------ By D@rK ------------ -------------- OTNet -------------- function onSay(cid, words, param) hp = 50 monstro = 'training monk' player = getPlayerPosition(cid) controle = getPlayerStorageValue(cid,trainer) exi = {x=player.x, y=player.y+2, z=player.z} pos = {x=player.x, y=player.y-2, z=player.z, stackpos = 253} monstro1 = {x=player.x+1, y=player.y-3, z=player.z, stackpos = 253} monstro2 = {x=player.x-1, y=player.y-3, z=player.z, stackpos = 253} posm1 = getThingfromPos(monstro1) posm2 = getThingfromPos(monstro2) posd = getThingfromPos(pos) sexi = {x=player.x, y=player.y-2, z=player.z} spos = {x=player.x, y=player.y+2, z=player.z, stackpos = 253} smonstro1 = {x=player.x-1, y=player.y+3, z=player.z, stackpos = 253} smonstro2 = {x=player.x+1, y=player.y+3, z=player.z, stackpos = 253} sposm1 = getThingfromPos(smonstro1) sposm2 = getThingfromPos(smonstro2) sposd = getThingfromPos(spos) lexi = {x=player.x+2, y=player.y, z=player.z} lpos = {x=player.x-2, y=player.y, z=player.z, stackpos = 253} lmonstro1 = {x=player.x-3, y=player.y+1, z=player.z, stackpos = 253} lmonstro2 = {x=player.x-3, y=player.y-1, z=player.z, stackpos = 253} lposm1 = getThingfromPos(lmonstro1) lposm2 = getThingfromPos(lmonstro2) lposd = getThingfromPos(lpos) oexi = {x=player.x-2, y=player.y, z=player.z} opos = {x=player.x+2, y=player.y, z=player.z, stackpos = 253} omonstro1 = {x=player.x+3, y=player.y+1, z=player.z, stackpos = 253} omonstro2 = {x=player.x+3, y=player.y-1, z=player.z, stackpos = 253} oposm1 = getThingfromPos(omonstro1) oposm2 = getThingfromPos(omonstro2) oposd = getThingfromPos(opos) pos1 = {x=player.x, y=player.y, z=player.z, stackpos = 0} posd1 = getThingfromPos(pos1) if words == 'enter' then if posd1.actionid == 9876 then if posd.itemid == 0 then if posm1.itemid == 0 then doSendMagicEffect(monstro1,34) end if posm2.itemid == 0 then doSendMagicEffect(monstro2,34) end doSendMagicEffect(player,2) param = {cid = cid, pos = pos, posm1 = posm1, posm2 = posm2, monstro1 = monstro1, monstro2 = monstro2, monstro = monstro} addEvent(summon,1000,param) else doPlayerSendTextMessage(cid, 24,'Já a um player treinando aqui, tente mais tarde') end elseif posd1.actionid == 9873 then if sposd.itemid == 0 then if sposm1.itemid == 0 then doSendMagicEffect(smonstro1,34) end if sposm2.itemid == 0 then doSendMagicEffect(smonstro2,34) end doSendMagicEffect(player,2) param = {cid = cid, spos = spos, sposm1 = sposm1, sposm2 = sposm2, smonstro1 = smonstro1, smonstro2 = smonstro2, monstro = monstro} addEvent(ssummon,1000,param) else doPlayerSendTextMessage(cid, 24,'Já a um player treinando aqui, tente mais tarde') end elseif posd1.actionid == 9874 then if oposd.itemid == 0 then if oposm1.itemid == 0 then doSendMagicEffect(omonstro1,34) end if oposm2.itemid == 0 then doSendMagicEffect(omonstro2,34) end doSendMagicEffect(player,2) param = {cid = cid, opos = opos, oposm1 = oposm1, oposm2 = oposm2, omonstro1 = omonstro1, omonstro2 = omonstro2, monstro = monstro} addEvent(osummon,1000,param) else doPlayerSendTextMessage(cid, 24,'Já a um player treinando aqui, tente mais tarde') end elseif posd1.actionid == 9875 then if lposd.itemid == 0 then if lposm1.itemid == 0 then doSendMagicEffect(lmonstro1,34) end if lposm2.itemid == 0 then doSendMagicEffect(lmonstro2,34) end doSendMagicEffect(player,2) param = {cid = cid, lpos = lpos, lposm1 = lposm1, lposm2 = lposm2, lmonstro1 = lmonstro1, lmonstro2 = lmonstro2, monstro = monstro} addEvent(lsummon,1000,param) else doPlayerSendTextMessage(cid, 24,'Já a um player treinando aqui, tente mais tarde') end else doPlayerSay(cid,words,1) end elseif words == 'exit' then voc = getPlayerVocation(cid) if controle == 1 then if voc == 1 or voc == 5 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,exi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(exi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 2 or voc == 6 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,exi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(exi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 3 or voc == 7 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doPlayerRemoveItem(cid,2389,getPlayerItemCount(cid,2389)) doTeleportThing(cid,exi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(exi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 4 or voc == 8 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,exi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(exi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') end elseif controle == 2 then if voc == 1 or voc == 5 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,sexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(sexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 2 or voc == 6 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,sexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(sexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 3 or voc == 7 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doPlayerRemoveItem(cid,2389,getPlayerItemCount(cid,2389)) doTeleportThing(cid,sexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(sexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 4 or voc == 8 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,sexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(sexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') end elseif controle == 6 then if voc == 1 or voc == 5 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,oexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(oexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 2 or voc == 6 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,oexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(oexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 3 or voc == 7 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doPlayerRemoveItem(cid,2389,getPlayerItemCount(cid,2389)) doTeleportThing(cid,oexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(oexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 4 or voc == 8 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,oexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(oexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') end elseif controle == 4 then if voc == 1 or voc == 5 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,lexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(lexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 2 or voc == 6 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,lexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(lexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 3 or voc == 7 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doPlayerRemoveItem(cid,2389,getPlayerItemCount(cid,2389)) doTeleportThing(cid,lexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(lexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') elseif voc == 4 or voc == 8 then doPlayerRemoveItem(cid,2671,getPlayerItemCount(cid,2671)) doTeleportThing(cid,lexi) setPlayerStorageValue(cid,trainer,-1) doSendMagicEffect(lexi,10) doPlayerSendTextMessage(cid, 22, 'Adeus') end else doPlayerSay(cid,words,1) end elseif words == 'help' then voc = getPlayerVocation(cid) if controle == 1 or controle == 2 or controle == 6 or controle == 4 then if voc == 1 or voc == 5 then doPlayerAddItem(cid,2671,1) doPlayerAddHealth(cid,-hp) doSendAnimatedText(player, 'Lose HP', 180) doSendMagicEffect(player,31) elseif voc == 2 or voc == 6 then doPlayerAddItem(cid,2671,1) doPlayerAddHealth(cid,-hp) doSendAnimatedText(player, 'Lose HP', 180) doSendMagicEffect(player,31) elseif voc == 3 or voc == 7 then doPlayerAddItem(cid,2671,1) doPlayerAddItem(cid,2389,2) doPlayerAddHealth(cid,-hp) doSendAnimatedText(player, 'Lose HP', 180) doSendMagicEffect(player,31) elseif voc == 4 or voc == 8 then doPlayerAddItem(cid,2671,1) doPlayerAddHealth(cid,-hp) doSendAnimatedText(player, 'Lose HP', 180) doSendMagicEffect(player,31) end else doPlayerSay(cid,words,1) end end end function summon(s) cid = s.cid pos = s.pos monstro1 = s.monstro1 monstro2 = s.monstro2 posm1 = s.posm1 posm2 = s.posm2 monstro = s.monstro name = getPlayerName(cid) if posm1.itemid > 0 then setPlayerStorageValue(cid,trainer,1) doTeleportThing(cid,pos) doSendMagicEffect(pos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,1) doTeleportThing(cid,pos) doSendMagicEffect(pos,10) doSummonCreature(monstro,monstro1) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end if posm2.itemid > 0 then setPlayerStorageValue(cid,trainer,1) doTeleportThing(cid,pos) doSendMagicEffect(pos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,1) doTeleportThing(cid,pos) doSendMagicEffect(pos,10) doSummonCreature(monstro,monstro2) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end end function ssummon(s) cid = s.cid spos = s.spos smonstro1 = s.smonstro1 smonstro2 = s.smonstro2 sposm1 = s.sposm1 sposm2 = s.sposm2 monstro = s.monstro name = getPlayerName(cid) if sposm1.itemid > 0 then setPlayerStorageValue(cid,trainer,2) doTeleportThing(cid,spos) doSendMagicEffect(spos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,2) doTeleportThing(cid,spos) doSendMagicEffect(spos,10) doSummonCreature(monstro,smonstro1) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end if sposm2.itemid > 0 then setPlayerStorageValue(cid,trainer,2) doTeleportThing(cid,spos) doSendMagicEffect(spos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,2) doTeleportThing(cid,spos) doSendMagicEffect(spos,10) doSummonCreature(monstro,smonstro2) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end end function osummon(s) cid = s.cid opos = s.opos omonstro1 = s.omonstro1 omonstro2 = s.omonstro2 oposm1 = s.oposm1 oposm2 = s.oposm2 monstro = s.monstro name = getPlayerName(cid) if oposm1.itemid > 0 then setPlayerStorageValue(cid,trainer,6) doTeleportThing(cid,opos) doSendMagicEffect(opos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,6) doTeleportThing(cid,opos) doSendMagicEffect(opos,10) doSummonCreature(monstro,omonstro1) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end if oposm2.itemid > 0 then setPlayerStorageValue(cid,trainer,6) doTeleportThing(cid,opos) doSendMagicEffect(opos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,6) doTeleportThing(cid,opos) doSendMagicEffect(opos,10) doSummonCreature(monstro,omonstro2) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end end function lsummon(s) cid = s.cid lpos = s.lpos lmonstro1 = s.lmonstro1 lmonstro2 = s.lmonstro2 lposm1 = s.lposm1 lposm2 = s.lposm2 monstro = s.monstro name = getPlayerName(cid) if lposm1.itemid > 0 then setPlayerStorageValue(cid,trainer,4) doTeleportThing(cid,lpos) doSendMagicEffect(lpos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,4) doTeleportThing(cid,lpos) doSendMagicEffect(lpos,10) doSummonCreature(monstro,lmonstro1) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end if lposm2.itemid > 0 then setPlayerStorageValue(cid,trainer,4) doTeleportThing(cid,lpos) doSendMagicEffect(lpos,10) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') else setPlayerStorageValue(cid,trainer,4) doTeleportThing(cid,lpos) doSendMagicEffect(lpos,10) doSummonCreature(monstro,lmonstro2) doPlayerSendTextMessage(cid, 22, 'Bem vindo ' .. name .. '') end end Não se assuste, você so vai presisar mexer em 2 coisasExplicação: hp = 50 -- aqui é a quantidade de hp que o player vai perder quando falar Help monstro = 'training monk' -- Monstro que será criado, caso não tenha nenhum Agora vá até data/talkactions/ e abra o arquivo talkactions.xml e adicione isso: <talkaction words="enter" script="trainer.lua" /> <talkaction words="exit" script="trainer.lua" /> <talkaction words="help" script="trainer.lua" /> Explicação trainer.lua -- nome do arquivo que nós criamos O tutorial fica por aqui, espero que tenham entendido e gostado... Postem duvidas, dicas, sugestões ou criticas construtivas... T+ D@rK~ Compartilhar este post Link para o post Compartilhar em outros sites
Kevox 0 #2 Postado 1 Outubro, 2007 É vem você ;x Excelente idéia e bem bolada. Vou aprová-la pois é uma sala de Trainer diferenciada. Movido; Compartilhar este post Link para o post Compartilhar em outros sites
Willz 0 #3 Postado 1 Outubro, 2007 poha se faz tutorial muito bons cara =) todos q vc fez eu aproveitei ai como eu fasso para aumenta a area d respaw e botar pa fazer outros bixos.... tipo arena =) Compartilhar este post Link para o post Compartilhar em outros sites
Vufusuf 1 #4 Postado 1 Outubro, 2007 Eita, que tutorial bem feito... imagems, gifs... gostei hehe A idéia também foi muito boa. O único problema (que não é um problema), é que o script ficou muito grande. Compartilhar este post Link para o post Compartilhar em outros sites
Pedrox 0 #5 Postado 1 Outubro, 2007 bah o meu otima ideia e eh bem util pq sempre acontece alguma coisa tipo pk ou roba food valeu:D Compartilhar este post Link para o post Compartilhar em outros sites
griutrer 0 #6 Postado 1 Outubro, 2007 muito bommmmmmmmmmmmmmmmmmmmmmmmmmm}! Compartilhar este post Link para o post Compartilhar em outros sites
GdNp 0 #7 Postado 2 Outubro, 2007 Mt bem dark..sempre trazendo coisas novas..parabens meu velho..te amo :~ Compartilhar este post Link para o post Compartilhar em outros sites
mpoliveira2006 0 #8 Postado 2 Outubro, 2007 Merece uma Gratz!! APROVADO CONCERTEZA! e... tá 100% funcional. Sem mais. Abraços// Compartilhar este post Link para o post Compartilhar em outros sites
Luizim 0 #9 Postado 2 Outubro, 2007 Mto bom msm esse tuto, bem facil de fazer e mto bem ilustrado Compartilhar este post Link para o post Compartilhar em outros sites
Johnnie 2 #10 Postado 2 Outubro, 2007 @griuter Posts como este são considerados flood, espero que não se repita ou será alertado. @Tópico Sinceramente, ficou muito bom cara, parabéns. Compartilhar este post Link para o post Compartilhar em outros sites
Nandonalt 0 #11 Postado 3 Outubro, 2007 Muito bom o script! Merece um prêmio por todos os scripts que você fez! ApRoVaDo Compartilhar este post Link para o post Compartilhar em outros sites
Diego Skate 0 #12 Postado 3 Outubro, 2007 Parabéns mano! q script loko!! ja ta add no meu server ^^ Ps: Faz mais ae, q eu to ligado q vc tem as manhas Paz. Compartilhar este post Link para o post Compartilhar em outros sites
DavizinhuH 0 #13 Postado 3 Outubro, 2007 Ótimo Tuto Bem explicado com fotos Gostei! Compartilhar este post Link para o post Compartilhar em outros sites
Jonatinhas 0 #14 Postado 3 Outubro, 2007 muito bom cara Compartilhar este post Link para o post Compartilhar em outros sites
Toddy 0 #15 Postado 4 Outubro, 2007 darck darck.. sempre dando show ein velho ? parabens mais uma vez ^^ Compartilhar este post Link para o post Compartilhar em outros sites
Supero 0 #16 Postado 4 Outubro, 2007 olá gente eu queria q vcs min respone-se como faço pra pegar o mapditor ele n q abri fik dando error Compartilhar este post Link para o post Compartilhar em outros sites
rcrneto 0 #17 Postado 11 Outubro, 2007 Veio, sem palavras para falar do seu tuto!! Parabens! Compartilhar este post Link para o post Compartilhar em outros sites
GOD Bon 0 #18 Postado 11 Outubro, 2007 ahsuahs que legal em !!! dark sempre melhorando !!! Compartilhar este post Link para o post Compartilhar em outros sites
edhunter 0 #19 Postado 12 Outubro, 2007 cara tipo pra entra funciono só´que qdo falo exit ou help nao funciona valeus se puder me ajudar ;D Compartilhar este post Link para o post Compartilhar em outros sites
SanthiagoBR 0 #20 Postado 12 Outubro, 2007 Manow parabens, muito util essa action, vlw mesmo, concerteza vo por no meu OTserv... muito obrigado kra. SUCESSO para vc Compartilhar este post Link para o post Compartilhar em outros sites