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

Fluid Npc Problem

knightxd

Member
Joined
Feb 21, 2009
Messages
211
Reaction score
16
Location
Rio de Janeiro
Well, im trying to make an NPC to sell many fluids on the trade window...

like, beer, oil, manafluid etc..
but here goes the problem, when i add them with the same flask container (like 2006 in example) the trade window only show the last one, in case here the life fluid.

how can i make the npc put all the items on trade window??

here goes the code that i'm using:



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:addBuyableItem({'oil'}, 2006, 4400, 11, 'oil')
shopModule:addBuyableItem({'mana fluid'}, 2006, 100, 	7, 	'mana fluid')
shopModule:addBuyableItem({'life fluid'}, 2006, 80, 	10,	'life fluid')


npcHandler:addModule(FocusModule:new())
 
what did you do to fix it T_T
I had this problem (like 6 months ago) and if i remember correctly i fixed it doing this: (TFS 1.5)

I added this to items.xml

XML:
<item id="1" name="water"/>
<item id="2" name="lifefluid"/>
<item id="3" name="beer"/>
<item id="4" name="slime"/>
<item id="5" name="lemonade"/>
<item id="6" name="milk"/>
<item id="7" name="manafluid"/>
<item id="10" name="blood"/>
<item id="11" name="oil"/>
<item id="13" name="urine"/>
<item id="14" name="coconut milk"/>
<item id="15" name="wine"/>
<item id="19" name="mud"/>
<item id="21" name="fruit juice"/>
<item id="26" name="lava"/>
<item id="27" name="rum"/>
<item id="28" name="swamp"/>
<item id="35" name="tea"/>

And on the NPC lua file should be like this:

Lua:
shopModule:addBuyableItem({'mug of beer'}, 2012, 3, 3, 'mug of beer')
shopModule:addBuyableItem({'mug of lemonade'}, 2012, 2, 5, 'mug of lemonade')
shopModule:addBuyableItem({'mug of Milk'}, 2012, 2, 6, 'mug of milk')
shopModule:addBuyableItem({'mug of wine'}, 2012, 3, 15, 'mug of wine')

({'mug of beer'}, 2012, 3, 3, 'mug of beer'

2012 (mug), 3 (price), 3(fluid, in this case it is the beer)
 
Last edited:
I had this problem (like 6 months ago) and if i remember correctly i fixed it doing this: (TFS 1.5)

I added this to items.xml

XML:
<item id="1" name="water"/>
<item id="2" name="lifefluid"/>
<item id="3" name="beer"/>
<item id="4" name="slime"/>
<item id="5" name="lemonade"/>
<item id="6" name="milk"/>
<item id="7" name="manafluid"/>
<item id="10" name="blood"/>
<item id="11" name="oil"/>
<item id="13" name="urine"/>
<item id="14" name="coconut milk"/>
<item id="15" name="wine"/>
<item id="19" name="mud"/>
<item id="21" name="fruit juice"/>
<item id="26" name="lava"/>
<item id="27" name="rum"/>
<item id="28" name="swamp"/>
<item id="35" name="tea"/>

And on the NPC lua file should be like this:

Lua:
shopModule:addBuyableItem({'mug of beer'}, 2012, 3, 3, 'mug of beer')
shopModule:addBuyableItem({'mug of lemonade'}, 2012, 2, 5, 'mug of lemonade')
shopModule:addBuyableItem({'mug of Milk'}, 2012, 2, 6, 'mug of milk')
shopModule:addBuyableItem({'mug of wine'}, 2012, 3, 15, 'mug of wine')

({'mug of beer'}, 2012, 3, 3, 'mug of beer'

2012 (mug), 3 (price), 3(fluid, in this case it is the beer)
What I’m trying to do is to sell a bp of mf and the charge value changed the fluidclient value and that works for selling individual mf but when I sell it in a bp, the charges value counts how many bp to give you..so I end up with “7” bp of vial of water
 
i think you ha ce made mana fluids a liquids stackable right? you need to make source editions too in order to load it properly so you need to change items.otb for a higher version like 8.0 and edit spells to make it read the new flag
 
Back
Top