• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

(8.60) Request Rookgaard NPC's!

Wildhells

Member
Joined
Dec 28, 2012
Messages
52
Reaction score
7
Location
Poland
Hello! Im request rookgaard npc's - lua & xml.

Code:
Amber,
The Oracle,
Cipfried,
Paulie,
Tom,
Willie,
Obi,
Billy,
Lily,
Lee'Delle
Dallheim,
Al Dee,
Dixi,
Seymour,
Loui,
Norma,
Hyacinth.

Please help. :)
 
Amber
:)
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Amber" script="amber.lua">
	<look type="136" head="59" body="113" legs="132" feet="76" addons="1" />
	<parameters>
		<parameter key="message_greet" value="Oh hello, nice to see you |PLAYERNAME|. Are you here to hear some stories of my adventures or do you need help?" />
		<parameter key="message_farewell" value="See you later, |PLAYERNAME|." />
		<parameter key="message_walkaway" value="Yeah, see you later." />

		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="job;adventure;sea;explore;tibia;time;dungeon;king;thalia;castle;magic;weapon;monsters;cyclopses;minotaurs;dragons;orcs;prisoner;orcish;orcish yes; orcish no;food;salmon;cipfried;dallheim;hyacinth" />
		<parameter key="keyword_reply1" value="I explore and seek adventure." />
		<parameter key="keyword_reply2" value="I fought fierce monsters, climbed the highest mountains, and crossed the sea on a raft." />
		<parameter key="keyword_reply3" value="My trip over the sea was horrible. The weather was bad, the waves high and my raft quite simple." />
		<parameter key="keyword_reply4" value="I have been almost everywhere in Tibia." />
		<parameter key="keyword_reply5" value="I try to explore each spot of Tibia, and one day I will succeed." />
		<parameter key="keyword_reply6" value="Sorry, I lost my watch in a storm." />
		<parameter key="keyword_reply7" value="I have not had the time to explore the dungeons of this isle, but I have seen two big caves in the east, and there is a ruined tower in the northwest." />
		<parameter key="keyword_reply8" value="King {Tibianus} is the ruler of {Thalia}." />
		<parameter key="keyword_reply9" value="A fine city, but the king has some problems enforcing the law." />
		<parameter key="keyword_reply10" value="If you travel to Thalia, you really should visit the marvelous castle." />
		<parameter key="keyword_reply11" value="You can learn spells only in the guildhalls of the mainland." />
		<parameter key="keyword_reply12" value="The best weapons on this isle are just toothpicks, compared with the weapons warriors of the mainland wield." />
		<parameter key="keyword_reply13" value="Oh, I fought orcs, cyclopses, minotaurs, and even green dragons." />
		<parameter key="keyword_reply14" value="Horrible monsters they are." />
		<parameter key="keyword_reply15" value="Horrible monsters they are." />
		<parameter key="keyword_reply16" value="Horrible monsters they are." />
		<parameter key="keyword_reply17" value="Not the nicest guys you can encounter. I had some clashes with them and was prisoner of the orcs for some months." />
		<parameter key="keyword_reply18" value="I speak some orcish words, not much though, just 'yes' and 'no' and such basic." />
		<parameter key="keyword_reply19" value="I speak some orcish words, not much though, just 'yes' and 'no' and such basic." />
		<parameter key="keyword_reply20" value="It's 'mok' in orcish. I help you more about that if you have some food." />
		<parameter key="keyword_reply21" value="In orcish that's 'burp'. I help you more about that if you have some food." />
		<parameter key="keyword_reply22" value="My favorite dish is salmon. Oh please, bring me some of it." />
		<parameter key="keyword_reply23" value="Yeah! If you give me some salmon I will tell you more about the orcish language." />
		<parameter key="keyword_reply24" value="A gentle person. You should visit him, if you have problems." />
		<parameter key="keyword_reply25" value="An extraordinary warrior. He's the first and last line of defense of Rookgaard." />
		<parameter key="keyword_reply26" value="Hyacinth is a great healer. He lives somewhere hidden on this isle." />
	</parameters>
</npc>

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
function onPlayerEndTrade(cid)			npcHandler:onPlayerEndTrade(cid)			end
function onPlayerCloseChannel(cid)		npcHandler:onPlayerCloseChannel(cid)		end

function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then return false end
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

	local getS_LUBO_AMBER = getCreatureStorage(cid, 111111yourstoragenr111111) -- change here
	local getS_TMP_OS_TIME = getCreatureStorage(cid, 22222yourstoragenr22222) -- change here
	local lubo_amber_time = 2*3600		-- ?h*3600sek

