OA

Bless =]

Por OASIDOASIDoASId, 31 de jan. de 2008 em NPCs, monsters e raids

otserv
tibia
script
16
7.5k
31 de janeiro de 2008 às 15:05

o Topico postado O Addon De Blessing foi este

<a href="http://www.xtibia.com/forum/index.php?showtopic=46229" target="_blank">http://www.xtibia.com/forum/index.php?showtopic=46229</a>

Postado Por ArcavieR

................

COmo ele TInha Dito

O npc Estava danduh Erro

Na Hora de COnferiR c o YPC Tinha Ou nao o Bless

Bom Dei Uma Arrumadinha

e Fiz Mais q ISsuh

Colokei Todos Os 5 Npc de Bless em apenas UM

e Em Vez De Falar o nome Do Bless Q eh um saco

Eh Soh falar Hi

bless1,bless2.bless3.bless4.bless5

ProNTUH

POde Reparar q na hora q vc falar bless1 ele Pergunta apra vc Voce ker emsmo comprar "nome do bless" por 20k?

Dah apra Ver Q n eh o MEsmo bless instalado

No Bugs Please xDDDD

 

Chega De COnvercar Vamos Ao Trabalho

em data/npc/script

abra qualquer .lua e adicione istuh (salve como todos.lua)

 

 

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, 'bless1') 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

 

elseif msgcontains(msg, 'bless2') 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

 

elseif msgcontains(msg, 'bless3') 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

 

elseif msgcontains(msg, 'bless4') 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

 

elseif msgcontains(msg, 'bless5') 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 doPlayerRemoveMoney(cid,20000) == 1 then

selfSay('Now the gods blessed you.')

doPlayerAddBlessing(cid,1)

else

selfSay('Sorry, you dont have enough money.')

end

 

elseif msgcontains(msg, 'yes') and talk_state == 1 then

talk_state = 0

 

if doPlayerRemoveMoney(cid,20000) == 1 then

selfSay('Now the gods blessed you.')

doPlayerAddBlessing(cid,2)

else

selfSay('Sorry, you dont have enough money.')

end

 

elseif msgcontains(msg, 'yes') and talk_state == 1 then

talk_state = 0

 

if doPlayerRemoveMoney(cid,20000) == 1 then

selfSay('Now the gods blessed you.')

doPlayerAddBlessing(cid,3)

else

selfSay('Sorry, you dont have enough money.')

end

 

elseif msgcontains(msg, 'yes') and talk_state == 1 then

talk_state = 0

 

if doPlayerRemoveMoney(cid,20000) == 1 then

selfSay('Now the gods blessed you.')

doPlayerAddBlessing(cid,4)

else

selfSay('Sorry, you dont have enough money.')

end

 

elseif msgcontains(msg, 'yes') and talk_state == 1 then

talk_state = 0

 

if doPlayerRemoveMoney(cid,20000) == 1 then

selfSay('Now the gods blessed you.')

doPlayerAddBlessing(cid,5)

else

selfSay('Sorry, you dont have enough money.')

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())

 

agora em data/npc

abra qualquer xml lah com o bloko de notas e adicione isto(salve como Bless todos.xml)

 

 

<?xml version="1.0"?>

 

<npc name="Bless Todos" script="data/npc/scripts/todos.lua" access="1" lookdir="2">

<mana now="800" max="800"/>

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

<look type="266" head="114" body="113" legs="113" feet="113"/>

</npc>

 

Tah feiTo xD..C kISer Add o npc em seu Mapeditor

vai na pasta do mapeditor abra o xml creatures com o bloko de notas

e adicione estah linha

<creature looktype="266" name="Bless Todos" head="123" body="123" legs="123" feet="21" addons="3" type="npc"/>

 

FeiTo

 

Creditos 70% para o Arcavier POr Fazer O NPC

30% para mim por arrumar juntar Entre OUtras COisinhas q n tinha

Flws abrAco!

Editado Janeiro 31 por AOSIDoasiosadsa

31 de janeiro de 2008 às 16:04

6 PEssoas

Ajah viraum e Nguem

ala NAda

=X

ComenTeM PLease ==)

MalzbierM
31 de janeiro de 2008 às 17:47

meu caro eu testei aki e a bless n fez nada so gasto a grana dos players e continuo perdendo a mesma coisa sem bless

31 de janeiro de 2008 às 19:22

Bom meu caro AMiGo

Eu AjeiTei O BLess

Comom estava na script

Colokei os 5* NO kso

Juntos..

aki Funciono De Boua

jaH ns ei o problema causado ai

=)

abracos

BozosonB
02 de fevereiro de 2008 às 15:31

Pelo jeito alguns OTServers n tem o sistema de bless, q nem o q estou usando, ele adiciona no players as 5 blesses, mas elas n funcionam =S

Strike_SkyS
08 de fevereiro de 2008 às 11:21

Mto bom msm !

1 mês depois...
michelpm1M
01 de março de 2008 às 12:20

Simplesmente perfeito serviu pra mim funfou 100% ;P vlwzao ae

XnoneX
01 de março de 2008 às 13:47

aki funfo tb

axo que vcs devem ter feito alguma coisa errada pra naum funfa

 

vlw kara :smile_positivo:

07 de março de 2008 às 20:13

massa...

GuTOcSG
09 de março de 2008 às 20:36

hehe vlw q BOm q v6 gostarraum x)

 

Kem Fez esse Npc Fui E

eu Sou o AOSidAOSDiOASID

Eh q eu mUdei De NiCk

BOm n tem nada V Neah

AOSDIAOSIdoaSD

FIK FeIU enTaum Fiz Essa AKi Vlws =**!

Editado Março 9 por GuTOcS

FAG10F
13 de março de 2008 às 17:05

Mtu Bom ;D

5 meses depois...
Felipe14F
02 de agosto de 2008 às 13:28

Mto Bom, Ta em um script só, Mens npcs do mapa!

Vlws =)

 

//Flp

2 semanas depois...
leoloko12L
14 de agosto de 2008 às 16:30

aki deu erro mano

 

veh issu aew vlw

YstiflerY
19 de agosto de 2008 às 07:28

sim..botei ..bless no meu server mais quando morro..ainda perde varios lvls..

onde bota pra perde poukos??

lucazlacerdaL
19 de agosto de 2008 às 07:31

Mto bom ^^