Postado Novembro 18, 2016 9 anos Boa noite, Galera do Tibia King! Gostaria eu, de pedir mais uma vez a sua ajuda. Preciso de um NPC que não somente teleporte o player para o Saffari, como também lhe dê 30 Pokebolas (a minha escolha) e que esse player só possa ficar no Saffari por 30 minutos e assim que o tempo se esgotar ele seja teleportado para o Templo, sendo que, se ele ainda tiver alguma das Pokebolas dadas pelo NPC Saffari elas sumam, evitando assim que o Player fique com as pokebolas do Saffari fora do próprio saffari zone. Abaixo, vou postar o script que tenho no meu servidor, mas ele não teleporta o player para o saffari e acredito eu que ele não remova as pokebolas do player quando o tempo acabar. se alguem puder me ajudar nisso eu agradeço de mais e vai levar meu Rep!! valeu galera, fico no aguardo.. Saffari.lua focus = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('See ya.') 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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then selfSay('Olá a entrada no Saffari custará 1k vc aceita??') focus = cid talk_start = os.clock() elseif (msgcontains(msg, 'yes') ) then if getPlayerItemCount(cid,2391) >= 1 or getPlayerItemCount(cid,2394) >= 1 or getPlayerItemCount(cid,2392) >= 1 or getPlayerItemCount(cid,2393) >= 1 then selfSay("Você não pode entrar no Saffari com nenhuma outra ball exceto a Saffari!! Cya") focus = 0 talk_start = 0 elseif getPlayerStorageValue(cid, 98796) >= 1 or getPlayerStorageValue(cid, 98797) >= 1 then selfSay("Você já está na saffari zone!") focus = 0 talk_start = 0 elseif doPlayerRemoveMoney(cid, 100000) then --1000dl --alterado v1.9 setPlayerStorageValue(cid, 98796, 1) setPlayerStorageValue(cid, 98797, 1) doPlayerAddItem(cid, 12617, 70) --alterado v1.9 doTeleportThing(cid, SafariEnter) doSendMagicEffect(getThingPos(cid), 21) talk_start = os.clock() else selfSay("Você não tem dinheiro suficiente") --alterado v1.9 focus = 0 talk_start = 0 end elseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3) then selfSay('Sorry, Im busy at this moment.') elseif (msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3) then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureChangeOutfit(creature) end function onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('See ya.') end focus = 0 end end Se Ajudei Clique no ao Lado, Não Custa nada !!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.