-- CITIZEN -- addon 1
--	<outfit id="1">
---		<list gender="0" lookType="136" name="Citizen"/>
--		<list gender="1" lookType="128" name="Citizen"/>
-- 5878 - 100 Minotaur Leathers

-- addon 1 info
	if doMessageCheck(msg, 'addon') and getS_LUBO_AMBER == -1 then
		selfSay("Sorry, the backpack I wear is not for sale. It's handmade from rare {minotaur leather}.", cid)
		talkState[talkUser] = 1
	elseif doMessageCheck(msg, 'minotaur leather') and talkState[talkUser] == 1 then
		selfSay("Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", cid)
		talkState[talkUser] = 2
	elseif doMessageCheck(msg, 'yes') and talkState[talkUser] == 2 then
		doCreatureSetStorage(cid, S_LUBO_AMBER, 1)
		selfSay("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", cid)
		talkState[talkUser] = 0

-- daje na backpack i ma przyjsc po 2h
	elseif (doMessageCheck(msg, 'backpack') or doMessageCheck(msg, 'minotaur leather') or doMessageCheck(msg, 'addon')) and getS_LUBO_AMBER == 1 then
		selfSay("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", cid)
		talkState[talkUser] = 3
	elseif doMessageCheck(msg, 'yes') and talkState[talkUser] == 3 then
		if getPlayerItemCount(cid,5878) >= 100 then
			if doPlayerRemoveItem(cid, 5878, 100) then
				doCreatureSetStorage(cid, S_LUBO_AMBER, 2)
				doCreatureSetStorage(cid, S_TMP_OS_TIME, os.time())
				selfSay("Great! Alright, I need a while to finish this backpack for you. Come ask me later, okay?", cid)
			end
		else
			selfSay('You do not have all the required items.', cid)
		end
		talkState[talkUser] = 0

-- przyszedl
	elseif doMessageCheck(msg, 'addon') and getS_LUBO_AMBER == 2 then 
		if canPlayerWearOutfitId(cid, 1, 1) then
			selfSay("It seems you already have this addon, don't you try to mock me son!", cid)
		elseif not isPremium(cid) then
			selfSay("You need to buy premium in order to get this.", cid)
		elseif (os.time() - lubo_amber_time) >= getS_TMP_OS_TIME then -- po 2h
			selfSay("Just in time! Your backpack is finished. Here you go, I hope you like it.", cid)
			doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_RED)
			doPlayerAddOutfitId(cid, 1, 1)
		else -- przed 2h
			selfSay("Uh... I didn't expect you to return that early. Sorry, but I'm not finished yet with your backpack. I'm doing the best I can, promised.", cid)
		end
		talkState[talkUser] = 0

-- notebook quest
	elseif doMessageCheck(msg, 'notebook') then
		local tmp = getPlayerItemById(cid, true, 1955).uid
		if tmp > 0 and getItemAttribute(tmp, "name") == "Amber's Notebook" then
			if doRemoveItem(tmp, 1) then
				doPlayerAddItem(cid, 2406, 1)
				selfSay("Danke! Danke sehr!", cid)
			else
				selfSay("You don't even have that item, ".. getCreatureName(cid) .."!", cid)
			end
		else
			selfSay("You don't even have that item, ".. getCreatureName(cid) .."!", cid)
		end
		talkState[talkUser] = 0

-- no
	elseif doMessageCheck(msg, 'no') and isInArray({2,3}, talkState[talkUser]) then
		selfSay('Ok then.', cid)
		talkState[talkUser] = 0
	end

	return true
end

function thinkCallback()
	local talk = math.random(1,1200)
	if talk == 2 then
		doCreatureSay(getNpcId(), "I wish I could eat some salmon right now... best prepared in Liberty Bay style... yummy.", TALKTYPE_YELL)
	elseif talk == 4 then
		doCreatureSay(getNpcId(), "Wow, I'm tired. I really should get some sleep... zzzz.", TALKTYPE_YELL)
	elseif talk == 6 then
		doCreatureSay(getNpcId(), "What was that word again in Orcish language... hmm.", TALKTYPE_YELL)
	elseif talk == 8 then
		doCreatureSay(getNpcId(), "Hey you! Are you an adventurer, too?", TALKTYPE_YELL)
	elseif talk == 10 then
		doCreatureSay(getNpcId(), "<sings> Stormy weathers, stormy weathers... stormy weathers on the sea!", TALKTYPE_YELL)
	end
	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)
npcHandler:addModule(FocusModule:new())
 
Back
Top