- Dołączył
- Kwiecień 16, 2009
- Posty
- 32
- Liczba reakcji
- 2
- Wiek
- 31
Siemka!-co? na wst?p ;p
Chcia?bym przedstawi? skrypt w 100% napisany przezemnie!
Jest to NPC kt?ry kupuje "no prawie wszystkie itemki z EQ, naprawde z ma?ymi wyj?tkami!"
-i odrazu m?wie ?e nie kupuje ring?w!
Oto i on:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Zegnaj.')
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, 'siema') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj ' .. creatureGetName(cid) .. '! Kupuje miecze, cluby, topory, helmy, buty, spodnie, tarcze, zbroje i amulety.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'siema') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Poczekaj minutke.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'royal helmet') then
sell(cid,2498,1,20000)
elseif msgcontains(msg, 'warrior helmet') then
sell(cid,2475,1,3000)
elseif msgcontains(msg, 'crusader helmet') then
sell(cid,2497,1,3000)
elseif msgcontains(msg, 'crown helmet') then
sell(cid,2491,1,2000)
elseif msgcontains(msg, 'devil helmet') then
sell(cid,2462,1,2000)
elseif msgcontains(msg, 'mystic turban') then
sell(cid,2663,1,500)
elseif msgcontains(msg, 'chain helmet') then
sell(cid,2458,1,35)
elseif msgcontains(msg, 'iron helmet') then
sell(cid,2459,1,30)
elseif msgcontains(msg, 'steel helmet') then
sell(cid,2457,1,2000)
elseif msgcontains(msg, 'brass helmet') then
sell(cid,2460,1,30)
elseif msgcontains(msg, 'leather helmet') then
sell(cid,2461,1,10)
elseif msgcontains(msg, 'golden helmet') then
sell(cid,2471,1,50000)
elseif msgcontains(msg, 'viking helmet') then
sell(cid,2473,1,50)
elseif msgcontains(msg, 'winged helmet') then
sell(cid,2474,1,25000)
elseif msgcontains(msg, 'strange helmet') then
sell(cid,2479,1,2000)
elseif msgcontains(msg, 'legion helmet') then
sell(cid,2480,1,50)
elseif msgcontains(msg, 'solider helmet') then
sell(cid,2481,1,1500)
elseif msgcontains(msg, 'studded helmet') then
sell(cid,2482,1,25)
elseif msgcontains(msg, 'dark helmet') then
sell(cid,2490,1,2500)
elseif msgcontains(msg, 'demon helmet') then
sell(cid,2493,1,35000)
elseif msgcontains(msg, 'horned helmet') then
sell(cid,2496,1,40000)
elseif msgcontains(msg, 'lady helmet') then
sell(cid,2499,1,2500)
elseif msgcontains(msg, 'dwarven helmet') then
sell(cid,2502,1,2500)
elseif msgcontains(msg, 'dragon scale') then
sell(cid,2506,1,30000)
elseif msgcontains(msg, 'helmy') then
selfSay('Kupuje royal (20k),warrior (3k),crusader (3k),crown (2k),devil (2k),chain (35gp),iron (30gp),mystic turban (500gp),steel (2k),brass (30gp),leather (10gp),golden (50k),viking (50gp),winged (25k),strange (2k),legion (50gp),solider (1,5k),studded (25gp),dark (2,5k),demon (35k),horned (40k),lady (2,5k),dwarven (2,5k) i dragon scale helmet (30k).')
elseif msgcontains(msg, 'steel boots') and focus == cid then
sell(cid,2645,1,20000)
elseif msgcontains(msg, 'boh') or msgcontains(msg, 'boots of haste') and focus == cid then
sell(cid,2195,1,4000)
elseif msgcontains(msg, 'traper boots') and focus == cid then
sell(cid,2641,1,2000)
elseif msgcontains(msg, 'sandals') and focus == cid then
sell(cid,2642,1,100)
elseif msgcontains(msg, 'leather boots') and focus == cid then
sell(cid,2643,1,25)
elseif msgcontains(msg, 'bunny slippers') and focus == cid then
sell(cid,2644,1,50)
elseif msgcontains(msg, 'golden boots') and focus == cid then
sell(cid,2646,1,30000)
elseif msgcontains(msg, 'crocodile boots') and focus == cid then
sell(cid,3982,1,1000)
elseif msgcontains(msg, 'buty') then
selfSay('Wyprzedaz butow z serii GoodBoot!Kupuje steel boots (20k),boots of haste (4k),traper boots (2k),sandals (100gp),leather boots (25gp),bunny slippers (50gp),golden (30k) i crocodile boots (1k).')
elseif msgcontains(msg, 'magic plate armor') or msgcontains(msg, 'mpa') then
sell(cid,2472,1,100000)
elseif msgcontains(msg, 'dragon scale mail') or msgcontains(msg, 'dsm') then
sell(cid,2492,1,30000)
elseif msgcontains(msg, 'golden armor') then
sell(cid,2466,1,10000)
elseif msgcontains(msg, 'crown armor') then
sell(cid,2487,1,5000)
elseif msgcontains(msg, 'knight armor') then
sell(cid,2476,1,3000)
elseif msgcontains(msg, 'blue robe') then
sell(cid,2656,1,3000)
elseif msgcontains(msg, 'lady armor') then
sell(cid,2500,1,1000)
elseif msgcontains(msg, 'plate armor') then
sell(cid,2463,1,300)
elseif msgcontains(msg, 'brass armor') then
sell(cid,2465,1,200)
elseif msgcontains(msg, 'chain armor') then
sell(cid,2464,1,100)
elseif msgcontains(msg, 'leather armor') then
sell(cid,2467,1,25)
elseif msgcontains(msg, 'scale armor') then
sell(cid,2483,1,150)
elseif msgcontains(msg, 'studded armor') then
sell(cid,2484,1,50)
elseif msgcontains(msg, 'doublet') then
sell(cid,2485,1,15)
elseif msgcontains(msg, 'noble armor') then
sell(cid,2486,1,400)
elseif msgcontains(msg, 'dark armor') then
sell(cid,2489,1,250)
elseif msgcontains(msg, 'demon armor') then
sell(cid,2494,1,35000)
elseif msgcontains(msg, 'dwarven armor') then
sell(cid,2503,1,350)
elseif msgcontains(msg, 'elven armor') then
sell(cid,2505,1,75000)
elseif msgcontains(msg, 'jacket') then
sell(cid,2650,1,10)
elseif msgcontains(msg, 'coat') then
sell(cid,2651,1,15)
elseif msgcontains(msg, 'green tunic') then
sell(cid,2652,1,15)
elseif msgcontains(msg, 'red tunic') then
sell(cid,2653,1,15)
elseif msgcontains(msg, 'cape') then
sell(cid,2654,1,20)
elseif msgcontains(msg, 'red robe') then
sell(cid,2655,1,25)
elseif msgcontains(msg, 'simple dress') then
sell(cid,2657,1,15)
elseif msgcontains(msg, 'dress') then
sell(cid,2658,1,15)
elseif msgcontains(msg, 'ball gown') then
sell(cid,2659,1,20)
elseif msgcontains(msg, 'hidden turban') then
sell(cid,2660,1,25)
elseif msgcontains(msg, 'leopard armor') then
sell(cid,3968,1,250)
elseif msgcontains(msg, 'zbroje') then
selfSay('Kupuje golden (10k),crown (5k),knight (3k),lady (1k),plate (300gp),brass (200gp),chain (100gp),mpa (100k), dsm (30k),blue robe (3k),leather (25gp),scale (150gp),studded (50gp),doublet (15gp),noble (400gp),dark (250gp),demon (35k),dwarven (350gp),elven (75k),jacket (10gp),coat (15gp),green tunic (15gp),red tunic (15gp),cape (20gp),red robe (25gp),simple dress (15gp),dress (15gp),ball gown (20gp),hidden turban (25gp) i leopard armor (250gp).')
elseif msgcontains(msg, 'golden legs') then
sell(cid,2470,1,80000)
elseif msgcontains(msg, 'crown legs') then
sell(cid,2488,1,5000)
elseif msgcontains(msg, 'knight legs') then
sell(cid,2477,1,3000)
elseif msgcontains(msg, 'plate legs') then
sell(cid,2647,1,500)
elseif msgcontains(msg, 'brass legs') then
sell(cid,2478,1,100)
elseif msgcontains(msg, 'chain legs') then
sell(cid,2478,1,50)
elseif msgcontains(msg, 'studded legs') then
sell(cid,2468,1,25)
elseif msgcontains(msg, 'dsl') then
sell(cid,2469,1,20000)
elseif msgcontains(msg, 'demon legs') then
sell(cid,2495,1,15000)
elseif msgcontains(msg, 'dwarven legs') then
sell(cid,2504,1,550)
elseif msgcontains(msg, 'elven legs') then
sell(cid,2507,1,55000)
elseif msgcontains(msg, 'leather legs') then
sell(cid,2649,1,15)
elseif msgcontains(msg, 'spodnie') then
selfSay('Kupuje golden (80k),crown (5k),knight (3k),plate (500gp),brass (100gp),chain (50gp),studded (25gp),dsl (20k),demon (15k),dwarven (550gp),elven (55k) i leather legs (15gp).')
CI?G DALSZY NAST?PI...
Chcia?bym przedstawi? skrypt w 100% napisany przezemnie!
Jest to NPC kt?ry kupuje "no prawie wszystkie itemki z EQ, naprawde z ma?ymi wyj?tkami!"
-i odrazu m?wie ?e nie kupuje ring?w!Oto i on:
focus = 0
talk_start = 0
target = 0
following = false
attacking = false
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
if focus == cid then
selfSay('Zegnaj.')
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, 'siema') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj ' .. creatureGetName(cid) .. '! Kupuje miecze, cluby, topory, helmy, buty, spodnie, tarcze, zbroje i amulety.')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'siema') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! Poczekaj minutke.')
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'royal helmet') then
sell(cid,2498,1,20000)
elseif msgcontains(msg, 'warrior helmet') then
sell(cid,2475,1,3000)
elseif msgcontains(msg, 'crusader helmet') then
sell(cid,2497,1,3000)
elseif msgcontains(msg, 'crown helmet') then
sell(cid,2491,1,2000)
elseif msgcontains(msg, 'devil helmet') then
sell(cid,2462,1,2000)
elseif msgcontains(msg, 'mystic turban') then
sell(cid,2663,1,500)
elseif msgcontains(msg, 'chain helmet') then
sell(cid,2458,1,35)
elseif msgcontains(msg, 'iron helmet') then
sell(cid,2459,1,30)
elseif msgcontains(msg, 'steel helmet') then
sell(cid,2457,1,2000)
elseif msgcontains(msg, 'brass helmet') then
sell(cid,2460,1,30)
elseif msgcontains(msg, 'leather helmet') then
sell(cid,2461,1,10)
elseif msgcontains(msg, 'golden helmet') then
sell(cid,2471,1,50000)
elseif msgcontains(msg, 'viking helmet') then
sell(cid,2473,1,50)
elseif msgcontains(msg, 'winged helmet') then
sell(cid,2474,1,25000)
elseif msgcontains(msg, 'strange helmet') then
sell(cid,2479,1,2000)
elseif msgcontains(msg, 'legion helmet') then
sell(cid,2480,1,50)
elseif msgcontains(msg, 'solider helmet') then
sell(cid,2481,1,1500)
elseif msgcontains(msg, 'studded helmet') then
sell(cid,2482,1,25)
elseif msgcontains(msg, 'dark helmet') then
sell(cid,2490,1,2500)
elseif msgcontains(msg, 'demon helmet') then
sell(cid,2493,1,35000)
elseif msgcontains(msg, 'horned helmet') then
sell(cid,2496,1,40000)
elseif msgcontains(msg, 'lady helmet') then
sell(cid,2499,1,2500)
elseif msgcontains(msg, 'dwarven helmet') then
sell(cid,2502,1,2500)
elseif msgcontains(msg, 'dragon scale') then
sell(cid,2506,1,30000)
elseif msgcontains(msg, 'helmy') then
selfSay('Kupuje royal (20k),warrior (3k),crusader (3k),crown (2k),devil (2k),chain (35gp),iron (30gp),mystic turban (500gp),steel (2k),brass (30gp),leather (10gp),golden (50k),viking (50gp),winged (25k),strange (2k),legion (50gp),solider (1,5k),studded (25gp),dark (2,5k),demon (35k),horned (40k),lady (2,5k),dwarven (2,5k) i dragon scale helmet (30k).')
elseif msgcontains(msg, 'steel boots') and focus == cid then
sell(cid,2645,1,20000)
elseif msgcontains(msg, 'boh') or msgcontains(msg, 'boots of haste') and focus == cid then
sell(cid,2195,1,4000)
elseif msgcontains(msg, 'traper boots') and focus == cid then
sell(cid,2641,1,2000)
elseif msgcontains(msg, 'sandals') and focus == cid then
sell(cid,2642,1,100)
elseif msgcontains(msg, 'leather boots') and focus == cid then
sell(cid,2643,1,25)
elseif msgcontains(msg, 'bunny slippers') and focus == cid then
sell(cid,2644,1,50)
elseif msgcontains(msg, 'golden boots') and focus == cid then
sell(cid,2646,1,30000)
elseif msgcontains(msg, 'crocodile boots') and focus == cid then
sell(cid,3982,1,1000)
elseif msgcontains(msg, 'buty') then
selfSay('Wyprzedaz butow z serii GoodBoot!Kupuje steel boots (20k),boots of haste (4k),traper boots (2k),sandals (100gp),leather boots (25gp),bunny slippers (50gp),golden (30k) i crocodile boots (1k).')
elseif msgcontains(msg, 'magic plate armor') or msgcontains(msg, 'mpa') then
sell(cid,2472,1,100000)
elseif msgcontains(msg, 'dragon scale mail') or msgcontains(msg, 'dsm') then
sell(cid,2492,1,30000)
elseif msgcontains(msg, 'golden armor') then
sell(cid,2466,1,10000)
elseif msgcontains(msg, 'crown armor') then
sell(cid,2487,1,5000)
elseif msgcontains(msg, 'knight armor') then
sell(cid,2476,1,3000)
elseif msgcontains(msg, 'blue robe') then
sell(cid,2656,1,3000)
elseif msgcontains(msg, 'lady armor') then
sell(cid,2500,1,1000)
elseif msgcontains(msg, 'plate armor') then
sell(cid,2463,1,300)
elseif msgcontains(msg, 'brass armor') then
sell(cid,2465,1,200)
elseif msgcontains(msg, 'chain armor') then
sell(cid,2464,1,100)
elseif msgcontains(msg, 'leather armor') then
sell(cid,2467,1,25)
elseif msgcontains(msg, 'scale armor') then
sell(cid,2483,1,150)
elseif msgcontains(msg, 'studded armor') then
sell(cid,2484,1,50)
elseif msgcontains(msg, 'doublet') then
sell(cid,2485,1,15)
elseif msgcontains(msg, 'noble armor') then
sell(cid,2486,1,400)
elseif msgcontains(msg, 'dark armor') then
sell(cid,2489,1,250)
elseif msgcontains(msg, 'demon armor') then
sell(cid,2494,1,35000)
elseif msgcontains(msg, 'dwarven armor') then
sell(cid,2503,1,350)
elseif msgcontains(msg, 'elven armor') then
sell(cid,2505,1,75000)
elseif msgcontains(msg, 'jacket') then
sell(cid,2650,1,10)
elseif msgcontains(msg, 'coat') then
sell(cid,2651,1,15)
elseif msgcontains(msg, 'green tunic') then
sell(cid,2652,1,15)
elseif msgcontains(msg, 'red tunic') then
sell(cid,2653,1,15)
elseif msgcontains(msg, 'cape') then
sell(cid,2654,1,20)
elseif msgcontains(msg, 'red robe') then
sell(cid,2655,1,25)
elseif msgcontains(msg, 'simple dress') then
sell(cid,2657,1,15)
elseif msgcontains(msg, 'dress') then
sell(cid,2658,1,15)
elseif msgcontains(msg, 'ball gown') then
sell(cid,2659,1,20)
elseif msgcontains(msg, 'hidden turban') then
sell(cid,2660,1,25)
elseif msgcontains(msg, 'leopard armor') then
sell(cid,3968,1,250)
elseif msgcontains(msg, 'zbroje') then
selfSay('Kupuje golden (10k),crown (5k),knight (3k),lady (1k),plate (300gp),brass (200gp),chain (100gp),mpa (100k), dsm (30k),blue robe (3k),leather (25gp),scale (150gp),studded (50gp),doublet (15gp),noble (400gp),dark (250gp),demon (35k),dwarven (350gp),elven (75k),jacket (10gp),coat (15gp),green tunic (15gp),red tunic (15gp),cape (20gp),red robe (25gp),simple dress (15gp),dress (15gp),ball gown (20gp),hidden turban (25gp) i leopard armor (250gp).')
elseif msgcontains(msg, 'golden legs') then
sell(cid,2470,1,80000)
elseif msgcontains(msg, 'crown legs') then
sell(cid,2488,1,5000)
elseif msgcontains(msg, 'knight legs') then
sell(cid,2477,1,3000)
elseif msgcontains(msg, 'plate legs') then
sell(cid,2647,1,500)
elseif msgcontains(msg, 'brass legs') then
sell(cid,2478,1,100)
elseif msgcontains(msg, 'chain legs') then
sell(cid,2478,1,50)
elseif msgcontains(msg, 'studded legs') then
sell(cid,2468,1,25)
elseif msgcontains(msg, 'dsl') then
sell(cid,2469,1,20000)
elseif msgcontains(msg, 'demon legs') then
sell(cid,2495,1,15000)
elseif msgcontains(msg, 'dwarven legs') then
sell(cid,2504,1,550)
elseif msgcontains(msg, 'elven legs') then
sell(cid,2507,1,55000)
elseif msgcontains(msg, 'leather legs') then
sell(cid,2649,1,15)
elseif msgcontains(msg, 'spodnie') then
selfSay('Kupuje golden (80k),crown (5k),knight (3k),plate (500gp),brass (100gp),chain (50gp),studded (25gp),dsl (20k),demon (15k),dwarven (550gp),elven (55k) i leather legs (15gp).')
CI?G DALSZY NAST?PI...
