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

Lua [NPC] Problem with selleableitem

Jesus255

New Member
Joined
Aug 14, 2008
Messages
62
Reaction score
0
Hi everyone,

i got my server TFS 0.3.6pl1 and when someone try to sell empty potions npc said that he do not have this item

Code:
shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask')
shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask')
shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask')

i can just sell empty pots one by one ;\ same problem with jewels(pearls)

Code:
shopModule:addSellableItem({'white pearl'}, 2143, 200, 'white pearl') 
shopModule:addSellableItem({'black pearl'}, 2144, 200, 'black pearl') 
shopModule:addSellableItem({'small diamond'}, 2145, 400, 'small diamond')
shopModule:addSellableItem({'small sapphire'}, 2146, 400, 'small sapphire') 
shopModule:addSellableItem({'small ruby'}, 2147, 400, 'small ruby') 
shopModule:addSellableItem({'small emerald'}, 2149, 400, 'small emerald') 
shopModule:addSellableItem({'small amethyst'}, 2150, 600, 'small amethyst') 
shopModule:addSellableItem({'talon'}, 2151, 500, 'talon')
shopModule:addSellableItem({'violet gem'}, 2153, 15000, 'violet gem')
shopModule:addSellableItem({'yellow gem'}, 2154, 15000, 'yellow gem')
shopModule:addSellableItem({'green gem'}, 2155, 15000, 'green gem')
shopModule:addSellableItem({'red gem'}, 2156, 15000, 'red gem')
shopModule:addSellableItem({'blue gem'}, 2158, 15000, 'blue gem')

can someone tell me why? or gimme a working npc?
Thx alot..
 
Last edited:
Code:
<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_buyable" value="Empty Small Potion Flask,7636,5;Empty Strong Potion Flask,7634,10;Empty Great Potion Flask,7635,15"/>
	</parameters>

Hope it works, :p


:Working NPC:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Riona" script="default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="138" head="57" body="59" legs="40" feet="76" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_buyable" value="backpack,1988,20;pick,2553,10;shovel,2554,20;rope,2120,50"/>
	</parameters>
</npc>


:D
 
Thx for reply Jimi but isnt work

i delete

Code:
shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask')
shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask')
shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask')

from runes.lua and add what u said and still doesnt work
and if i keep shopModule:addSelleableItem(etc..)
npc sell me pots 2 times and still cannot sell empty pots..

btw, what i want is at the same npc (rune/pot seller) put vial to ppl sell em..
i wont another npc just to sell empty pots

i used this method with jellwer but, still cannot sell more than 1

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Ivan" script="default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="132" head="78" body="79" legs="79" feet="58" corpse="2131"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="small sapphire,2146,600"/>
	</parameters>
</npc>
 
Code:
shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5,1 'empty small potion flask')
shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10,1 'empty strong potion flask')
shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15,1 'empty great potion flask')
 
Back
Top