Npc's Bless

Arcavier
em NPCs, monsters e raids
  • 1
  • 2

Arcavier

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/10/06Posts: 16

Funçao Avançada

 

Necessita NPC Jiddo system

 

NPC's Bless Created 100% By Me:

 

Aqui em casa naum funciono perfeitamente pq eu axo q a funçao getPlayerBlessing esta com problemas.

 

Mas porque esta com problemas?

bom, o comando getPlayerBlessing verifica se o player ja tem uma determinada bless para depois ele vende ou não para o comprador, e no caso quando vc vai compra ele fala direto que vc ja tem sem vc ter comprado alguma vez, mas quando eu mostrei pro xidaozu ele disse que estava ótimo, portando isto talvez deverá algum problema nesta função.

Enfim, peço se este problema acontece com vcs, que retire a função:

if getPlayerBlessing(cid,1) == 0 then do script

 

nos outros npc's para vc n ter duvida a funçoes saum as msm so q elas mudam de acordo com a bless, ali no caso esta (cid,1), pois ele ira verifica se vc tem a bless 1. Mas voltando a parte de retira a funçao, depois q vc retira-la retire tbm:

else

selfSay('Sorry, you already have this blessing.')

end

 

NPC 1

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------- Npc of Bless ----------------------------------
---------------------------- Credits 100% by Arcavier -----------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end


	if msgcontains(msg, 'bless') then
		selfSay('I sell the \"Spiritual Shielding\" Blessing.')
