Ir para conteúdo

Rookgaard - Al Dee


Poccnn

Posts Recomendados

Al Dee.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Al Dee" script="data/npc/scripts/Rookgaard/Al Dee.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="129" head="58" body="77" legs="88" feet="115" addons="0"/>	
    <parameters>
        <parameter key="message_greet" value="Hello, hello, |PLAYERNAME|! Please come in, look, and buy! I'm a specialist for all sorts of tools. Just ask me for a trade to see my offers! You can also ask me for general hints about the game. You can also ask me about each citizen of the isle."/>
        <parameter key="message_farewell" value="Bye, bye |PLAYERNAME|."/>
        <parameter key="module_keywords" value="1" />
		
        <parameter key="keywords" value="How are you;tools;offer;trade;gold;backpack;rope;shovel;weapon;armor;shield;food;potion;cookis;fishing;cooking;fish;torch;worms;bone;help;job;name;time;premium;king;sell;wares;stuff;dungeon;sewers;vital;rats;monsters;merchants;tibia;rookgaard;mainland;profession;island of destiny;thais;academy;bank;temple;citizen;Al Dee;Amber;Billy;Cipfried;Dallheim;Dixi;Hyacinth;Lily;Loui;Norma;Obi;Paulie;Santiago;Seymour;The Oracle;Tom;Willie;Zerbrus;Zirella;" />
        <parameter key="keyword_reply1" value="I'm fine. I'm so glad to have you here as my customer." />
        <parameter key="keyword_reply2" value="As an adventurer, you should always have at least a backpack, a rope, a shovel, a weapon, an armor and a shield." />
        <parameter key="keyword_reply3" value="Just ask me for a trade to see my offers." />
        <parameter key="keyword_reply4" value="Take a look in the trade window to your right." />
        <parameter key="keyword_reply5" value="Well, no gold, no deal. Earn gold by fighting monsters and picking up the things they carry. Sell it to merchants to make profit!" />
        <parameter key="keyword_reply6" value="I am a merchant. What can I do for you?" />
        <parameter key="keyword_reply7" value="I am a merchant. What can I do for you?" />
        <parameter key="keyword_reply8" value="I am a merchant. What can I do for you?" />
        <parameter key="keyword_reply9" value="Oh, I'm sorry, but I don't deal with weapons. That's Obi's or Lee'Delle's business. I could offer you a pick in exchange for a small axe if you should happen to own one." />
        <parameter key="keyword_reply10" value="Armor and shields can be bought at Dixi's or at Lee'Delle's. Dixi runs that shop near Obi's." />
        <parameter key="keyword_reply11" value="Armor and shields can be bought at Dixi's or at Lee'Delle's. Dixi runs that shop near Obi's." />
        <parameter key="keyword_reply12" value="Hmm, the best address to look for food might be Willie or Billy. Norma also has some snacks for sale." />
        <parameter key="keyword_reply13" value="Sorry, I don't sell potions. You should visit Lily for that." />
        <parameter key="keyword_reply14" value="I sell fishing rods and worms if you want to fish. Simply ask me for a trade." />
        <parameter key="keyword_reply15" value="I sell fishing rods and worms if you want to fish. Simply ask me for a trade." />
        <parameter key="keyword_reply16" value="I you want to find someone who may want to buy your cookies, you should meet Lily." />
        <parameter key="keyword_reply17" value="No thanks. I don't like fish." />
        <parameter key="keyword_reply18" value="No thank you. I can already overstock the market with torches." />
        <parameter key="keyword_reply19" value="I have enough worms myself and don't want any more. Use them for fishing." />
        <parameter key="keyword_reply20" value="You better put that bone back there where you dug it out." />
        <parameter key="keyword_reply21" value="If you need general equipment, just ask me for a trade. I can also provide you with some general hints about the game." />
        <parameter key="keyword_reply22" value=" I'm a merchant. Just ask me for a trade to see my offers." />
        <parameter key="keyword_reply23" value="My name is Al Dee, but you can call me Al. Can I interest you in a trade?" />
        <parameter key="keyword_reply24" value="It's about 0:00 am. I'm so sorry, I have no watches to sell. Do you want to buy something else?" />
        <parameter key="keyword_reply25" value="As a premium adventurer you have many advantages. You really should check them out!" />
        <parameter key="keyword_reply26" value="The king encouraged salesmen to travel here, but only I dared to take the risk, and a risk it was!" />
        <parameter key="keyword_reply27" value="Just ask me for a trade to see what I buy from you." />
        <parameter key="keyword_reply28" value="Just ask me for a trade to see my offers." />
        <parameter key="keyword_reply29" value="Just ask me for a trade to see my offers." />
        <parameter key="keyword_reply30" value=" If you want to explore the dungeons such as the sewers, you have to equip yourself with the vital stuff I am selling. It's vital in the deepest sense of the word." />
        <parameter key="keyword_reply31" value="Oh, our sewer system is very primitive - it's so primitive that it's overrun by rats. But the stuff I sell is safe from them. Just ask me for a trade to see it!" />
        <parameter key="keyword_reply32" value="Well, vital means - necessary for you to survive!" />
        <parameter key="keyword_reply33" value="Rats plague our sewers. You can sell fresh rat corpses to Seymour or Tom the tanner." />
        <parameter key="keyword_reply34" value="If you want to challenge monsters in the dungeons, you need some weapons and armor from the local merchants." />
        <parameter key="keyword_reply35" value="To view the offers of a merchant, simply talk to him or her and ask for a trade. They will gladly show you their offers and also the things they buy from you." />
        <parameter key="keyword_reply36" value="One day I will return to the continent as a rich, a very rich man!" />
        <parameter key="keyword_reply37" value="On the island of Rookgaard you can gather important experiences to prepare yourself for mainland." />
        <parameter key="keyword_reply38" value="Have you ever wondered what that 'main' is people are talking about? Well, once you've reached level 8, you should talk to the oracle. You can choose a profession afterwards and explore much more of Tibia." />
        <parameter key="keyword_reply39" value="You will learn everything you need to know about professions once you've reached the Island of Destiny." />
        <parameter key="keyword_reply40" value="The Island of Destiny can be reached via the oracle once you are level 8. This trip will help you choose your profession!" />
        <parameter key="keyword_reply41" value="Thais is a crowded town." />
        <parameter key="keyword_reply42" value="The big building in the centre of Rookgaard. They have a library, a training centre, a bank and the room of the oracle. Seymour is the teacher there." />
        <parameter key="keyword_reply43" value="A bank is quite useful. You can deposit your money safely there. This way you don't have to carry it around with you all the time. You could also invest your money in my wares!" />
        <parameter key="keyword_reply44" value="The monk Cipfried takes care of our temple. He can heal you if you're badly injured or poisoned." />
        <parameter key="keyword_reply45" value="If you tell me the name of a citizen, I'll tell you what I know about him or her." />
        <parameter key="keyword_reply46" value="Yep, that's me. Smart of you to notice that!" />
        <parameter key="keyword_reply47" value="She's currently recovering from her travels in the academy. It's always nice to chat with her!" />
        <parameter key="keyword_reply48" value="This is a local farmer. If you need fresh food to regain your health, it's a good place to go. He's only trading with premium adventurers though." />
        <parameter key="keyword_reply49" value="He is just an old monk. However, he can heal you if you are badly injured or poisoned." />
        <parameter key="keyword_reply50" value="ome call him a hero. He protects the town from monsters." />
        <parameter key="keyword_reply51" value="She's Obi's granddaughter and deals with armors and shields. Her shop is south west of town, close to the temple." />
        <parameter key="keyword_reply52" value="He mostly stays by himself. He's a hermit outside of town - good luck finding him." />
        <parameter key="keyword_reply53" value="She sells health potions and antidote potions. Also, she buys blueberries and cookies in case you find any." />
        <parameter key="keyword_reply54" value="No idea who that is." />
        <parameter key="keyword_reply55" value="She used to sell equipment, but I think she has opened a small bar now. Talks about changing her name to 'Mary' and such, strange girl." />
        <parameter key="keyword_reply56" value="He sells weapons. His shop is south west of town, close to the temple." />
        <parameter key="keyword_reply57" value="He's the local bank clerk." />
        <parameter key="keyword_reply58" value="He dedicated his life to welcome newcomers to this island." />
        <parameter key="keyword_reply59" value="Seymour is a teacher running the academy. He has many important information about Tibia." />
        <parameter key="keyword_reply60" value="You can find the oracle on the top floor of the academy, just above Seymour. Go there when you are level 8." />
        <parameter key="keyword_reply61" value="He's the local tanner. You could try selling fresh corpses or leather to him." />
        <parameter key="keyword_reply62" value="This is a local farmer. If you need fresh food to regain your health, it's a good place to go. However, many monsters also carry food such as meat or cheese. Or you could simply pick blueberries." />
        <parameter key="keyword_reply63" value="Some call him a hero. He protects the town from monsters." />
        <parameter key="keyword_reply64" value="Poor old woman, her son Tom never visits her." />
		
		
        <parameter key="module_shop" value="1"/>
		<parameter key="shop_buyable" value="backpack,1988,10;bag,1987,4;fishing rod,2580,150;rope,2120,50;scroll,1949,5;scythe,2550,12;shovel,2554,10;torch,2050,2;worm,3976,1"/>
		<parameter key="shop_sellable" value="fishing rod,2580,30;shovel,2554,2;rope,2120,8"/>
    </parameters>
</npc>

 

Al Dee.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 shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

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, 'pick') or msgcontains(msg, 'small axe') then
		npcHandler:say('Picks are hard to come by. I trade them only in exchange for high quality small axes. Would you like to make that deal?', cid)
		talkState[talkUser] = 1
	elseif(talkState[talkUser] == 1)then
		if(msgcontains(msg,'yes'))then
		local get = config[troca]
			if(doPlayerRemoveItem(cid,2559,1) == true)then
				npcHandler:say('Splendid! Here, take your pick.', cid)
				doPlayerAddItem(cid,2553,1)
			else
				npcHandler:say('Sorry, I am looking for a SMALL axe.', cid)
			end
		else
			npcHandler:say("Well, then don't.",cid)
		end	
		talkState[talkUser] = 0
	elseif not(foodSayString(msg))then
		npcHandler:say('sorry but I do not know what they wanted.', cid)
	end
	return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

Editado por Poccnn
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...