CO

Promotion!

Por CorpsCool, 26 de out. de 2005 em Actions e Talkactions

otserv
tibia
script
34
8k
CorpsCoolC
26 de outubro de 2005 às 10:03

Vo posta um npc que vende Promoção exemplo quando o cara da look em alguem aparece druid ele vende a promoção dai vai aparece Elder Druid. O primeiro que fala mal eu numca mais apareço no forum xtibia to nervozo cum esses noob da dsigraça que fika falando ##### so pq naum sabe

Ai vai o Script pro npc:

 

focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos)  if focus == cid then         selfSay('Good bye then.')         focus = 0         talk_start = 0  endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str)  return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg)  msg = string.lower(msg)  if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 4 then  selfSay('Hello ' .. creatureGetName(cid) .. '! I sell promotions for 20k.')  focus = cid  talk_start = os.clock()	elseif string.find(msg, '(%a*)hi(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then  	selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.')  elseif focus == cid then  talk_start = os.clock()  if msgcontains(msg, 'promotion') then  	if isPromoted(cid) then    selfSay('Sorry, you are already promoted.')    focus = 0  	else    if getPlayerLevel(creatureGetName(cid)) >= 20 then    	if pay(cid,20000) then      promote(cid)      selfSay('You are now promoted!')    	else      selfSay('Sorry, you do not have enough money.')    	end    else    	selfSay('Sorry, you need level 20 to buy promotion.')    end  	end  	elseif string.find(msg, '(%a*)bye(%a*)')  and getDistanceToCreature(cid) < 4 then    selfSay('Good bye, ' .. creatureGetName(cid) .. '!')    focus = 0    talk_start = 0  	end  endendfunction onCreatureChangeOutfit(creature)endfunction onThink()  if (os.clock() - talk_start) > 30 then  	if focus > 0 then    selfSay('Next Please...')  	end    focus = 0  end	if focus ~= 0 then  if getDistanceToCreature(focus) > 5 then  	selfSay('Good bye then.')  	focus = 0  end	endend

 

é isso ai

Editado Outubro 27 por CorpsCool

SerS
26 de outubro de 2005 às 13:32

ele vende magias somenta pra p.a? ql server tem esse sistema de p.a? se der certo mesmo ta de parabens..

ah outra coisa.. ql server é oq vc usa? se for o Yours + darkonia posta ae.. pq o q eu achei da erro e n abre..

Editado Outubro 26 por Ser

CorpsCoolC
26 de outubro de 2005 às 14:31

Naum vende magia ele vende p.a 20k tipo faz um serve cum acc para ser free dai faz esse npc e pode em algum luga e ele ira vende p.a por 20k hi promotion yes

cherifeC
26 de outubro de 2005 às 21:25

HUHUHU ke tzao sempre kis isso vlw ai parabens!!!!!

mas tipo como faso pros free acc n pod compra certas magias ou coisas n poder ir pra outras ilhas n almenta a vida e a mana rapido???

Editado Outubro 26 por cherife

x9killX
26 de outubro de 2005 às 21:27

very very rox

sempre tem gente no msn me pedindo um npc assim , agora ja tenhu um link .

vlw corpscool xd

WatsorW
26 de outubro de 2005 às 21:58

Npc bem rox

Vlw

Flw

CorpsCoolC
26 de outubro de 2005 às 22:47

De nada fazer oque é a vida

lelozoinL
27 de outubro de 2005 às 15:24

intendi nada =X

ManchimM
27 de outubro de 2005 às 15:31

Muitoo bom corpscol..

vlw ae

flws

SerS
28 de outubro de 2005 às 13:03

Ops kra errei.. n é magia n, é promotion (ek, ed, ms, rp).. ele so vende promotion pros premmy acc (p.a) ou pra tds do server? e ql server vc usa com o sistema de p.a?

SerS
28 de outubro de 2005 às 13:05

esse scrpt é de vende p.a ou promotion?

CorpsCoolC
29 de outubro de 2005 às 13:20

É eu iscrevi errado mais irei tentar fazer pra p.a dai e posto ai

daniboy11D
29 de outubro de 2005 às 22:23

kra, valeu msm, assim u server fika mais real!

Shinoi LeeS
30 de outubro de 2005 às 16:45

vlw Corps, sempre ajudano, akele house editor mto rox, e agora esse npc ae, vlw mesmo manu :)

CorpsCoolC
30 de outubro de 2005 às 23:21

hehe de nada to tentando arruma em algum luga ou fazer um npc que venda p.a mais ta F*D* mais eu vo posta ainda