Kakareco 2 Postado Março 1, 2009 Share Postado Março 1, 2009 Muito rox esse script cara, valeu por traze-lo para o xtibia, ajudou muito. Mais tem duas coisas. A 1ª e que nao entendi onde poe o ultimo script e a segunda e quando um palyer fala aleta som na sua casa da debug. Se vc souber ou alguem souber fala ae. T+ :smile_positivo: Link para o comentário Compartilhar em outros sites More sharing options...
Lucas0007 0 Postado Março 21, 2009 Share Postado Março 21, 2009 local focus = 0local talk_start = 0 local talk_state = 0 local costPerLevel = 300 dofile("./petConfig.lua") function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('How rude!.') 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) msg = string.lower(msg) if getDistanceToCreature(cid) < 4 then if (msgcontains(msg, 'hi') and (focus == 0)) then selfSay('Hello ' .. creatureGetName(cid) .. '! I can take you to the train!') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') end if msgcontains(msg, 'revive') and focus == cid then if isCreature(getPlayerStorageValue(cid, storages.petUid)) == 0 then if getPlayerStorageValue(cid, storages.petIsOnline) == 2 then selfSay('YOUR PET DIED?!, YOU\'R A BAD OWNER, THIS WILL COST YOU ' .. getPlayerLevel(cid)*costPerLevel .. ' GOLD COINS!, AGREE?!') talk_state = 1 else selfSay('Your pet is alive.') end else selfSay('Your pet is standing next to you.') end talk_start = os.clock() end if msgcontains(msg, 'yes') and focus == cid and talk_state == 1 then if doPlayerRemoveMoney(cid, getPlayerLevel(cid)*costPerLevel) == 1 then setPlayerStorageValue(cid, storages.petIsOnline, 1) selfSay('You can now summon again your pet.') else selfSay('You don\'t have enought money.') end talk_state = 0 talk_start = os.clock() end if msgcontains(msg, 'bye') then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 talk_state = 0 end end end function onCreatureChangeOutfit(creature) end function onThink() doNpcSetCreatureFocus(focus) if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 talk_state = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then talk_state = 0 selfSay('Good bye then.') talk_state = 0 focus = 0 end end end Como eu crio o pet ? E onde poem o npc ? Eu testei tudo deu certo mais eu não consigo criar o pet e por o npc Link para o comentário Compartilhar em outros sites More sharing options...
gnorre157 0 Postado Maio 6, 2009 Share Postado Maio 6, 2009 [06/05/2009 08:53:43] Lua Script Error: [TalkAction Interface] [06/05/2009 08:53:43] data/talkactions/scripts/pets/!pet.lua:onSay [06/05/2009 08:53:43] luaDoSummonCreature(). Monster name() not found [06/05/2009 08:53:43] Lua Script Error: [TalkAction Interface] [06/05/2009 08:53:43] data/talkactions/scripts/pets/!pet.lua:onSay [06/05/2009 08:53:43] luaDoConvinceCreature(). Creature not found Da esse erro no gui quando digito !pet, da uma luz ae. no tibia diz: not enough room Link para o comentário Compartilhar em outros sites More sharing options...
vtncdc 0 Postado Junho 14, 2009 Share Postado Junho 14, 2009 cara n ajudo em nd pq n da pra fazer o pet sumi =/ mais parabens pelo iniciativa Link para o comentário Compartilhar em outros sites More sharing options...
Lukinh4s96 0 Postado Junho 29, 2009 Share Postado Junho 29, 2009 (editado) Porra veý,tah tudo oóTimo,consigo invoca pet,se eu digo !pet dinovo ele some e da ByeBye SoóH tem uma coisa qui num deu certo...O pet de lvl 100 mais (eu axo),o Demon,Ele em vez de mi ajudar,ele me ataca,como se fosse um bixo do mapa mesmo Tem alguem ae qui pode me ajuda? Valeu desde Jah ! ~ Clica aqui e me upa plx! Faça jah seu Pet! Editado Junho 29, 2009 por Lukinh4s96 Link para o comentário Compartilhar em outros sites More sharing options...
Camileerah 0 Postado Julho 22, 2009 Share Postado Julho 22, 2009 Muiiito bom esse script, funciono perfeitinho ake *o* , vlw :x Link para o comentário Compartilhar em outros sites More sharing options...
adoXD 5 Postado Julho 29, 2009 Share Postado Julho 29, 2009 Fico ate legal mais parece muito com summon aki não funfo=/ Link para o comentário Compartilhar em outros sites More sharing options...
cavazani2904 0 Postado Novembro 11, 2009 Share Postado Novembro 11, 2009 Queria saber se funciona em OT 8.5 Pois estou procurando tal script a horas e não acho espero resposta se funcinar...Avisem E se possivel fazer um script para TFS 8.5 Link para o comentário Compartilhar em outros sites More sharing options...
lokaodomau 0 Postado Novembro 28, 2009 Share Postado Novembro 28, 2009 eu não estou conseguindo... =[ meu ot é 8.50 yourots... sei que você disse que não é scripter, então, se algum scripter puder me ajudar, ficarei agradecido. Ty galera. e muito bom tópico. =D~ Link para o comentário Compartilhar em outros sites More sharing options...
gkaonicx72 20 Postado Novembro 28, 2009 Share Postado Novembro 28, 2009 Ronks você reviveu um tópico isso esta contra as regras do Xtibia. Tome mais cuidado da próxima vez, espero que não se repita. Lokaodomau este tópico já é velho e existem grandes chances de que o criador dele não freqüenta mais o Xtibia, tente criar um novo tópico na seção de duvidas sobre scripting, la talvez alguem poderá te ajudar. Até mais. Link para o comentário Compartilhar em outros sites More sharing options...
f3li93darzan 0 Postado Dezembro 25, 2009 Share Postado Dezembro 25, 2009 Mano Gostei Mesmo Em :S Link para o comentário Compartilhar em outros sites More sharing options...
Dragnus 0 Postado Fevereiro 23, 2010 Autor Share Postado Fevereiro 23, 2010 Ronks você reviveu um tópico isso esta contra as regras do Xtibia. Tome mais cuidado da próxima vez, espero que não se repita. Lokaodomau este tópico já é velho e existem grandes chances de que o criador dele não freqüenta mais o Xtibia, tente criar um novo tópico na seção de duvidas sobre scripting, la talvez alguem poderá te ajudar. Até mais. Caro moderador, Ainda frequento o forum, mas como falei no inicio não sou scripter então não tenho como ajudar o pessoal que esta com dificuldades, pois apenas encontrei em um forum extrangeiro e trouxe pra ca. Abç! Link para o comentário Compartilhar em outros sites More sharing options...
DevilMoon 125 Postado Julho 8, 2010 Share Postado Julho 8, 2010 Adicione na memsa pasta do config.lua o arquivo petConfig.lua no petConfig ponha: ãn? nao entendi !! Link para o comentário Compartilhar em outros sites More sharing options...
matheus1000 11 Postado Julho 8, 2010 Share Postado Julho 8, 2010 (editado) DevilMoon, Sabe a pasta do 'config.lua'? Pegue o 'petConfig.lua' e bota na mesma pasta. Editado Julho 8, 2010 por MasterMathw Link para o comentário Compartilhar em outros sites More sharing options...
Cordel 0 Postado Julho 12, 2010 Share Postado Julho 12, 2010 Fuunfa em que versões ? Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados