Ir para conteúdo

Featured Replies

Postado

Bom dia a todos...

(1) - Eu gostaria de um npc ( Saffari Zone) do "PXG" bom pra quem não sabe que o npc faz eu vo falar um pouco para que tenho uma noção. :D

Bom ele é um npc que você paga " 1k " e ele te teleporta para um " X "local e te da 30 " Saffari balls " e também que ele não teleporte a pessoa se ele estiver usando outras poke balls "Normal ball,great ball,super ball,ultra ball, nem a saffari ball (Da ultima caçada)".

Aproveitando eu também irei pedir se tem como fazer o seguinte script junto com esse npc.

(2) - Que quando acaba as 30 "Saffari balls"ele seja teleportado automático para fora.

(3) - E como eu faço para que quando a pessoa morrer la dentro ele não perda " exp " não perda.

Muito Obrigado se alguém puder me ajudar com isso , ficaria muito grato. :D

:staroff: :staroff: :staroff: :staroff: :staroff: - :accept: Vlw Gente !!

PCj2qBE.jpg


- Novo Projeto !!! Em Breve ... -

GOSTO DO MEU TRABALHO ? ENTÃO DA REP+

  • Respostas 19
  • Visualizações 4.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • fiz rapidinho, vê se é isso que vc quer: MODS: Saffari.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="Saffari" version="1.0" author="Vodkart" contact="tibiaking.co

  • 2 - usando globalevents + storage ou colocas tiles espalhado pelo mapa para checar se já acabou as pokeball e teleportar 3 - usando onDeath + storage '-'

  • Já está configurado para não perder loot e nem exp. Mods: <?xml version="1.0" encoding="UTF-8"?> <mod name="Saffari" version="1.0" author="Vodkart" contact="tibiaking.com"

Postado

2 - usando globalevents + storage ou colocas tiles espalhado pelo mapa para checar se já acabou as pokeball e teleportar

3 - usando onDeath + storage '-'

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor

Vodkart você poderia me ajudar nessas (2) - (3) só da uma explicada melhor ai depois eu vó tentando fase aqui sozinho :D (se souber de algum tutorial também).

Vlw :accept:

Editado por rolisso (veja o histórico de edições)

PCj2qBE.jpg


- Novo Projeto !!! Em Breve ... -

GOSTO DO MEU TRABALHO ? ENTÃO DA REP+

Postado

fiz rapidinho, vê se é isso que vc quer:

MODS:

Saffari.xml

<?xml version="1.0" encoding="UTF-8"?>  

<mod name="Saffari" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes">  

<config name="saffari_func"><![CDATA[

config = {

Price = 2000,

Premium = false,

Level = 50,

Saffari_Pos = {Enter = {x=189,y=53,z=7}, Exit = {x=195,y=53,z=7}},

Time = 30,

AddPokeballs = {11445,30},

Blocked_pokeballs = {2146, 2147, 11437, 11441},

Storages = {874547,874548},

levelandskills = false,

loot = false

}

]]></config>

<event type="login" name="SaffariRegister" event="script"><![CDATA[

function onLogin(cid)

registerCreatureEvent(cid, "SaffariDeath")

	return true

	end]]></event>

<talkaction words="/saffari;!saffari" event="buffer"><![CDATA[

domodlib('saffari_func')

param = string.lower(param)

if (param == "") then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !saffari info")

elseif(param == "info") then

doShowTextDialog(cid,2160,"Saffari Info:\n\nLevel Minimum: "..config.Level.."\nSaffari Cost: "..config.Price.."\nTime Limit: "..config.Time.." minutes\n\nThe safari is home to rare creatures, some are dangerous and others not\n[*Warning*]\nis only allowed to enter with saffari balls.\n\nTo leave enter command:\n!saffari leave")

elseif(param == "leave") then

if getPlayerStorageValue(cid, config.Storages[1]) >= 1 then

doTeleportThing(cid, config.Saffari_Pos.Exit)

setPlayerStorageValue(cid, config.Storages[1], -1)

setPlayerStorageValue(cid, config.Storages[2], -1)

doPlayerSendTextMessage(cid,22,'you left the saffari zone.')

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not in Saffari")

end

end

return true

]]></talkaction>

