MA

Ai Vai O Npc Bless

Por Mauze, 07 de mai. de 2008 em NPCs, monsters e raids

script
19
6.8k
MauzeM
07 de maio de 2008 às 00:41

ai vai o code do npc bless e de thyrania mas tbm da no yurots ^^

primeiro va na pasta /data/npc/ depois copie qualquer arkivo XML renomeie como bless e cole issu \/

<?xml version="1.0"?>

<npc name="Francis, O Divino" script="data/npc/scripts/bless.lua" access="5" lookdir="1" autowalk="25">
<health now="1" max="1"/>
<look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
</npc>

 

agora va em data/npc/scripts copie qualquer arquivo LUA renomeie como bless e cole issu dentro \/

local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)

end


function onCreatureAppear(creature)

end


function onCreatureDisappear(cid, pos)
 	if focus == cid then
         selfSay('Good bye then.')
         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) < 4 then
 		selfSay('Ola ' .. getCreatureName(cid) .. '! Eu vendo todas as 5 Bless, se estiver interessado diga: BLESSINGS. Quando morrer e quiser comprar as bless novamente diga RESET.')
 		focus = cid
 		talk_start = os.clock()

 	elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
 		selfSay('Sorry, ' .. getCreatureName(cid) .. '! I talk to you in a minute.')

 	elseif focus == cid then
	talk_start = os.clock()

	if msgcontains(msg, 'blessings') then
    selfSay('Eu posso liberar as 5 blesses por 10k cada, se estiver interessado diga: bless1,bless2,bless3 ou bless4.(A bless4 custa 20k pois adiciona a bless4 e bless5).')


    elseif msgcontains(msg, 'bless1') then
    queststatus = getPlayerStorageValue(cid,750199)
    if queststatus == -1 then
    if pay(cid,10000) then
    doPlayerAddBlessing(cid,1)
    selfSay('Parabens, voce adquiriu a primeira Bless.')
    setPlayerStorageValue(cid,750199,1)
    else
    selfSay('Desculpe, voce precisa de 10k.')

    end
    else
    selfSay('Desculpe, voce ja tem essa bless.')

         end

    elseif msgcontains(msg, 'bless2') then
    queststatus2 = getPlayerStorageValue(cid,750299)
    queststatus = getPlayerStorageValue(cid,750199)
    if queststatus2 == -1 then
    if queststatus ~= -1 then
    if pay(cid,10000) then
    doPlayerAddBlessing(cid,2)
    selfSay('Parabens, voce adquiriu a segunda Bless.')    
    setPlayerStorageValue(cid,750299,1)
    else
    selfSay('Desculpe, voce precisa de 10k.')
    end
    else
    selfSay('Desculpe, voce precisa da primeira bless.')
    end
    else
    selfSay('Desculpe, voce ja tem essa bless.')
    end    

    elseif msgcontains(msg, 'bless3') then
    queststatus3 = getPlayerStorageValue(cid,750399)
    queststatus2 = getPlayerStorageValue(cid,750299)
    if queststatus3 == -1 then
    if queststatus2 ~= -1 then
    if pay(cid,10000) then
    doPlayerAddBlessing(cid,3)
    selfSay('Parabens, voce adquiriu a terceira Bless.')
    setPlayerStorageValue(cid,750399,1)
    else
    selfSay('Desculpe, voce precisa de 10k.')
    end
    else
    selfSay('Desculpe, voce precisa da segunda bless.')
    end
    else
    selfSay('Desculpe, voce ja tem essa bless.')
    end

    elseif msgcontains(msg, 'bless4') then
    queststatus4 = getPlayerStorageValue(cid,750499)
    queststatus3 = getPlayerStorageValue(cid,750399)
    if queststatus4 == -1 then
    if queststatus3 ~= -1 then
    if pay(cid,20000) then
    doPlayerAddBlessing(cid,4)
    doPlayerAddBlessing(cid,5)
    selfSay('Muito bom, agora voce tem todas as blesses .')
    setPlayerStorageValue(cid,750499,1)
    else
    selfSay('Desculpe, voce precisa de 20k.')
    end
    else
    selfSay('Desculpe, voce precisa da terceira bless.')
    end
    else
    selfSay('Desculpe, voce ja tem essa bless.')
    end 

    elseif msgcontains(msg, 'reset') then
    queststatus4 = getPlayerStorageValue(cid,750499)
    queststatus3 = getPlayerStorageValue(cid,750399)
    queststatus2 = getPlayerStorageValue(cid,750299)
    queststatus1 = getPlayerStorageValue(cid,750199)
    setPlayerStorageValue(cid,750199,-1)
    setPlayerStorageValue(cid,750299,-1)
    setPlayerStorageValue(cid,750399,-1)
    setPlayerStorageValue(cid,750499,-1)
    selfSay('Agora voce pode comprar as bless novamente.')


	elseif msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 4 then
		selfSay('Good bye, ' .. getCreatureName(cid) .. '!')
		focus = 0
		talk_start = 0
	end
