Postado Agosto 14, 2017 7 anos Descrição: NPC Simples do Tibia Global que vende armas e armaduras. O Sam, assim como no global, troca uma Old and Used Backpack por uma Dwarven Armor. Nome do Npc: Sam Função: Comerciante de Armas, Comerciante de Armaduras. Vende: Axe Battle Hammer Brass Armor Chain Armor Chain Helmet Chain Legs Dagger Hand Axe Leather Armor Leather Helmet Mace Rapier Sabre Spear Steel Shield Sword Throwing Knife Wooden Shield Compra: Axe Battle Axe Battle Hammer Battle Shield Brass Armor Chain Armor Chain Helmet Chain Legs Dagger Halberd Hand Axe Leather Armor Leather Helmet Mace Morning Star Plate Armor Rapier Sabre Short Sword Spear Steel Helmet Steel Shield Swoord Two Handed Sword Wooden Shield Troca: Old And Used Backpack X Dwarven Armor Sam.lua local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} 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 local config = { storage = 18256, } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if (msgcontains(msg, "old backpack")) then if (getPlayerItemCount(cid, 3960) >= 1) and doPlayerRemoveItem(cid,3960,1)then selfSay('Thank you very much! This brings back good old memories! Please, as a reward, travel to Kazordoon and ask my old friend Kroox to provide you a special dwarven armor.', cid) selfSay('I will mail him about you immediately. Just tell him, his old buddy sam is sending you.', cid) setPlayerStorageValue(cid, config.storage, 1) else selfSay("You don't have my backpack.", cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then talkState[talkUser] = 0 selfSay("Bye.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Sam.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="Sam" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="131" head="57" body="112" legs="48" feet="95" addons="0"/> <parameters> <parameter key="message_greet" value="Welcome to my shop, adventurer |PLAYERNAME|! I {trade} with weapons and armor."/> <parameter key="message_farewell" value="Good bye and come again, |PLAYERNAME|."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;" /> <parameter key="keyword_reply1" value="I am the blacksmith. If you need weapons or armor - just ask me." /> <parameter key="module_shop" value="1"/> <parameter key="shop_buyable" value="axe,2386,20;battle hammer,2417,350;brass armor,2465,450;chain armor,2464,200;chain helmet,2458,52;chain legs,2648,80;dagger,2379,5;hand axe,2380,8;leather armor,2467,35;leather helmet,2461,12;mace,2398,90;rapier,2384,15;sabre,2385,35;spear,2389,10;steel shield,2509,240;sword,2376,85;throwing knife,2410,25;wooden shield,2512,15;" /> <parameter key="shop_sellable" value="axe,2386,7;battle axe,2378,80;battle hammer,2417,120;battle shield,2513,95;brass armor,2465,150;chain armor,2464,70;chain helmet,2458,17;chain legs,2648,25;dagger,2379,2;halberd,2381,400;hand axe,2380,4;leather armor,2467,12;leather helmet,2461,4;mace,2398,30;morning star,2394,90;plate armor,2463,400;rapier,2384,5;sabre,2385,12;short sword,2406,10;spear,2389,3;steel helmet,2457,190;steel shield,2509,80;sword,2376,25;two handed sword,2377,450;wooden shield,2512,5;" /> </parameters> </npc> Ot Design: https://discord.gg/VgtVRNmCD7
Postado Agosto 14, 2017 7 anos Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP. Spoiler Congratulations, your content has been approved! Thank you for your contribution, we of Tibia King we are grateful. Your content will help many other users, you received +1 REP.
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.