Piabeta Kun 359 Postado Janeiro 9, 2010 Share Postado Janeiro 9, 2010 Bem qu qro q me ajudem com um scripet de npc q se xama Elezar ele vende itens por scarab coins, ou seja se ele vende uma golden armor o player tera q ter o valor da armadura em scarab coins! se alguem poder me ajudar agradeço, pode por qualquer iten na loja depois eu edito, so noa sei por o npc pra cobrar scarab coin ao invez de gold e etc.. vlw aew! Link para o comentário Compartilhar em outros sites More sharing options...
IrapuanPuan 3 Postado Janeiro 9, 2010 Share Postado Janeiro 9, 2010 Quais os itens que você quer? Link para o comentário Compartilhar em outros sites More sharing options...
Killua 389 Postado Janeiro 11, 2010 Share Postado Janeiro 11, 2010 (editado) Bem, você disse que só não sabe colocar scarab coin no lugar do gold, então tá aqui: elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'mensagem') or msgcontains(msg, 'mensagem 2') then if doPlayerRemoveItem(cid,id do scarab coin,quantidade de scarab coin) == 0 then selfSay('') addon_state = 0 else selfSay('MSG se a compra for egetuada com sucesso') doPlayerAddItem(cid, id do item q o player add, quantidade do item que o player add) talk_start = 0 end Espero ter ajudado! Se gostou, use minha fan bar! E se eu resolvi seu problema, reporte o tópico para um moderador poder fechar! Editado Janeiro 11, 2010 por amoeba13 Link para o comentário Compartilhar em outros sites More sharing options...
Grilodauh1 0 Postado Janeiro 14, 2010 Share Postado Janeiro 14, 2010 Veio ajuda eu ai... no meu server eu n achei essas linhas ai que vc falo ... aki ele ta assim por exemplo vo por o mad <?xml version="1.0" encoding="UTF-8"?> <npc name="Mad" script="data/npc/scripts/loot.lua" walkinterval="2000" floorchange="0"> <health now="150" max="150"/> <look type="129" head="75" body="115" legs="125" feet="85" addons="3"/> <parameters> <parameter key="module_shop" value="1"/> <parameter key="message_greet" value="Hello |PLAYERNAME|. I buy swords, clubs, axes, helmets, boots, legs, shields and armors."/> <parameter key="shop_sellable" value="skull helmet,5741,35000;dreaded cleaver,7419,30000;dragonslayer,7402,20000;royal helmet,2498,40000;warrior helmet,2475,6000;crusader helmet,2497,9000;crown helmet,2491,5000;devil helmet,2462,4000;mystic turban,2663,500;chain helmet,2458,35;iron helmet,2459,30;steel boots,2645,40000;boots of haste,2195,40000;golden boots,2646,200000;magic plate armor,2472,200000;dragon scale mail,2492,60000;demon armor,2494,90000;golden armor,2466,30000;crown armor,2487,20000;knight armor,2476,5000;blue robe,2656,15000;lady armor,2500,2500;plate armor,2463,400;brass armor,2465,200;chain armor,2464,100;golden legs,2470,80000;crown legs,2488,15000;knight legs,2477,6000;plate legs,2647,500;mastermind shield,2514,150000;demon shield,2520,40000;blessed shield,2523,150000;great shield,2522,100000;vampire shield,2534,25000;medusa shield,2536,8000;amazon shield,2537,4000;crown shield,2519,5000;tower shield,2528,4000;guardian shield,2515,200;beholder shield,2518,1500;dwarven shield,2525,100;magic longsword,2390,150000;warlord sword,2408,100000;magic sword,2400,120000;giant sword,2393,10000;bright sword,2407,6000;ice rapier,2396,4000;fire sword,2392,3000;serpent sword,2409,1500;spike sword,2383,800;two handed sword,2377,400;broad sword,2413,70;short sword,2406,30;sword,2376,25;dragon lance,2414,10000;stonecutter axe,2431,90000;guardian halberd,2427,7500;fire axe,2432,10000;knight axe,2430,2000;double axe,2387,200;halberd,2381,200;paladin armor,8891,30000;skullcracker armor,8889,60000;battle axe,2378,100;hatchet,2388,20;war hammer,2391,6000;thunder hammer,2421,90000;skull staff,2436,1000;dragon hammer,2434,2000;clerical mace,2423,200;battle hammer,2417,60;mace,2398,30;"/> <parameter key="shop_buyable" value="helmet of the deep,5461,10000;blue legs,7730,20000"/> </parameters> </npc> e o script local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal (40k), warrior (6k), crusader (9k), crown (5k), devil (4k), chain (35gp) and iron helmets (30gp), also mystic turbans (500gp).'}) keywordHandler:addKeyword({'boots'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden boots (100k), steel boots (40k) and boots of haste (40k).'}) keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (30k), crown (20k), knight (5k), lady (7,5k), plate (400gp), brass (200gp) and chain armors (100gp), also mpa (100k), dsm (60k) and blue robes (15k).'}) keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (80k), crown (15k), knight (6k), plate (500gp) and brass legs (100gp).'}) keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy blessed (150k), great (100k), demon (40k), vampire (25k), medusa (8k), amazon (4k), crown (5k), tower (4k), dragon (3k), guardian (2k), beholder (1k), and dwarven shields (100gp), also mms (80k).'}) keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant (10k), bright (6k), fire (3k) serpent (1.5k), spike (800gp) and two handed swords (400gp), also ice rapiers (4k), magic longswords (150k), magic swords (90k), warlord swords (100k) broad swords (70gp), short swords (30gp), sabres (25gp) and swords (25gp).'}) keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy fire (10k), guardian halberds (7,5k) knight (2k), double (200gp) and battle axes (100gp), also dragon lances (10k), stonecutters axes (90k), halberds (200gp) and hatchets (20gp).'}) keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy thunder hammers (90k), war (6k), dragon (2k) and battle hammers (60gp), also skull staffs (10k) and clerical maces (200gp).'}) npcHandler:addModule(FocusModule:new()) Link para o comentário Compartilhar em outros sites More sharing options...
Piabeta Kun 359 Postado Janeiro 17, 2010 Autor Share Postado Janeiro 17, 2010 amoeba nao sei se vc intendeu meu pedido, pois o script q vc postou e para ots xml, eu qro um pra tfs q o cara da tarde no npc a eparece a loja igual um npc comum so q ao invez de cobrar gold coins ele cobraria scarab coins! no memo modelo do nosso amigo ali "hackeado" se alguem poder ajudar eu agradeço, nao precidar por os itens q eu qro so criar ums script modelo q eu add os itens da loja dpois. vlw aeww!! Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados