Ir para conteúdo

Rookgaard - Lee'Delle


Poccnn

Posts Recomendados

Lee'Delle.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lee Delle" script="data/npc/scripts/Rookgaard/LeeDelle.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="140" head="78" body="123" legs="130" feet="115" addons="0"/>	
    <parameters>
        <parameter key="message_greet" value="Hello, hello, |PLAYERNAME|! Please come in, look, and buy!"/>
        <parameter key="message_farewell" value="Bye, bye, |PLAYERNAME|."/>
        <parameter key="module_keywords" value="1" />
		
        <parameter key="keywords" value="help;stuff;wares;offert;weapons;shield;armors;helmets;equipment;job;name;time;tibia;sell;mission;quest;dungeon;monsters;thais;" />
        <parameter key="keyword_reply1" value="I am already helping you by selling stuff." />
        <parameter key="keyword_reply2" value="I sell equipment of all kinds. Just ask me about the type of wares you are interested in." />
        <parameter key="keyword_reply3" value="I sell weapons, shields, armor, helmets, and equipment. For what do you want to ask?" />
        <parameter key="keyword_reply4" value="I sell weapons, shields, armor, helmets, and equipment. For what do you want to ask?" />
        <parameter key="keyword_reply5" value="I sell spears, rapiers, sabres, daggers, hand axes, axes, and short swords. Just tell me what you want to buy." />
        <parameter key="keyword_reply6" value="I sell wooden shields and studded shields. Just tell me what you want to buy." />
        <parameter key="keyword_reply7" value="I sell jackets, coats, doublets, leather armor, and leather legs. Just tell me what you want to buy." />
        <parameter key="keyword_reply8" value="I sell leather helmets, studded helmets, and chain helmets. Just tell me what you want to buy." />		
        <parameter key="keyword_reply9" value="I sell torches, bags, scrolls, shovels, picks, backpacks, sickles, scythes, ropes, fishing rods and sixpacks of worms. Just tell me what you want to buy." />		
        <parameter key="keyword_reply10" value="I am a merchant, so what can I do for you?" />		
        <parameter key="keyword_reply11" value="My name is Lee'Delle. Do you want to buy something?" />		
        <parameter key="keyword_reply12" value="I am so sorry, I have no watches to sell. Do you want to buy something else?" />		
        <parameter key="keyword_reply13" value="The continent is even more exciting than this isle!" />
        <parameter key="keyword_reply14" value="I sell much. Have a look at the blackboards for my wares or just ask." />		
        <parameter key="keyword_reply15" value="I really love flowers. Sadly my favourites, honey flowers are very rare on this isle. If you can find me one, I'll give you a little reward." />			
        <parameter key="keyword_reply16" value="I really love flowers. Sadly my favourites, honey flowers are very rare on this isle. If you can find me one, I'll give you a little reward." />	
        <parameter key="keyword_reply17" value="be carefull down there. Make sure you bought enough torches and a rope or you might get lost." />	
        <parameter key="keyword_reply18" value="There are plenty of them. Buy here the equipment to kill them and sell their loot afterwards!" />
        <parameter key="keyword_reply19" value="Thais is the capital of the thaian empire." />
		
        <parameter key="module_shop" value="1"/>
		<parameter key="shop_buyable" value="axe,2386,18;chain helmet,2458,49;coat,2651,7;dagger,2379,4;doublet,2485,14;fihing rod,2580,140;hand axe,2380,7;jacket,2650,9;leather armor,2467,22;leather helmet,2461,11;leather legs,2649,9;rapier,2384,13;rope,2120,45;sabre,2385,22;scroll,1949,5;scythe,2550,10;short sword,2406,26;shovel,2554,9;sickle,2405,7;spear,2389,9;studded helmet,2482,58;studded shield,2526,47;torch,2050,2;wooden shield,2512,13;"/>
		<parameter key="shop_sellable" value="axe,2386,7;bone club,2449,5;brass helmet,2460,22;brass shield,2511,25;chain armor,2464,40;chain helmet,2458,12;copper shield,2530,50;dagger,2379,2;doublet,2485,3;fishing rod,2580,30;hand axe,2380,4;hatchet,2388,25;katana,2412,35;leather armor,2467,5;leather helmet,2461,3;leather legs,2649,2;leather boots,2643,2;legion helmet,2480,22;mace,2398,30;machete,2420,6;plate shield,2510,40;rapier,2384,5;rope,2120,8;sabre,2385,12;scythe,2550,3;short sword,2406,10;shovel,2554,2;sickle,2405,2;spear,2389,3;studded armor,2484,25;studded club,2448,2;studded helmet,2482,20;studded legs,2468,15;studded shield,2526,16;sword,2376,25;viking helmet,2473,25;wooden shield,2512,3;"/>
    </parameters>
</npc>

 

LeeDelle.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, 'honey') or msgcontains(msg, 'flower') then
		if(doPlayerRemoveItem(cid,2103,1) == true)then
			npcHandler:say('Oh, thank you so much! Please take this piece of armor as reward.', cid)
			doPlayerAddItem(cid,2468,1)
		else
			npcHandler:say('Honey flowers are my favourites', cid)
		end	
	else
		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...