Postado Outubro 16, 2015 9 anos Hola galera do TK estou aqui novamente pedindo a ajuda de vocês!!Os npc's Rashid e os Djins estão pedindo quest's para poder negociar com eles!Rashid <?xml version="1.0" encoding="UTF-8"?><npc name="Rashid" script="data/npc/scripts/Rashid.lua" walkinterval="3000" floorchange="0"> <look type="146" head="119" body="118" legs="119" feet="132" addons="3" /> <parameters> <parameter key="message_greet" value="Ah, a customer! Be greeted, |PLAYERNAME|!" /> <parameter key="message_sendtrade" value="Take all the time you need to decide what you want!" /> <parameter key="message_needmoremoney" value="You dont have not enough of gold." /> <parameter key="message_decline" value="|TOTALCOST| is a very good price |PLAYERNAME|." /> <parameter key="message_farewell" value="Farewell, |PLAYERNAME|, may the winds guide your way." /> <parameter key="message_walkaway" value="Come back soon!" /> <parameter key="message_idletimeout" value="Good bye, |PLAYERNAME|!" /> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;name;offers;ab\'dendriel;desert;karmia;cormaya;darashia;premy island;bibula;greenshore;moria;blood bay;northport;port hope;senja;svargrond;thalia;vega;venore;time;king" /> <parameter key="keyword_reply1" value="I am a travelling trader. I don't buy everything, though. And not from everyone, for that matter." /> <parameter key="keyword_reply2" value="I am Rashid, son of the desert." /> <parameter key="keyword_reply3" value="Of course, old friend. You can also browse only armor, legs, shields, helmets, boots, weapons, enchanted weapons, jewelry or miscellaneous stuff." /> <parameter key="keyword_reply4" value="Elves... I don't really trust them. All this talk about nature and flowers and treehugging... I'm sure there's some wicked scheme behind all this." /> <parameter key="keyword_reply5" value="My beloved hometown! Ah, the sweet scent of the desert sands, the perfect shape of the pyramids... stunningly beautiful." /> <parameter key="keyword_reply6" value="I have to go to Karmia once in a while, since the queen wishes to see my exclusive wares in regular intervals." /> <parameter key="keyword_reply7" value="Cormaya? Not a good place to make business, it's way too far and small." /> <parameter key="keyword_reply8" value="It's not the real thing, but almost as good. The merchants there claim ridiculous prices, which is fine for my own business." /> <parameter key="keyword_reply9" value="Ah yes, Premy Island! Such a lovely and quiet island! I usually make some nice business there." /> <parameter key="keyword_reply10" value="Too few customers there, it's not worth the trip." /> <parameter key="keyword_reply11" value="Um... I don't think so." /> <parameter key="keyword_reply12" value="I don't like being underground much. I also tend to get lost in these labyrinthine dwarven tunnels, so I rather avoid them." /> <parameter key="keyword_reply13" value="When you avoid the slums, it's a really pretty city. Almost as pretty as the governor's daughter." /> <parameter key="keyword_reply14" value="Um... I don't think so." /> <parameter key="keyword_reply15" value="I like the settlement itself, but I don't set my foot into the jungle. Have you seen the size of these centipedes??" /> <parameter key="keyword_reply16" value="Um... I don't think so." /> <parameter key="keyword_reply17" value="I wish it was a little bit warmer there, but with a good mug of barbarian mead in your tummy everything gets a lot cosier." /> <parameter key="keyword_reply18" value="I feel uncomfortable and rather unsafe in Thalia, so I don't really travel there." /> <parameter key="keyword_reply19" value="Um... I don't think so." /> <parameter key="keyword_reply20" value="Although it's the flourishing trade centre of Tibia, I don't like going there. Too much competition for my taste." /> <parameter key="keyword_reply21" value="It's almost time to journey on." /> <parameter key="keyword_reply22" value="Kings, queens, emperors and kaliphs... everyone claims to be different and unique, but actually it's the same thing everywhere." /> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="" /> <parameter key="shop_sellable" value=" abyss hammer, 7414, 20000; amber staff, 7426, 8000; ancient amulet, 2142, 200; assassin daggerf, 7404, 20000; bandana, 5917, 150; beastslayer axe, 3962, 1500; berserker, 7403, 40000; bone shield, 2541, 80; bonelord helmet, 3972, 7500; brutetamer's staff, 7379, 1500; castle shield, 2535, 5000; chain bolter, 8850, 40000; chaos mace, 7427, 9000; coconut shoes, 9931, 500; composite hornbow, 8855, 25000; cranial basher, 7415, 30000; crocodile boots, 3982, 1000; crystal mace, 2445, 12000; crystal necklace, 2125, 400; crystal ring, 2124, 250; crystal sword, 7449, 600; crystalline armor, 8878, 16000; daramanian mace, 2439, 110; daramanian waraxe, 2440, 1000; dark shield, 2521, 400; death ring, 6300, 1000; demon shield, 2520, 30000; demonbone amulet, 2136, 32000; demonrage sword, 7382, 36000; devil helmet, 2462, 1000; diamond sceptre, 7387, 3000; djinn blade, 2451, 15000; doll, 2110, 200; dragon scale mail, 2492, 40000; dragon slayer, 7402, 15000; dragonbone staff, 7430, 3000; dreaded cleaver, 7419, 10000; dwarven armor, 2503, 30000; earth cranial basher, 7866, 30000; earth dragon slayer, 7858, 15000; earth heroic axe, 7861, 30000; earth mystic blade, 7856, 30000; earth relic sword, 7855, 25000; earth war axe, 7863, 12000; emerald bangle, 2127, 800; energy cranial basher, 7881, 30000; energy dragon slayer, 7873, 15000; energy heroic axe, 7876, 30000; energy mystic blade, 7871, 30000; energy relic sword, 7870, 25000; energy war axe, 7878, 12000; epee, 2438, 8000; fiery cranial basher, 7756, 30000; fiery dragon slayer, 7748, 15000; fiery heroic axe, 7751, 30000; fiery mystic blade, 7746, 30000; fiery relic sword, 7745, 25000; fiery war axe, 7753, 12000; flower wreath, 9927, 500; fur boots, 7457, 2000; furry club, 7432, 1000; glacier amulet, 7888, 1500; glacier kilt, 7896, 11000; glacier mask, 7902, 2500; glacier robe, 7897, 11000; glacier shoes, 7892, 2500; gold ring, 2179, 8000; golden armor, 2466, 20000; golden legs, 2470, 30000; guardian halberd, 2427, 11000; hammer of wrath, 2444, 30000; heavy mace, 2452, 50000; heavy machete, 2442, 90; heroic axe, 7389, 30000; hibiscus dress, 8873, 3000; icy cranial basher, 7775, 30000; icy dragon slayer, 7767, 15000; icy heroic axe, 7770, 30000; icy mystic blade, 7765, 30000; icy relic sword, 7764, 25000; icy war axe, 7772, 12000; jade hammer, 7422, 25000; krimhorn helmet, 7461, 200; lavos armor, 8877, 16000; leaf legs, 9928, 500; leopard armor, 3968, 1000; light shovel, 5710, 300; lightning boots, 7893, 2500; lightning headband, 7901, 2500; lightning legs, 7895, 11000; lightning pendant, 7889, 1500; lightning robe, 7898, 11000; lunar staff, 7424, 5000; magic plate armor, 2472, 90000; magma amulet, 7890, 1500; magma boots, 7891, 2500; magma coat, 7899, 11000; magma legs, 7894, 11000; magma monocle, 7900, 2500; mammoth fur cape, 7463, 6000; mammoth fur shorts, 7464, 850; mammoth whopper, 7381, 300; mastermind shield, 2514, 50000; medusa shield, 2536, 9000; mercenary sword, 7386, 12000; mystic blade, 7384 ,30000; naginata, 2426, 2000; nightmare blade, 7418, 35000; noble axe, 7456, 10000; norse shield, 7460, 1500; paladin armor, 8891, 15000; patched boots, 2641, 2000; pharaoh sword, 2446, 23000; pirate boots, 5462, 3000; pirate hat, 6096, 1000; pirate knee breeches, 5918, 200; pirate shirt, 6095, 500; pirate voodoo doll, 5810, 500; platinum amulet, 2171, 2500; ragnir helmet, 7462, 400; relic sword, 7383, 25000; ring of the sky, 2123, 30000; ruby necklace, 2133, 2000; ruthless axe, 6553, 45000; sacred tree amulet, 10219, 3000; sapphire hammer, 7437, 7000; scarab amulet, 2135, 200; scarab shield, 2540, 2000; shockwave amulet, 10221, 3000; silver brooch, 2134, 150; silver dagger, 2402, 500; skull helmet, 5741, 40000; skullcracker armor, 8889, 18000; spiked squelcher, 7452, 5000; steel boots, 2645, 30000; swamplair armor, 8880, 16000; taurus mace, 7425, 500; tempest shield, 2542, 35000; terra amulet, 7887, 1500; terra boots, 7886, 2500; terra hood, 7903, 2500; terra legs, 7885, 11000; terra mantle, 7884, 11000; tortoise shield, 6131, 150; vile axe, 7388, 30000; voodoo doll, 3955, 400; war axe, 2454, 12000; wyvern fang, 7408, 1500 " /> </parameters></npc> Rashid - script local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) local Topic = {}local storage = 100007 -- Storages:-- 1 = Joining Inquisition-- 2 = Start Mission 1-- 3 = Finish Mission 1-- 4 = Start Mission 2-- 5 = Finish Mission 2-- 6 = Start Mission 3 function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() end function greetCallback(cid) Topic[cid] = 0 return trueend function creatureSayCallback(cid, type, msg) local v = getPlayerStorageValue(cid, storage) if not npcHandler:isFocused(cid) then return false end if msgcontains(msg, 'no') and Topic[cid] >= 1 then npcHandler:say("Not then.",cid) Topic[cid] = 0 end if msgcontains(msg, 'mission') and getPlayerStorageValue(cid, storage) == -1 then npcHandler:say("Well, you could attempt the mission to become a recognised trader, but it requires a lot of travelling. Are you willing to try?", cid) Topic[cid] = 1 elseif Topic[cid] == 1 then if msgcontains(msg, 'yes') then npcHandler:say("Very good! I need talented people who are able to handle my wares with care, find good offers and the like, so I'm going to test you. ...",cid) npcHandler:say("First, I'd like to see if you can dig up rare wares. Something like a ... mastermind shield! ...",cid, 5500) npcHandler:say("Haha, just kidding, fooled you there, didn't I? Always control your nerves, that's quite important during bargaining. ...",cid, 11000) npcHandler:say("Okay, all I want from you is one of these rare deer trophies. I have a customer here in Svargrond who ordered one, so I'd like you to deliver it tome while I'm in Svargrond. ...",cid, 16000) npcHandler:say("Everything clear and understood?",cid, 20000) Topic[cid] = 2 end elseif Topic[cid] == 2 then if msgcontains(msg, 'yes') then npcHandler:say("Fine. Then get a hold of that deer trophy and bring it to me while I'm in Svargrond. Just ask me about your {mission}.",cid) setPlayerStorageValue(cid,storage, 1) setPlayerStorageValue(cid,100158, 1) setPlayerStorageValue(cid,100165, 1) Topic[cid] = 0 end elseif Topic[cid] == 4 then if msgcontains(msg, 'yes') then npcHandler:say("Alright, that's good to hear. From you as my trader and deliveryman, I expect more than finding rare items. ...",cid) npcHandler:say("You also need to be able to transport heavy wares, weaklings won't get far here. I have ordered a special package from Edron. ...",cid, 6000) npcHandler:say("Pick it up from Willard and bring it back to me while I'm in Liberty Bay. Everything clear and understood?",cid, 11000) Topic[cid] = 5 end elseif Topic[cid] == 5 then if msgcontains(msg, 'yes') then npcHandler:say("Fine. Then off you go, just ask Willard about the {package for Rashid}.",cid) setPlayerStorageValue(cid,storage, 3) setPlayerStorageValue(cid,100158, 3) Topic[cid] = 0 end elseif Topic[cid] == 7 then if msgcontains(msg, 'yes') then npcHandler:say("Well, that's good to hear. From you as my trader and deliveryman, I expect more than carrying heavy packages. ...",cid) npcHandler:say("You also need to be fast and deliver wares in time. I have ordered a very special cheese wheel made from Darashian milk. ...",cid, 6000) npcHandler:say("Unfortunately, the high temperature in the desert makes it rot really fast, so it must not stay in the sun for too long. ...",cid, 12000) npcHandler:say("I'm also afraid that you might not be able to use ships because of the smell of the cheese. ...",cid, 18000) npcHandler:say("Please get the cheese from Miraia and bring it to me while I'm in Port Hope. Everything clear and understood?",cid, 23000) Topic[cid] = 8 end elseif Topic[cid] == 8 then if msgcontains(msg, 'yes') then npcHandler:say("Okay, then please find Miraia in Darashia and ask her about the {scarab cheese}.",cid) setPlayerStorageValue(cid,storage, 5) setPlayerStorageValue(cid,100158, 7) Topic[cid] = 0 end elseif Topic[cid] == 10 then if msgcontains(msg, 'yes') then npcHandler:say("Well, that's good to hear. From you as my trader and deliveryman, I expect more than bringing stinky cheese. ...",cid) npcHandler:say("I wonder if you are able to deliver goods so fragile they almost break when looked at. ...",cid, 6000) npcHandler:say("I have ordered a special elven vase from Briasol in Ab'Dendriel. Get it from him and don't even touch it, just bring it to me while I'm in Ankrahmun. Everything clear and understood?",cid, 12000) Topic[cid] = 11 end elseif Topic[cid] == 11 then if msgcontains(msg, 'yes') then npcHandler:say("Okay, then please find Briasol in Ab'Dendriel and ask for a {fine vase}.",cid) setPlayerStorageValue(cid,storage, 7) setPlayerStorageValue(cid,100158, 10) Topic[cid] = 0 end elseif Topic[cid] == 13 then if msgcontains(msg, 'yes') then npcHandler:say("Fine! There's one more skill that I need to test and which is cruicial for a successful trader. ...",cid) npcHandler:say("Of course you must be able to haggle, else you won't survive long in this business. To make things as hard as possible for you, I have the perfect trade partner for you. ...",cid, 6000) npcHandler:say("Dwarves are said to be the most stubborn of all traders. Travel to Kazordoon and try to get the smith Uzgod to sell a crimson sword to you. ...",cid, 12000) npcHandler:say("Of course, it has to be cheap. Don't come back with anything more expensive than 400 gold. ...",cid, 18000) npcHandler:say("And the quality must not suffer, of course! Everything clear and understood?",cid, 23000) Topic[cid] = 14 end elseif Topic[cid] == 14 then if msgcontains(msg, 'yes') then npcHandler:say("Okay, I'm curious how you will do with Uzgod. Good luck!",cid) setPlayerStorageValue(cid,storage, 9) setPlayerStorageValue(cid,100158, 13) Topic[cid] = 0 end elseif Topic[cid] == 16 then if msgcontains(msg, 'yes') then npcHandler:say("My friend, it seems you have already learnt a lot about the art of trading. I think you are more than worthy to become a recognised trader. ...",cid) npcHandler:say("There is just one little favour that I would ask from you... something personal, actually, forgive my boldness. ...",cid, 6000) npcHandler:say("I have always dreamed to have a small pet, one that I could take with me and which wouldn't cause problems. ...",cid, 12000) npcHandler:say("Could you - just maybe - bring me a small goldfish in a bowl? I know that you would be able to get one, wouldn't you?",cid, 18000) Topic[cid] = 17 end elseif Topic[cid] == 17 then if msgcontains(msg, 'yes') then npcHandler:say("Thanks so much! I'll be waiting eagerly for your return then.",cid) setPlayerStorageValue(cid,storage, 11) setPlayerStorageValue(cid,100158, 16) Topic[cid] = 0 end Topic[cid] = 0 --//////////////////////////////////////////Missions/////////////////////////////////////////////-- elseif msgcontains(msg, 'mission') then local v = getPlayerStorageValue(cid, storage) if v == 1 then -- Start Mission 1 - The interrogation npcHandler:say("Have you managed to obtain a rare deer trophy for my customer?",cid) Topic[cid] = 3 elseif v == 2 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", cid) Topic[cid] = 4 elseif v == 3 then npcHandler:say("Did you bring me the package?",cid) Topic[cid] = 6 elseif v == 4 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", cid) Topic[cid] = 7 elseif v == 5 then npcHandler:say("Have you brought the cheese?",cid) Topic[cid] = 9 elseif v == 6 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", cid) Topic[cid] = 10 elseif v == 7 then npcHandler:say("Have you brought the vase?",cid) Topic[cid] = 12 elseif v == 8 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", cid) Topic[cid] = 13 elseif v == 9 then npcHandler:say("Have you brought a cheap but good crimson sword?",cid) Topic[cid] = 15 elseif v == 10 then npcHandler:say("So, my friend, are you willing to proceed to the next mission to become a recognised trader?", cid) Topic[cid] = 16 elseif v == 11 then npcHandler:say("Have you brought me a gold fish??",cid) Topic[cid] = 18 elseif v == 12 then npcHandler:say("Ah, right. <ahem> I hereby declare you - one of my recognised traders! Feel free to offer me your wares!", cid) setPlayerStorageValue(cid, storage, 13) setPlayerStorageValue(cid,100158, 18) setPlayerStorageValue(cid,100165, 8) AddStageExp(cid,50000) elseif v == 13 then npcHandler:say("I have no more missions left. Im happy to {trade} with you.", cid) setPlayerStorageValue(cid, storage, 13) end --////////////////////////////////Answers///////////////////////////////////////////////-- elseif Topic[cid] == 3 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') then if doPlayerTakeItem(cid, 7397, 1) then npcHandler:say("Well done! I'll take that from you. <snags it>. Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 2) setPlayerStorageValue(cid,100158, 2) setPlayerStorageValue(cid,100165, 2) else npcHandler:say("Come back when you the deer trophy.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end elseif Topic[cid] == 6 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, 100008) >= 2 then if doPlayerRemoveItem(cid, 7503, 1) then npcHandler:say("Great. Just place it over there - yes, thanks, that's it. Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 4) setPlayerStorageValue(cid, 100008, 4) setPlayerStorageValue(cid,100158, 6) setPlayerStorageValue(cid,100165, 3) else npcHandler:say("Come back when you have the package.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end elseif Topic[cid] == 9 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 8368, 1) then npcHandler:say("Mmmhh, the lovely odeur of scarab cheese! I really can't understand why most people can't stand it. Thanks, well done! Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 6) setPlayerStorageValue(cid,100158, 9) setPlayerStorageValue(cid,100165, 4) else npcHandler:say("Come back when you have the cheese.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end elseif Topic[cid] == 12 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 7582, 1) then npcHandler:say("I'm surprised that you managed to bring this vase without a single crack. That was what I needed to know, thank you. Thanks, well done! Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 8) setPlayerStorageValue(cid, 100009, 1) setPlayerStorageValue(cid,100158, 12) setPlayerStorageValue(cid,100165, 5) else npcHandler:say("Come back when you have the vase.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end elseif Topic[cid] == 15 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, 100010) == 1 then if doPlayerRemoveItem(cid, 8209, 1) then npcHandler:say("Ha! You are clever indeed, well done! I'll take this from you. I think we two might get into business after all. Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 10) setPlayerStorageValue(cid,100158, 15) setPlayerStorageValue(cid,100165, 6) else npcHandler:say("Come back when you have the sword.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end elseif Topic[cid] == 18 then -- Finish mission 1 - The interrogation if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 5929, 1) then npcHandler:say("Thank you!! Ah, this makes my day! Say {mission} to continue.",cid) setPlayerStorageValue(cid, storage, 12) setPlayerStorageValue(cid,100158, 17) setPlayerStorageValue(cid,100165, 7) else npcHandler:say("Come back when you have the fish.", cid) end else npcHandler:say("You better don't return here until you've finished your {mission}.", cid) end Topic[cid] = 0 end return trueendnpcHandler:setCallback(CALLBACK_GREET, greetCallback)npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) Alesar <?xml version="1.0" encoding="UTF-8"?><npc name="Alesar" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="80" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="What do you want from me, |PLAYERNAME|?" /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="Ice rapier,2396,5000;Serpent sword,2409,6000;Dark armor,2489,1500;Dark helmet,2490,1000;Ancient shield,2532,5000"/> <parameter key="shop_sellable" value="Dragon hammer,2434,2000;Giant sword,2393,17000;Knight axe,2430,2000;Poison dagger,2411,50;Scimitar,2419,150;Serpent sword,2409,900;Skull staff,2436,6000;Dark armor,2489,400;Knight armor,2476,5000;Dark helmet,2490,250;Mystic turban,2663,150;Strange helmet,2479,500;Warrior helmet,2475,5000;Knight legs,2477,5000;Ancient shield,2532,900;Black shield,2529,800;Tower shield,2528,8000;Vampire shield,2534,15000;Ornamented Axe,7411,20000;dreaded clever,7419,15000;dreaded clever,7428,10000;onyx,7421,22000;haunted,7407,8000;haunted,7413,4000"/> </parameters></npc> Alesar - script local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)NpcSystem.parseParameters(npcHandler) local Topic = {}local storage = 100057 function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() endkeywordHandler:addKeyword({'name'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "My name is none of your business."})keywordHandler:addKeyword({'alesar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "That is my name. So what!"})keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What does it look like, fool? I'm a guard! But I won't sell you anything until Malor orders me otherwise."})keywordHandler:addKeyword({'trade'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I won't sell you anything, human. Malor doesn't want me to trade with strangers."})keywordHandler:addKeyword({'permission'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I won't sell you anything, human. Malor doesn't want me to trade with strangers."})keywordHandler:addKeyword({'daraman'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Don't you dare mention Daraman in my presence, human. I am through with his insidious lies and through with your accursed race!"})keywordHandler:addKeyword({'djinn'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "One day we will teach your race a lesson it will never forget."})keywordHandler:addKeyword({'king'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "We need a strong king to unite us in our struggle against the humans."})keywordHandler:addKeyword({'tibia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "One day we djinn will rid this world of evil."})keywordHandler:addKeyword({'darashia'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'edron'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'thais'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'venore'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'kazordoon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({"ab'dendriel"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'ankrahmun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I don't care about human cities. If I had my way, they would all be burnt to down today."})keywordHandler:addKeyword({'pharaoh'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "The pharaoh in Ankrahmun is a dangerous fool. Just your typical human, in other words."})keywordHandler:addKeyword({'palace'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "So?"})keywordHandler:addKeyword({'ascension'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What are you talking about? More human pseudo-philosophical flapdoodle?"})keywordHandler:addKeyword({'rah'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What are you talking about? More human pseudo-philosophical flapdoodle?"})keywordHandler:addKeyword({'uthun'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What are you talking about? More human pseudo-philosophical flapdoodle?"})keywordHandler:addKeyword({'akh'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "What are you talking about? More human pseudo-philosophical flapdoodle?"})keywordHandler:addKeyword({'scarab'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I like them. They are peaceful, but if they are provoked they fight ferociously. And they are know to eat humans!"})keywordHandler:addKeyword({"kha'zeel"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "These mountains are our refuge from those pesky humans. Too bad there are always some who come up here anyway. You, for example."})keywordHandler:addKeyword({"kha'labal"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "The desert Kha'labal was once a beautiful land, but it was devastated in the course of the war. Damn humans! This is all your fault!"})keywordHandler:addKeyword({'melchior'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I remember him. He was a greedy, double-dealing hyena. As far as I know his bleached bones are now lying somewhere in the Kha'labal."})keywordHandler:addKeyword({'djema'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Djema? Well - I suppose she is the only human I still like. But she has been brought up by djinns. Who knows - perhaps humans can learn."})keywordHandler:addKeyword({"baa'leal"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Baa'leal is Malor's lieutenant. Unflinchingly loyal, but not quite as clever as he thinks he is."})keywordHandler:addKeyword({"bo'ques"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "I miss Bo'ques' cooking, but not his pompous airs and graces."})keywordHandler:addKeyword({"fa'hradin"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Fa'hradin, that old cynic is way too smart to believe in Daraman's lies. He should reconsider his loyalties."}) function greetCallback(cid) Topic[cid] = 0 return trueend function creatureSayCallback(cid, type, msg)local p = getCreatureName(cid) local v = getPlayerStorageValue(cid, storage) if npcHandler:isFocused(cid) then if msgcontains(msg, 'no') and Topic[cid] == 2 then npcHandler:say("Dont disturb me then.",cid) Topic[cid] = 1 elseif msgcontains(msg, 'no') and Topic[cid] >= 4 then npcHandler:say("Dont disturb me then.",cid) Topic[cid] = 3 end end if (msgcontains(msg, "DJANNI'HAH")) and (not npcHandler:isFocused(cid)) and getPlayerStorageValue(cid, storage) == -1 then if getPlayerStorageValue(cid, 100054) == 2 and getPlayerStorageValue(cid, 9030) == 1 then npcHandler:say("What do you want from me, "..p.."?", cid) npcHandler:addFocus(cid) Topic[cid] = 1 end elseif Topic[cid] == 1 then if msgcontains(msg, 'mission') and getPlayerStorageValue(cid, storage) == -1 then npcHandler:say("So Baa'leal thinks you are up to do a mission for us? ...",cid) npcHandler:say("I think he is getting old, entrusting human scum such as you are with an important mission like that. ...",cid, 1000) npcHandler:say("I don't understand why you haven't been slaughtered right at the gates. ...",cid, 2500) npcHandler:say("Are you prepared to embark on a dangerous mission for us?",cid, 3500) Topic[cid] = 2 end elseif Topic[cid] == 2 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == -1 then npcHandler:say("All right then, human. Have you ever heard of the {Tears of Daraman}? ...",cid) npcHandler:say("They are precious gemstones made of some unknown blue mineral and possess enormous magical power. ...",cid, 1000) npcHandler:say("If you want to learn more about these gemstones don't forget to visit our library. ...",cid, 2000) npcHandler:say("Anyway, one of them is enough to create thousands of our mighty djinn blades. ...",cid, 3000) npcHandler:say("Unfortunately my last gemstone broke and therefore I'm not able to create new blades anymore. ...",cid, 4000) npcHandler:say("To my knowledge there is only one place where you can find these gemstones - I know for a fact that the Marid have at least one of them. ...",cid, 5000) npcHandler:say("Well... to cut a long story short, your mission is to sneak into Ashta'daramai and to steal it. ...",cid, 6000) npcHandler:say("Needless to say, the Marid won't be too eager to part with it. Try not to get killed until you have delivered the stone to me.",cid, 7000) setPlayerStorageValue(cid,storage, 1) setPlayerStorageValue(cid, 100062, 6) end Topic[cid] = 0 end if (msgcontains(msg, "DJANNI'HAH")) and (not npcHandler:isFocused(cid)) and getPlayerStorageValue(cid, storage) == 1 then if getPlayerStorageValue(cid, storage) == 1 and getPlayerStorageValue(cid, 9030) == 1 then npcHandler:say("What do you want from me, "..p.."?", cid) npcHandler:addFocus(cid) Topic[cid] = 3 end elseif Topic[cid] == 3 then if msgcontains(msg, 'mission') then npcHandler:say("Did you find the tear of Daraman?",cid) Topic[cid] = 4 end elseif Topic[cid] == 4 then if msgcontains(msg, 'yes') and doPlayerTakeItem(cid, 2346, 1) then npcHandler:say("So you have made it? You have really managed to steal a Tear of Daraman? ...",cid) npcHandler:say("Amazing how you humans are just impossible to get rid of. Incidentally, you have this character trait in common with many insects and with other vermin. ...",cid, 1000) npcHandler:say("Nevermind. I hate to say it, but it you have done us a favour, human. That gemstone will serve us well. ...",cid, 3000) npcHandler:say("Baa'leal, wants you to talk to {Malor} concerning some {new mission.} ...",cid, 4500) npcHandler:say("Looks like you have managed to extended your life expectancy - for just a bit longer.",cid, 5500) setPlayerStorageValue(cid,storage, 2) setPlayerStorageValue(cid, 100062, 8) setPlayerStorageValue(cid,100159, 3) else npcHandler:say("You better don't return here until you've got the Tear.", cid) end Topic[cid] = 0 end if msgcontains(msg, "bye") or msgcontains(msg, "farewell") then npcHandler:say("Finally.",cid) npcHandler:releaseFocus(cid) npcHandler:resetNpc(cid) Topic[cid] = 0 end return trueend npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) Tem umas pasta dentro de npc - lib acho que tem alguma influencia não sei ao certonpcsystem -- Advanced NPC System (Created by Jiddo),-- Modified by TheForgottenServer Team.if(NpcSystem == nil) then -- Loads the underlying classes of the npcsystem. dodirectory(getDataDir() .. 'npc/lib/npcsystem') -- Global npc constants: -- Keyword nestling behavior. For more information look at the top of keywordhandler.lua KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED -- Greeting and unGreeting keywords. For more information look at the top of modules.lua FOCUS_GREETWORDS = {'hi', 'hello'} FOCUS_FAREWELLWORDS = {'bye', 'farewell'} -- The word for requesting trade window. For more information look at the top of modules.lua SHOP_TRADEREQUEST = {'offer', 'trade'} -- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! For more information look at the top of modules.lua SHOP_YESWORD = {'yes'} SHOP_NOWORD = {'no'} -- Pattern used to get the amount of an item a player wants to buy/sell. PATTERN_COUNT = '%d+' -- Talkdelay behavior. For more information, look at the top of npchandler.lua. NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK -- Conversation behavior. For more information, look at the top of npchandler.lua. NPCHANDLER_CONVBEHAVIOR = CONVERSATION_PRIVATE -- Constant strings defining the keywords to replace in the default messages. -- For more information, look at the top of npchandler.lua... TAG_PLAYERNAME = '|PLAYERNAME|' TAG_ITEMCOUNT = '|ITEMCOUNT|' TAG_TOTALCOST = '|TOTALCOST|' TAG_ITEMNAME = '|ITEMNAME|' TAG_QUEUESIZE = '|QUEUESIZE|' NpcSystem = {} -- Gets an npcparameter with the specified key. Returns nil if no such parameter is found. function NpcSystem.getParameter(key) local ret = getNpcParameter(tostring(key)) if((type(ret) == 'number' and ret == 0) or ret == nil) then return nil else return ret end end -- Parses all known parameters for the npc. Also parses parseable modules. function NpcSystem.parseParameters(npcHandler) local ret = NpcSystem.getParameter('idletime') if(ret ~= nil) then npcHandler.idleTime = tonumber(ret) end local ret = NpcSystem.getParameter('talkradius') if(ret ~= nil) then npcHandler.talkRadius = tonumber(ret) end local ret = NpcSystem.getParameter('message_greet') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_GREET, ret) end local ret = NpcSystem.getParameter('message_farewell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_FAREWELL, ret) end local ret = NpcSystem.getParameter('message_decline') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_DECLINE, ret) end local ret = NpcSystem.getParameter('message_needmorespace') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDMORESPACE, ret) end local ret = NpcSystem.getParameter('message_needspace') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDSPACE, ret) end local ret = NpcSystem.getParameter('message_sendtrade') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SENDTRADE, ret) end local ret = NpcSystem.getParameter('message_noshop') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NOSHOP, ret) end local ret = NpcSystem.getParameter('message_oncloseshop') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONCLOSESHOP, ret) end local ret = NpcSystem.getParameter('message_onbuy') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONBUY, ret) end local ret = NpcSystem.getParameter('message_onsell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONSELL, ret) end local ret = NpcSystem.getParameter('message_missingmoney') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_MISSINGMONEY, ret) end local ret = NpcSystem.getParameter('message_needmoney') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDMONEY, ret) end local ret = NpcSystem.getParameter('message_missingitem') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_MISSINGITEM, ret) end local ret = NpcSystem.getParameter('message_needitem') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDITEM, ret) end local ret = NpcSystem.getParameter('message_idletimeout') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_IDLETIMEOUT, ret) end local ret = NpcSystem.getParameter('message_walkaway') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_WALKAWAY, ret) end local ret = NpcSystem.getParameter('message_alreadyfocused') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ALREADYFOCUSED, ret) end local ret = NpcSystem.getParameter('message_placedinqueue') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, ret) end local ret = NpcSystem.getParameter('message_buy') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_BUY, ret) end local ret = NpcSystem.getParameter('message_sell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SELL, ret) end local ret = NpcSystem.getParameter('message_bought') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_BOUGHT, ret) end local ret = NpcSystem.getParameter('message_sold') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SOLD, ret) end -- Parse modules. for parameter, module in pairs(Modules.parseableModules) do local ret = NpcSystem.getParameter(parameter) if(ret ~= nil) then local number = tonumber(ret) if(number ~= nil and number ~= 0) then npcHandler:addModule(module:new()) end end end endend Não irei postar todos djins porque é muita coisa e pc e net ta uma Bos**Eu já olhei outros topicos em que tinham esse mesmo problema poderem não deu muito certo!Eles ficam com mais erro aindafazendo com que os outros npc's não possam negociar também!Se eu ver algo que possa influenciar nesses npc e querem que eu poste aqui só avisar oque é que tento procurar!Alguém poderia me ajudar?Irei dar rep+Obrigado a todos desde já Estou fazendo um projeto otserv e preciso de todo tipo de ajuda! Editado Outubro 16, 2015 9 anos por compp (veja o histórico de edições)
Postado Outubro 19, 2015 9 anos não quero ler o script, preguica, qual é a msg que ele da, que voce não consegue falar com ele?
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.