GM

[7.6] Npc Que Vende Fluids !

Por Gm Dudu, 08 de nov. de 2006 em NPCs, monsters e raids

2
1.5k
Gm DuduG
08 de novembro de 2006 às 13:53

Maker: 100% Gm Dudu

Npc que vende Fluids !

Confira os Fluids Abaixo:

--Water

--Blood

--Beer

--Slime

--Lemonade

--Milk

--Oil

--Smile

--Urine

--Wine

--Mud

--Lava

--Swamp Water

 

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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then    selfSay('Hello ' .. creatureGetName(cid) .. '! vendo todos os fluids por 100 gps.')    focus = cid    talk_start = os.clock() 	 elseif msgcontains(msg, 'hi') 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, 'fluid') then 	 selfSay('Water, Blood, Beer, Slime, Lemonade, Milk, Oil, Smile, Urine, Wine, Mud, Lava, Swamp Water')  elseif msgcontains(msg, 'water') then 	 buy(cid,2006,1,100)  elseif msgcontains(msg, 'blood') then 	 buy(cid,2006,2,100)  elseif msgcontains(msg, 'beer') then 	 buy(cid,2006,3,100)  elseif msgcontains(msg, 'slime') then 	 buy(cid,2006,4,100)  elseif msgcontains(msg, 'lemonade') then 	 buy(cid,2006,5,100)  elseif msgcontains(msg, 'milk') then 	 buy(cid,2006,6,100)  elseif msgcontains(msg, 'oil') then 	 buy(cid,2006,11,100)  elseif msgcontains(msg, 'smile') then 	 buy(cid,2006,12,100)  elseif msgcontains(msg, 'urine') then 	 buy(cid,2006,13,100)  elseif msgcontains(msg, 'wine') then 	 buy(cid,2006,15,100)  elseif msgcontains(msg, 'mud') then 	 buy(cid,2006,19,100)  elseif msgcontains(msg, 'lava') then 	 buy(cid,2006,26,100)  elseif msgcontains(msg, 'swamp water') then 	 buy(cid,2006,28,100)  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 thenif focus > 0 thenselfSay('Next Please...')endfocus = 0endif focus ~= 0 thenif getDistanceToCreature(focus) > 5 thenselfSay('Good bye then.')focus = 0endendif focus == 0 thencx, cy, cz = selfGetPosition()randmove = math.random(1,20)if randmove == 1 thennx = cx + 1endif randmove == 2 thennx = cx - 1endif randmove == 3 thenny = cy + 1endif randmove == 4 thenny = cy - 1endif randmove >= 5 thennx = cxny = cyendmoveToPosition(nx, ny, cz)--summons = 30--summons2 = 30endend

 

espero ter ajudado

Atenciosamente, Dudu :bye:

6 meses depois...
skynagerloasS
25 de maio de 2007 às 14:16

Tópico contendo somente 1 NpC,

essa seção é para DataPacks com 3 ou mais Npcs,

~o{Tópico Movido}o~,

Abraços.