end
end


function onCreatureChangeOutfit(creature)

end

function onThink()

if (os.clock() - talk_start) > 20 then
 		if focus > 0 then
 			selfSay('...')
 		end
 			focus = 0
 	end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('...')
			focus = 0
		end
	end
end

 

pronto npc criado para fazer ele no ot use /s bless

Bebum78B
07 de maio de 2008 às 17:20

cara pra mim é inutil esse topico,pois é so tira do OT Thyrania o npc,passa para outro ot e configura-lo.

MauzeM
09 de maio de 2008 às 00:21

Mais pra nao precisar perde tempo baxando outro ot ta ai o code

Bem Mais Pratico ;)

antoniojunA
09 de maio de 2008 às 07:41

Tem razao =P

Vou testar aki no meu Ot

Obrigado pela colaboraçao!!

 

Sem mais,

Antoniojun.

zimbitubaZ
10 de maio de 2008 às 13:14

aew eu sei que tem no thyrania mais como ele disse é melhor pegar o código do que baixar outro ot :p

Aprovado

Obrigado pela contribuição

14029691
15 de maio de 2008 às 14:58

Ta alguem ja testo e viu se funfo?!??

 

 

Grato desde Jah!

 

 

By.: Thi@gO

1 mês depois...
amandokaA
03 de junho de 2008 às 15:55

SERIA POSSIVEL ARUMA ESSE NPC?

O npc bless eh pra diminuir a % de morte

esse ai

faz vc PERDER NADAAAA

ai n rola neh

=/

rubuvivR
08 de junho de 2008 às 11:48

Quero sabe se funfa no tibia global o npc de bles quem sabes me dizer me add

 

Victor_neves14@hotmail.com "Sou novo no xtibia intao nao me xinguen :D" :weight_lift: :embarrest:

3 semanas depois...
fdpinhoF
23 de junho de 2008 às 07:13

Tb quero um que faça perde pelomenos 70%

Edita aeee.

Vlw =p

BENEDETEB
23 de junho de 2008 às 19:04

vlw ae muito bom msm ^^ mais que merda n perde nenhum lvl hsauhsuHSuahu

2 meses depois...
droperD
10 de agosto de 2008 às 15:48

É, também estou querendo arrumar isso, aqui também não perde level algúm! :S~

 

Alguém ajeita ae please!! :D~

frl123F
10 de agosto de 2008 às 17:05

bom msm cara

vlw ae

leoloko12L
14 de agosto de 2008 às 16:25

Kra ta dando erro

3 semanas depois...
TetonT
28 de agosto de 2008 às 22:00

lolzera vc tem a mesma foto que a minha LoL

1 mês depois...
careca21C
04 de setembro de 2008 às 23:45

Vlw cara Seu Script Ta Manero so cuncerta os Bug Que Tiver !!!

pos Como o Lekz Falo melhor que baxar um ot e ter o script dele aqui

Bem Mas PArido ...

Parabens :party: