Ir para conteúdo

Featured Replies

Postado

Assim Galera do TK, queria um npc que ele tivesse tipo 10 missões se falava hi com ele.

Aparecia assim tipo...

Spoiler

Npc: Olá Noob tenho missões quer tentar fazer alguma delas? {sim}.
Noob: sim
Npc: Ótimo qual delas você quer Fazer? {Ninnja} {Cd} {Taurus} {Advogados} {Cowboy}
Noob: Advogados
Npc: Otimo vá nos Gorilas e cate 8 Bananas para mim Que lhe do Acesso a Advogados. {Bananas}
Noob: Bananas
Npc: Ok voce Ganho acesso a Advogados

 

Queria que se o player fazer a quest tipo advogados fala assim...

Voce ja Fez essa quest!

e Que ele de Acesso a Advogados.

 

ou

 

Noob: sim
Npc: Ótimo qual delas você quer Fazer? {Ninnja} {Cd} {Taurus} {Advogados} {Cowboy}
Noob: Cowboy
Npc: Você ganhou acesso a Cowboys por 1 horas, aproveite

 

Ai o NPC da uma storage que acaba em 1 hora para o player upar em tal cave

 

Agradeço desde já! 

Postado
4 minutos atrás, Matador18 disse:

Assim Galera do TK, queria um npc que ele tivesse tipo 10 missões se falava hi com ele.

Aparecia assim tipo...

  Mostrar conteúdo oculto

Npc: Olá Noob tenho missões quer tentar fazer alguma delas? {sim}.
Noob: sim
Npc: Ótimo qual delas você quer Fazer? {Ninnja} {Cd} {Taurus} {Advogados} {Cowboy}
Noob: Advogados
Npc: Otimo vá nos Gorilas e cate 8 Bananas para mim Que lhe do Acesso a Advogados. {Bananas}
Noob: Bananas
Npc: Ok voce Ganho acesso a Advogados

 

Queria que se o player fazer a quest tipo advogados fala assim...

Voce ja Fez essa quest!

e Que ele de Acesso a Advogados.

 

ou

 

Noob: sim
Npc: Ótimo qual delas você quer Fazer? {Ninnja} {Cd} {Taurus} {Advogados} {Cowboy}
Noob: Cowboy
Npc: Você ganhou acesso a Cowboys por 1 horas, aproveite

 

Ai o NPC da uma storage que acaba em 1 hora para o player upar em tal cave

 

Agradeço desde já! 

 

se ninguém fizer, tem um script que ele é de missões também, mas tipo tu faz a 1º e só pode fazer a 2º depois que liberar a primeira.

 

Criado em / data / npc arquivo mission.xml e cole isto:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Mission" script="mission.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="325" head="29" body="4" legs="20" feet="96" addons="3" corpse="2212"/>
	<parameters>
		<parameter key="message_greet" value="Hello |PLAYERNAME|. What brings you to me? You want start the {quest}?"/>
	</parameters>

</npc>

Em seguida, criado em / data / npc / scripts file mission.lua e cole isto:

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
if(msgcontains(msg, 'quest')) then
selfSay('To start this quest tell {mission}', cid) --This is just an example, In this script added 4 mission for you ;)
end
	if(msgcontains(msg, 'mission')) then
		if(getPlayerStorageValue(cid,700) < 1) then
			selfSay('Your first mission will be to get 100 {tarantula egg}.', cid)
			talkState[talkUser] = 1
		elseif (getPlayerStorageValue(cid,701) < 1) then
				selfSay('Your next mission will be to get 150 {strands of medusa hair}.', cid)
				talkState[talkUser] = 1
		elseif (getPlayerStorageValue(cid,702) < 0) then
				selfSay('Your next mission will be to get 300 {red dragon scales}.', cid)
				talkState[talkUser] = 1
		elseif (getPlayerStorageValue(cid,703) < 0) then
				selfSay('Your next mission will be to get 400 {green dragon scales}.', cid)
				talkState[talkUser] = 1
				
				
				
				
		elseif (getPlayerStorageValue(cid,703) == 1) then --zmieniac w zaleznosci od ostatniego storage!!
				selfSay('You have done all missions.', cid)
				talkState[talkUser] = 1
				
				
				
				
		end
		---------------------------------------
		elseif(msgcontains(msg, 'tarantula egg') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,700) < 1)) then
		if(doPlayerRemoveItem(cid, 11198, 100) == TRUE) then
			setPlayerStorageValue(cid,700,1)
			doPlayerAddPercentLevel(cid, 5) 
			selfSay('Thank you.', cid)
			talkState[talkUser] = 0
		else
			selfSay('To end mission you need have 100 {tarantula egg}.', cid)
		end
		---------------------------------------
		elseif(msgcontains(msg, 'strands of medusa hair') and talkState[talkUser] == 1  and (getPlayerStorageValue(cid,701) < 1) and (getPlayerStorageValue(cid,700) == 1)) then
		if(doPlayerRemoveItem(cid, 11226, 150) == TRUE) then
			setPlayerStorageValue(cid,701,1)
			doPlayerAddPercentLevel(cid, 7) 
			selfSay('Thank you.', cid)
			talkState[talkUser] = 0
		else
			selfSay('To end mission you need have 150 {strands of medusa hair}.', cid)
		end
		---------------------------------------
		elseif(msgcontains(msg, 'red dragon scales') and talkState[talkUser] == 1  and (getPlayerStorageValue(cid,702) < 1) and (getPlayerStorageValue(cid,701) == 1)) then
		if(doPlayerRemoveItem(cid, 5882, 300) == TRUE) then
			setPlayerStorageValue(cid,702,1)
			doPlayerAddPercentLevel(cid, 6) 
			selfSay('Thank you.', cid)
			talkState[talkUser] = 0
		else
			selfSay('To end mission you need have 300 {red dragon scales}.', cid)
		end
		---------------------------------------
		elseif(msgcontains(msg, 'green dragon scales') and talkState[talkUser] == 1 and (getPlayerStorageValue(cid,703) < 1) and (getPlayerStorageValue(cid,702) == 1)) then
		if(doPlayerRemoveItem(cid, 5920, 400) == TRUE) then
			setPlayerStorageValue(cid,703,1)
			doPlayerAddPercentLevel(cid, 5) 
			selfSay('Thank you.', cid)
			talkState[talkUser] = 0
		else
			selfSay('To end mission you need have 400 {green dragon scales}.', cid)
		end
		------------------------------------------
		
	end
end	
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

Vá para data / lib / 050-function.lua e cole: (function by Oskar1121 )

 

function doPlayerAddPercentLevel(cid, percent)
    local player_lv, player_lv_1 = getExperienceForLevel(getPlayerLevel(cid)), getExperienceForLevel(getPlayerLevel(cid)+1)
    local percent_lv = ((player_lv_1 - player_lv) / 100) * percent
    doPlayerAddExperience(cid, percent_lv)
end

créditoskawon

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 519.6k

Informação Importante

Confirmação de Termo