• 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!

NPC Selling Oil.

Eldin

Eldin Projects
Premium User
Joined
Jun 12, 2008
Messages
1,334
Reaction score
613
Location
Sweden
For a while now, I have been trying different things to make my NPC sell Oil.
Somehow, It stands Oil in the trade but when you click on it or buy it you will recieve beer.
So could anyone possibly tell me how I can make my NPC sell Oil?
It shouldn't be that hard huh? Anoying.

My NPC:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Evan" script="data/npc/scripts/GeneralEricoBay.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="133" head="39" body="95" legs="0" feet="39" addons="1"/>
	<parameters>
		    <parameter key="message_greet" value="Would you like anything?" />
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="quest;help;item;general;oil" />
		<parameter key="keyword_reply1" value="I would advice a pick." />
		<parameter key="keyword_reply2" value="Im at your service, any items?" />
		<parameter key="keyword_reply3" value="Lets see, where should I start? Torch, rope, shovel, pick, brown backpack, star backpack, different sizes of life fluids and mana fluids. I guess thats all. Oh! I will also buy back empty vials." />
		<parameter key="keyword_reply4" value="Lets see, where should I start? Torch, rope, shovel, pick, brown backpack, star backpack, different sizes of life fluids and mana fluids. I guess thats all. Oh! I will also buy back empty vials." />
		<parameter key="keyword_reply5" value="I am the only one in those lands that sale oil, 4400 gold is the price for a vial with oil. Is that a deal?" />
	</parameters>
</npc>

And the Script:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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)

shopModule:addSellableItem({'vial'}, 7636, 5, 'vial')
shopModule:addSellableItem({'vial'}, 7634, 10, 'vial') 
shopModule:addSellableItem({'vial'}, 7635, 15, 'vial')

shopModule:addBuyableItem({'shovel'}, 2554, 45, 'shovel') 
shopModule:addBuyableItem({'torch'}, 2050, 2, 'torch') 
shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope') 
shopModule:addBuyableItem({'pick'}, 2553, 120, 'pick') 
shopModule:addBuyableItem({'brown backpack'}, 1988, 20, 'brown backpack')
shopModule:addBuyableItem({'star backpack'}, 5949, 20, 'star backpack')

[B]shopModule:addBuyableItem({'oil'}, 2006, 4400, 11, 'oil')[/B]

shopModule:addBuyableItem({'mana potion'}, 7620, 50, 'mana potion')
shopModule:addBuyableItem({'strong mana potion'}, 7589, 80, 'strong mana potion')
shopModule:addBuyableItem({'great mana potion'}, 7590, 120, 'great mana potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 'health potion')
shopModule:addBuyableItem({'strong health potion'}, 7588, 100, 'strong health potion')
shopModule:addBuyableItem({'great health potion'}, 7591, 190, 'great health potion')
shopModule:addBuyableItem({'ultimate health potion'}, 8473, 310, 'ultimate health potion')
shopModule:addBuyableItem({'great spirit potion'}, 8472, 190, 'great spirit potion')

npcHandler:addModule(FocusModule:new())

Aslong as I don't get a hand of this, my PoI wont work to 100%.
I would be thankfull if anyone could help me out.

Kind Regards,
Eldin.
 
That will make the server debug and wont start.
Thank You anyway for the try!

Anyone else? I believe its a bug in the TFS then.

Kind Regards,
Eldin.
 
Back
Top