------------------------------------------------ bless ------------------------------------------------
	elseif msgcontains(msg, 'Spiritual Shielding') or msgcontains(msg, 'spiritual shielding') then
		if isPremium(cid) then
			selfSay('Do you want to buy the Spiritual Shielding Blessing for 20k?')
			talk_state = 1
		else
			selfSay('Sorry, you need a premium account to get bless.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0

					if getPlayerBlessing(cid,1) == 0 then
					if doPlayerRemoveMoney(cid,20000) == 1 then
					selfSay('Now the gods blessed you.') 
						doPlayerAddBlessing(cid,1)
			else
			selfSay('Sorry, you dont have enough money.')
			end
			else
		selfSay('Sorry, you already have this blessing.')
			end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 2) then
		selfSay('Ok then.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

NPC 2

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------- Npc of Bless ----------------------------------
---------------------------- Credits 100% by Arcavier -----------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end


	if msgcontains(msg, 'bless') then
		selfSay('I sell the \"Spark of the Phoenix\" blessing.')
------------------------------------------------ bless ------------------------------------------------
	elseif msgcontains(msg, 'Spark of the Phoenix') or msgcontains(msg, 'spark of the phoenix') then
		if isPremium(cid) then
			selfSay('Do you want to buy the Spark of the Phoenix Blessing for 20k?')
			talk_state = 1
		else
			selfSay('Sorry, you need a premium account to get bless.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0

					if getPlayerBlessing(cid,2) == 0 then
					if doPlayerRemoveMoney(cid,20000) == 1 then
					selfSay('Now the gods blessed you.') 
						doPlayerAddBlessing(cid,2)
			else
			selfSay('Sorry, you dont have enough money.')
			end
			else
		selfSay('Sorry, you already have this blessing.')
			end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 2) then
		selfSay('Ok then.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

NPC 3

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------- Npc of Bless ----------------------------------
---------------------------- Credits 100% by Arcavier -----------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end


	if msgcontains(msg, 'bless') then
		selfSay('I sell the \"Embrace of Tibia\" Blessing.')
------------------------------------------------ bless ------------------------------------------------
	elseif msgcontains(msg, 'Embrace of Tibia') or msgcontains(msg, 'embrace of tibia') then
		if isPremium(cid) then
			selfSay('Do you want to buy the Embrace of Tibia Blessing for 20k?')
			talk_state = 1
		else
			selfSay('Sorry, you need a premium account to get bless.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0

					if getPlayerBlessing(cid,3) == 0 then
					if doPlayerRemoveMoney(cid,20000) == 1 then
					selfSay('Now the gods blessed you.') 
						doPlayerAddBlessing(cid,3)
			else
			selfSay('Sorry, you dont have enough money.')
			end
			else
		selfSay('Sorry, you already have this blessing.')
			end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 2) then
		selfSay('Ok then.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

NPC 4

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------- Npc of Bless ----------------------------------
---------------------------- Credits 100% by Arcavier -----------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end


	if msgcontains(msg, 'bless') then
		selfSay('I sell the \"Fire of the Suns\" Blessing.')
------------------------------------------------ bless ------------------------------------------------
	elseif msgcontains(msg, 'Fire of the Suns') or msgcontains(msg, 'fire of the suns') then
		if isPremium(cid) then
			selfSay('Do you want to buy the Fire of the Suns Blessing for 20k?')
			talk_state = 1
		else
			selfSay('Sorry, you need a premium account to get bless.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0

					if getPlayerBlessing(cid,4) == 0 then
					if doPlayerRemoveMoney(cid,20000) == 1 then
					selfSay('Now the gods blessed you.') 
						doPlayerAddBlessing(cid,4)
			else
			selfSay('Sorry, you dont have enough money.')
			end
			else
		selfSay('Sorry, you already have this blessing.')
			end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 2) then
		selfSay('Ok then.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

NPC 5

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------------- Npc of Bless ----------------------------------
---------------------------- Credits 100% by Arcavier -----------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
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
-- OTServ event handling functions end

function creatureSayCallback(cid, type, msg)
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
if(npcHandler.focus ~= cid) then
	return false
end


	if msgcontains(msg, 'bless') then
		selfSay('I sell the \"Wisdom of Solitude\" Blessing.')
------------------------------------------------ bless ------------------------------------------------
	elseif msgcontains(msg, 'Wisdom of Solitude') or msgcontains(msg, 'wisdom of solitude') then
		if isPremium(cid) then
			selfSay('Do you want to buy the Wisdom of Solitude Blessing for 20k?')
			talk_state = 1
		else
			selfSay('Sorry, you need a premium account to get bless.')
			talk_state = 0
		end
------------------------------------------------ confirm yes ------------------------------------------------
	elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0

					if getPlayerBlessing(cid,5) == 0 then
					if doPlayerRemoveMoney(cid,20000) == 1 then
					selfSay('Now the gods blessed you.') 
						doPlayerAddBlessing(cid,5)
			else
			selfSay('Sorry, you dont have enough money.')
			end
			else
		selfSay('Sorry, you already have this blessing.')
			end
------------------------------------------------ confirm no ------------------------------------------------
	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 2) then
		selfSay('Ok then.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())



Você é meu Fan ou gosta do que eu faço? Use:

HugoBeolchi

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 17/01/06Posts: 111Char no Tibia: Poler'Taylor

Em qual servidor q vc testo?

zorzin ou evolution?

Vlw

Bonzin

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/02/07Posts: 7Char no Tibia: Toni Druida

Se não for pedir muito posta o Npc e o Scritp já prontos??? Obrigado...

--- Colaborando com um forum melhor. ---

Bonzin Server 8.x

Exp: 30x
Ml: 50x
Skills: 100x

Mapa: Sadteammap editado, grande com muitas áreas de hunt boas...

Acc manager: 111111 / tibia

Ip: bonzinhu.servegame.com

Comentem, se possivel divulguem e obrigado.

Bfalcao

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/12/06Posts: 6

Putz cara muito bom esses npcs principalmente que em quase nenhum ou nenhum tem esse npc incluido.

Bom trabalho cara.


pra vc yasmine minha feiticera q me encanta

brunororato

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/08/07Posts: 1

Nossa eu to precisanu disso ae mais n sei montra o npc sera q vc poderia me ajuda ou alguem ae q saiba fazer vlw

Hrk123

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/05/07Posts: 1

posta link cum os 5 pra baxa

 

a mais uma coisa vi isso ai no otservbrasil igualzinho lol

flokos

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 27/06/07Posts: 44Char no Tibia: Kaussidon

YES

 

Muito bom...

E verdade esses NPCs nen são valorizados.

Deverian ser.

 

Aplausos

 

Clap! Clap! Clap! Clap! Clap! Clap! Clap!


"O impossível é aquilo que ninguém faz...até que alguém faça"
(Lair Ribeiro)


__________________________________________________________________________


Fiz Algo que vc gostou muito?
Então Coloke minha FãnBar Oras Bolas, Afinal e para issu que serve =]

celohere

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 30/09/07Posts: 19

cara , meus parabéns não foi facil achar esses npcs. aqui ta funcionando certinho :lol: valeu mesmo

Mager Maluco

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/07/06Posts: 12

Bem legal , eu tava procurando issu mesmo , mas...vc só coloco o script deles , vc podia dar mais informações , ajuda para colocar no map editor pra poupar tempo de quem lê o topic e coisas do tipo , pq sem issu vc só da mais trabalho pra quem quer isso mas não sabe arrumar direito

 

Eu sei arrumar então vo por no meu OT , parece que está pegando , parabéns e se der edita c/ + informações para ajudar como eu já disse

 

Flws ;D

Clica ae pra me ajudar..vlws.

Monsters Game - World 3

4151347

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/07/07Posts: 13

Esse npc funciona no Yurots normal?

META:
[x] 10 posts [x] 1 tópico
[x] 30 posts [x] 2 tópicos
[ ] 50 posts [ ] 5 tópicos
[ ] 100 post [ ] 10 tópicos
[ ] 150+ posts [ ] 15+ tópicos


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


É meu fan? Use minha fan bar ^^



---------------------------------------
Entrem ae ^^

dragonaliance.servegame.com
Hamachi: dragonaliance/123

"YOU ARE MY PLACE"

jmazzacaro

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/11/07Posts: 29Char no Tibia: PsyKina

ai cara nao entendi direito o topico vc bem q podia posta o link com os 5 pra baixa se nao for pedir de mais

CleytonDelMagnatas

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/07Posts: 46Char no Tibia: Sir Vendetta

opa

vlws viu !

vo coloca imediatamente no meu ot ^.^

\\ Retired do Xtibia //

Sou Fan de:


Seja meu Fan! Use minha Fan bar!


Unidos Contra Os Emos!!!


Meu Flogão


"Bolt's are flying, people are dying"

Meu Char



Contato: cleyton_crazy@hotmail.com

OASIDOASIDoASId

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/01/08Posts: 11

CARaKAa veLhOW

PerFieTOWW

Eu Tava ProCURanDO Esse NPc

Vc N Tem Nocao De COmo Me AjUDoW Cara!

De+ d++

VO TeNTar InvoLVer as % scripts

em 1 uma SOh

1 Uniko Npc q VenDe dah first bless ateh a fight bless

Mtu Bom =]

DaNDaNrOxX

oi mosso
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 18/01/08Posts: 1455Char no Tibia: Saint Claire

Nussa muito bom vo por no meu ot ^^ vlw mesmo!

 

 

Entrada na equipe: 23/10/2008 Cargo: Estagiário

Promoção: 25/11/2008 Cargo: Moderador

Promoção: 21/10/2009 Cargo: Coordenador

Remoção: 09/05/2010 Motivo: Estudos

Retorno: 15/11/2010 Cargo: Moderador

Remoção: 20/12/2012.

 

 

Claudioo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/01/07Posts: 62

Os Npcs funcionam aqui (aries) mas efetivamente as bless nao servem pra nada, antes da bless meu char perdeu 4 levels, depois perdeu 4 também :S

 

Ta certo isso?

exiva "assinatura.
  • 1
  • 2