<globalevent name="SaffariCheck" interval="60" event="script"><![CDATA[

domodlib('saffari_func')

function onThink(interval, lastExecution)

local on = getPlayersOnline()

if #on > 0 then

for i = 1, #on do

if getPlayerStorageValue(on[i], config.Storages[2]) <= os.time() and getPlayerStorageValue(on[i], config.Storages[1]) >= 1 then

doTeleportThing(on[i], config.Saffari_Pos.Exit)

setPlayerStorageValue(on[i], config.Storages[1], -1)

setPlayerStorageValue(on[i], config.Storages[2], -1)

doPlayerSendTextMessage(on[i],22,'you left the saffari zone.')

end

end

end

return true

end

]]></globalevent>

<event type="death" name="SaffariDeath" event="script"><![CDATA[

domodlib('saffari_func')

function onDeath(cid, corpse, deathList)

if isPlayer(cid) and getPlayerStorageValue(cid, config.Storages[1]) >= 1 then

setPlayerStorageValue(cid, config.Storages[1], -1)

setPlayerStorageValue(cid, config.Storages[2], -1)

if config.loot == false then doCreatureSetDropLoot(cid, false) end

if config.levelandskills == false then doPlayerSetLossSkill(cid, 0) end

end

return true

end

]]></event>

</mod>
NPC/script SaffariNpc.lua
domodlib('saffari_func')

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end

function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end

function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end

function onThink() npcHandler:onThink() end

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid

local msg = string.lower(msg)

if isInArray({"saffari","enter","entrar"}, msg) then

npcHandler:say('you can stay in the Saffari zone by '..config.Time..' minutes, the price is '..config.Price..' gp(s), You want enter? {yes}', cid)

talkState[talkUser] = 1

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then

for i = 1, #config.Blocked_pokeballs do

if getPlayerItemCount(cid, config.Blocked_pokeballs[i]) >= 1 then

npcHandler:say('Keep your PokeBalls!', cid) return true

end

end

if config.Premium == true and not isPremium(cid) then

npcHandler:say('Sorry, you need to be premium!', cid) return true

elseif getPlayerLevel(cid) < config.Level then

npcHandler:say('Sorry, you must be at least level '..config.Level..' to enter the Saffari zone!', cid) return true

elseif not doPlayerRemoveMoney(cid, config.Price) then

npcHandler:say('Sorry, you do not have enough money!', cid) return true

end

doPlayerAddItem(cid, config.AddPokeballs[1], config.AddPokeballs[2])

selfSay("Thanks, you've been teleported to the Saffari zone and has "..config.Time.." minutes, if you want to leave enter {!saffari leave}.", cid)

doTeleportThing(cid, config.Saffari_Pos.Enter)

setPlayerStorageValue(cid, config.Storages[1], 1)

setPlayerStorageValue(cid, config.Storages[2], os.time()+config.Time*60)

elseif msg == "no" and talkState[talkUser] >= 1 then

selfSay("tudo bem então.", cid)

talkState[talkUser] = 0

npcHandler:releaseFocus(cid)

end

return TRUE

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new()) 
Saffari Hunter.xml
<?xml version="1.0"?>

<npc name="Saffari Hunter" script="data/npc/scripts/SaffariNpc.lua" walkinterval="50000" floorchange="0">

<health now="1000" max="1000"/>

<look type="130" head="0" body="114" legs="114" feet="0" addons="0"/>

<parameters>

<parameter key="message_greet" value="Hello |PLAYERNAME|. I can take you to {saffari} zone. {enter}"/>

</parameters>

</npc>

-----------------------------

configurações

config = {

Price = 2000, -- qnto vai custar

Premium = false, -- se precisa ser premium

Level = 50, -- level minimo para entrar

Saffari_Pos = {Enter = {x=189,y=53,z=7}, Exit = {x=195,y=53,z=7}}, -- pos da safari, e pos pra onde ele vai dps que acaba o tempo

Time = 30, -- tempo maximo q ele pode ficar no saffari in minutes

AddPokeballs = {11445,30}, -- id da saffari ball e quantidade

Blocked_pokeballs = {2146, 2147, 11437, 11441}, -- pokeballs q ele n pode estar na bag

Storages = {874547,874548}, -- n mexa

levelandskills = false, -- se vai perder skills e exp ao morrer

loot = false -- se vai perder loot ao morrer

}

comandos extra:

!saffari info -- mostra em uma janela sobre o preço, lvl e o tempo que pode ficar lá

!saffari leave -- faz com que o player saia da saffari zone

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.1k

Informação Importante

Confirmação de Termo