kkk111 8 Postado Julho 15, 2008 Share Postado Julho 15, 2008 *Fazer os treiner aparecer quando alguem vai treinar e sumir depois que sair .... 1-Vai em ....\data\movements\scripts 2-Crie um arquivo chamado train.lua com isso dentro local Actionid = 20000 local MonsterName = "Training Monk" local Trash = {x = 969, y = 47, z = 7} function onStepIn(cid, item, pos) local delta = {} if (item.actionid == Actionid) then delta[1] = {x = -1, y = -1} delta[2] = {x = 1, y = -1} elseif (item.actionid == Actionid + 1) then delta[1] = {x = 1, y = -1} delta[2] = {x = 1, y = 1} elseif (item.actionid == Actionid + 2) then delta[1] = {x = 1, y = 1} delta[2] = {x = -1, y = 1} elseif (item.actionid == Actionid + 3) then delta[1] = {x = -1, y = 1} delta[2] = {x = -1, y = -1} end if (isPlayer(cid) == TRUE) then doSummonCreature(MonsterName, {x = pos.x + delta[1].x, y = pos.y + delta[1].y, z = pos.z}) doSummonCreature(MonsterName, {x = pos.x + delta[2].x, y = pos.y + delta[2].y, z = pos.z}) end return TRUE end function onStepOut(cid, item, pos) local delta = {} if (item.actionid == Actionid) then delta[1] = {x = -1, y = -1} delta[2] = {x = 1, y = -1} elseif (item.actionid == Actionid + 1) then delta[1] = {x = 1, y = -1} delta[2] = {x = 1, y = 1} elseif (item.actionid == Actionid + 2) then delta[1] = {x = 1, y = 1} delta[2] = {x = -1, y = 1} elseif (item.actionid == Actionid + 3) then delta[1] = {x = -1, y = 1} delta[2] = {x = -1, y = -1} end if (isPlayer(cid) == TRUE) then local monster1 = getThingfromPos({x = pos.x + delta[1].x, y = pos.y + delta[1].y, z = pos.z, stackpos = 253}) local monster2 = getThingfromPos({x = pos.x + delta[2].x, y = pos.y + delta[2].y, z = pos.z, stackpos = 253}) if ((isCreature(monster1.uid) == TRUE) and (isPlayer(monster1.uid) == FALSE)) then if (doRemoveCreature ~= nil) then doRemoveCreature(monster1.uid) else doTeleportThing(monster1.uid, Trash) end end if ((isCreature(monster2.uid) == TRUE) and (isPlayer(monster2.uid) == FALSE)) then if (doRemoveCreature ~= nil) then doRemoveCreature(monster2.uid) else doTeleportThing(monster2.uid, Trash) end end end return TRUE end 3-Vai em ....\data\movements\movements.xml 4-Coloque essa linhas.. <movevent event="StepIn" actionid="20000" script="train.lua" /> <movevent event="StepIn" actionid="20001" script="train.lua" /> <movevent event="StepIn" actionid="20002" script="train.lua" /> <movevent event="StepIn" actionid="20003" script="train.lua" /> <movevent event="StepOut" actionid="20000" script="train.lua" /> <movevent event="StepOut" actionid="20001" script="train.lua" /> <movevent event="StepOut" actionid="20002" script="train.lua" /> <movevent event="StepOut" actionid="20003" script="train.lua" /> Pronto.. 5-Agora vai no Mapa Editor coloque os Action no pisos Exemplo: X = Treiner A = Char W = Divisa (pedra/poste) .... = Espaço vazio X w w w A... X w w Action tem que ficar no piso que o char vai para treiner (A) O numero Action é: ------------------------------------------------------------------ 20000 = X w X w A w w....w 20001 = w w X ...A w w w X 20002 = w....w w A w X w X 20003 = X w w w A... X w w -------------------------------------------------------------------- 6-LIXÃO = É uma area onde os treiner é teleportado depois que vc para de treinar , tem que ser longe de tudo os players nao pode ter acesso a essa area ok.. 7-Coloque as coordenada dessa area que vc ja criou no script ....\data\movements\scripts\train.lua Nesse caso ai é a area --------------------------------------------------------------------- local Trash = {x = 969, y = 47, z = 7} --------------------------------------------------------------------- 8-Substitua pela coordenada do seu LIXÃO ... Flw galera ....:icon1: Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/ Compartilhar em outros sites More sharing options...
mekyz 0 Postado Julho 15, 2008 Share Postado Julho 15, 2008 Nss!.. Isso vai me ajudar!.. Vou testa-lo no meu OT!.. Otimo trabalhoo!.. Atenciosamente Mekyz!.. Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-579870 Compartilhar em outros sites More sharing options...
ChAiN 1 Postado Julho 15, 2008 Share Postado Julho 15, 2008 Gostei cara.. muuito criativo =] vo testar depois edito.. Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-579910 Compartilhar em outros sites More sharing options...
PauloHen 0 Postado Julho 15, 2008 Share Postado Julho 15, 2008 Eu ja testei aqui deu certinho Tyyyyyyyyyyyy Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-579926 Compartilhar em outros sites More sharing options...
Johnnn 0 Postado Julho 16, 2008 Share Postado Julho 16, 2008 Rox...testei e deu certo muito bom!!! Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-580391 Compartilhar em outros sites More sharing options...
wedneyyuri 0 Postado Julho 27, 2008 Share Postado Julho 27, 2008 Very very Rox ^^ Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-589558 Compartilhar em outros sites More sharing options...
FelipeAugustoGuimaraesGome 0 Postado Julho 29, 2008 Share Postado Julho 29, 2008 Cara Muito criativo Very RoX!² -------------------------------------------------------------------------------- Assinatura Minha Fan Bar Te ajudei? Entao Use Sou Fan de My Avatar's Total Value: 1,109,998 Gold [item Information] Item List: Samurai Yoroi Guitar of Demona Flame Sword Flame Sword Elemental Wings Ancient Katana Assassin's Guise Assassin's Guise Hermes' Moon Mythrill Armor Mythrill Armor Mythrill Armor Mythrill Armor Mythrill Armor Mythic Hair Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-591850 Compartilhar em outros sites More sharing options...
furiavr 1 Postado Julho 29, 2008 Share Postado Julho 29, 2008 Poo ideia bem criativa...vo colokar no meu ot^^ flwxx vlww Link para o comentário https://xtibia.com/forum/topic/90955-novo-sistema-de-treiner/#findComment-591865 Compartilhar em outros sites More sharing options...
Posts Recomendados