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

Few NPCs - TFS 0.3.6pl1

Status
Not open for further replies.

Sherlok

Active Member
Joined
Aug 29, 2008
Messages
2,116
Reaction score
44
Location
Poland, Wrocław.
Hiho,
I need few NPCs for TFS 0.3.6pl1:

- Rashid/Djinns in one (NPC who buy items from players)
- Tools NPC (backpack, shovel, rope, AOL)
- Soft Boots & Firewalkers repairer NPC
- Pally equipment NPC
- Furniture NPC
- Magic Shop NPC

Does anyone who has the NPC would give them to me?
Rep++;
 
Enjoy

Blue / Green Djinn;

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Alesar" script="default.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="103" head="0" body="0" legs="0" feet="0" addons="0"/>
	<parameters>
		<parameter key="message_greet" value="What do you want from me, |PLAYERNAME|?" />
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_buyable" value="ice rapier,2396,5000;serpent sword,2409,6000;dark armor,2489,1500;dark helmet,2490,1000;ancient shield,2532,5000;dwarven ring,2213,2000;energy ring,2167,2000;life ring,2168,900;might ring,2164,5000;ring of healing,2214,2000;time ring,2169,2000;dragon necklace,2201,1000;protection amulet,2200,700;strange talisman,2161,100;silver amulet,2170,100"/>
		<parameter key="shop_sellable" value="dragon hammer,2434,2000;giant sword,2393,17000;knight axe,2430,2000;poison dagger,2411,50;scimitar,2419,150;serpent sword,2409,900;skull staff,2436,6000;dark armor,2489,400;knight armor,2476,5000;dark helmet,2490,250;mystic turban,2663,150;strange helmet,2479,500;warrior helmet,2475,5000;knight legs,2477,5000;ancient shield,2532,900;black shield,2529,800;tower shield,2528,8000;vampire shield,2534,15000;dwarven ring,2213,100;energy ring,2167,100;life ring,2168,50;might ring,2164,250;ring of healing,2214,100;time ring,2169,100;dragon necklace,2201,100;protection amulet,2200,100;strange talisman,2161,30;silver amulet,2170,50;hailstorm rod,2183,3000;moonlight rod,2186,200;necrotic rod,2185,1000;snakebite rod,2182,100;terra rod,2181,2000;springsprout rod,8912,3600;northwind rod,8911,1500;underworld rod,8910,4400;ankh,2327,100;mysterious fetish,2194,50"/>
	</parameters>
</npc>

Code:
<?xml version="1.0"?>
<npc name="Haroun" script="default.lua" walkinterval="2000">
	<health now="100" max="100"/>
<look type="104" head="20" body="30" legs="40" feet="50"/>

	<parameters>
		<parameter key="message_greet" value="Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?" />
		<parameter key="message_farewell" value="Farewell, human." />		
		<parameter key="message_buy" value="Do you want to purchase |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
		<parameter key="message_sell" value="Do you want to sell |ITEMCOUNT| |ITEMNAME| for |TOTALCOST| gold?" />
		<parameter key="message_decline" value="Well, obviously not." />		
		<parameter key="message_onbuy" value="It'll serve you well!" />
		<parameter key="message_onsell" value="Thank you, human." />
		<parameter key="message_walkaway" value="Farewell, human." />
		
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="job" />
		<parameter key="keyword_reply1" value="I'm an old djinn, I buy several items, and sell a few myself." />
		<parameter key="module_shop" value="3"/>
		<parameter key="shop_buyable" value="Axe ring,2208,500;Club ring,2209,500;Power ring,2166,100;Stealth ring,2165,5000;Sword ring,2207,500;Bronze amulet,2172,100;Garlic necklace,2199,100;elven amulet,2198,500;stone skin amulet,2197,5000,5;magic light wand,2162,120;beholder shield,2518,7000;noble armor,2486,8000;spike sword,2383,8000;war hammer,2391,10000"/>
		<parameter key="shop_sellable" value="Axe ring,2208,100;Club ring,2209,100;Power ring,2166,50;Stealth ring,2165,200;Sword ring,2207,100;Bronze amulet,2172,50;Garlic necklace,2199,50;elven amulet,2198,100;Stone skin amulet,2197,500;Wand of cosmic energy,2189,2000;Wand of decay,2188,1000;Wand of dragonbreath,2191,200;Wand of inferno,2187,3000;Wand of vortex,2190,100;Wand of Draconia,8921,1500;Wand of Starstorm,8920,3600;Wand of Voodoo,8922,4400;Magic Light Wand,2162,35;Life Crystal,4851,50;Mind Stone,2178,100;Orb,7493,750;beholder shield,2518,1200;crown shield,2519,8000;dragon shield,2516,4000;guardian shield,2515,2000;phoenix shield,2539,16000;blue robe,2656,10000;crown armor,2487,12000;noble armor,2486,900;boots of haste,2195,30000;broad sword,2413,500;dragon lance,2414,9000;fire axe,2432,8000;fire sword,2392,4000;ice rapier,2396,1000;obsidian lance,2425,500;spike sword,2383,1000;war hammer,2391,1200;crown helmet,2491,2500;crusader helmet,2497,6000;royal helmet,2498,30000;crown legs,2488,12000"/>

	</parameters>


</npc>

Soft boots.lua

Code:
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 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, 'soft') or msgcontains(msg, 'boots')) then
		selfSay('Do you want to repair your worn soft boots for 10000 gold coins?', cid)
		talkState[talkUser] = 1
	elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
		if(getPlayerItemCount(cid, 6530) >= 1) then
			if(doPlayerRemoveMoney(cid, 10000)) then
				local item = getPlayerItemById(cid, true, 6530)
				doTransformItem(item.uid, 6132)
				selfSay('Here you are.', cid)
			else
				selfSay('Sorry, you don\'t have enough gold.', cid)
			end
		elseif(getPlayerItemCount(cid, 10021) >= 1) then
			if(doPlayerRemoveMoney(cid, 10000)) then
				local item = getPlayerItemById(cid, true, 10021)
				doTransformItem(item.uid, 6132)
				selfSay('Here you are.', cid)
			else
				selfSay('Sorry, you don\'t have enough gold.', cid)
			end
		else
			selfSay('Sorry, you don\'t have the item.', cid)
		end
		talkState[talkUser] = 0
	elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
		talkState[talkUser] = 0
		selfSay('Ok then.', cid)
	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Furniture

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lola" script="furniture.lua" walkinterval="2000" floorchange="0">
	<health now="150" max="150"/>
	<look type="142" head="114" body="0" legs="95" feet="114" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell chairs, tables, plants, containers, pillows, tapestries and more. Everything for 500 gold pieces, just {trade}."/>
		<parameter key="shop_buyable" value="wooden chair,3901,500;sofa chair,3902,500;red cushioned chair,3903,500;green cushioned chair,3904,500;tusk chair,3905,500;ivory chair,3906,500;water-pipe,3907,500;coal basin,3908,500;big table,3909,500;square table,3910,500;round table,3911,500;small table,3912,500;stone table,3913,500;tusk table,3914,500;chest,3915,500;barrel,3916,500;harp,3917,500;bird cage,3918,500;bamboo table,3919,500;bamboo drawer,3920,500;drawer,3921,500;exotic flower,3922,500;potted flower,3923,500;flower bowl,3924,500;chest,3925,500;piano,3926,500;globe,3927,500;rocking chair,3928,500;indoor plant,3929,500;crate,3930,500;christmas tree,3931,500;dresser,3932,500;pendelum clock,3933,500;locker,3934,500;trough,3935,500;time table,3936,500;table lamp,3937,500;bookcase,3938,500;box,5086,500;box2,5087,500;barrel2,5088,500;big flowerpot,6114,500;large amphora,6115,500;tree stump,6372,500;mirror,6373,500;large trunk,7503,500;goldfish bowl,7700,500;tree stump2,7960,500;cuckoo clock,7961,500;telescope,7962,500;furnace,8692,500;blue tapestry,1872,500;green tapestry,1860,500;orange tapestry,1866,500;pink tapestry,1857,500;red tapestry,1869,500;white tapestry,1880,500;yellow tapestry,1863,500;small purple pillow,1678,500;small green pillow,1679,500;small red pillow,1680,500;small blue pillow,1681,500;small orange pillow,1683,500;small turquiose pillow,1684,500;small white pillow,1685,500;heart pillow,1685,500;blue pillow,1686,500;red pillow,1687,500;green pillow,1688,500;yellow pillow,1689,500;round blue pillow,1690,500;round red pillow,1691,500;round purple pillow,1692,500;round turquiose pillow,1693,500;oval mirror,1845,750;round mirror,1848,750;edged mirror,1851,750;green bed,7904,1000;red bed,7905,1000;yellow bed,7906,1000;bed removal,7907,1000;wooden stake,5941,10000;" />
	</parameters>
</npc>

Magic shop.lua

Code:
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)

shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook')
shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand')

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

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')

shopModule:addBuyableItem({'instense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 350, 3, 'sudden death rune')
shopModule:addBuyableItem({'death arrow'}, 2263, 300, 3, 'death arrow rune')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'desintegrate'}, 2310, 80,  3, 'desintegreate rune')

shopModule:addBuyableItemContainer({'bp slhp'}, 2000, 8704, 400, 1, 'backpack of small health potions')
shopModule:addBuyableItemContainer({'bp hp'}, 2000, 7618, 900, 1, 'backpack of health potions')
shopModule:addBuyableItemContainer({'bp mp'}, 2001, 7620, 1000, 1, 'backpack of mana potions')
shopModule:addBuyableItemContainer({'bp shp'}, 2000, 7588, 2000, 1, 'backpack of strong health potions')
shopModule:addBuyableItemContainer({'bp smp'}, 2001, 7589, 1600, 1, 'backpack of strong mana potions')
shopModule:addBuyableItemContainer({'bp ghp'}, 2000, 7591, 3800, 1, 'backpack of great health potions')
shopModule:addBuyableItemContainer({'bp gmp'}, 2001, 7590, 2400, 1, 'backpack of great mana potions')
shopModule:addBuyableItemContainer({'bp gsp'}, 1999, 8472, 3800, 1, 'backpack of great spirit potions')
shopModule:addBuyableItemContainer({'bp uhp'}, 2000, 8473, 6200, 1, 'backpack of ultimate health potions')
shopModule:addBuyableItemContainer({'bp ap'}, 2002, 8474, 2000, 1, 'backpack of antidote potions')

shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay')
shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 7500, 'wand of draconia')
shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno')
shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm')
shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo')

shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod')
shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod')
shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 15000, 'hailstorm rod')
shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod')
shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000, 'underworld rod')

shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 2500, 'wand of decay')
shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 3750, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno', 'inferno'},2187, 7500, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 9000, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 11000, 'wand of voodoo')

shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 250,'snakebite rod')
shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 500,   'moonlight rod')
shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 2500, 'necrotic rod')
shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 3750, 'northwind rod')
shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 5000, 'terra rod')
shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 7500, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 9000, 'springsprout rod')
shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 11000, 'underworld rod')

local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182}
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, 'first rod') or msgcontains(msg, 'first wand')) then
		if(isSorcerer(cid) or isDruid(cid)) then
			if(getPlayerStorageValue(cid, 30002) <= 0) then
				selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid)
				talkState[talkUser] = 1
			else
				selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid)
			end
		else
			selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid)
		end
	elseif(msgcontains(msg, 'yes')) then
		if(talkState[talkUser] == 1) then
			doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1)
			selfSay('Here you are young adept, take care yourself.', cid)
			setPlayerStorageValue(cid, 30002, 1)
		end
		talkState[talkUser] = 0
	elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then
		selfSay('Ok then.', cid)
		talkState[talkUser] = 0
	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())



And there is no NPC for fire walker boots, you can edit soft boots if you want it
 
Last edited:
I assumed you would make them yourself

Soft boots
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Aldo" script="soft boots.lua" walkinterval="2000" floorchange="0">
	<health now="150" max="150"/>
	<look type="142" head="114" body="0" legs="95" feet="114" corpse="2212"/>
</npc>

magic shop
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Grehy" script="magic shop.lua" walkinterval="2000" floorchange="0">
	<health now="150" max="150"/>
	<look type="142" head="114" body="0" legs="95" feet="114" corpse="2212"/>
</npc>
 
Credits: Bulet

LUA:
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({'brown backpack'}, 1988, 20, 'brown backpack')
shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope')
shopModule:addBuyableItem({'scythe'}, 2550, 50, 'scythe')
shopModule:addBuyableItem({'pick'}, 2553, 50, 'pick')
shopModule:addBuyableItem({'shovel'}, 2554, 50, 'shovel')
shopModule:addBuyableItem({'rust remover'}, 9930, 100, 'rust remover')

npcHandler:addModule(FocusModule:new())




LUA:
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({'bow'}, 2456, 400, 'bow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 'crossbow')
shopModule:addBuyableItem({'royal spear'}, 7378, 15, 'royal spear')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addBuyableItem({'arrow'}, 2544, 3, 'arrow')
shopModule:addBuyableItem({'sniper arrow'}, 7364, 5, 'sniper arrow')
shopModule:addBuyableItem({'bolt'}, 2543, 4, 'bolt')
shopModule:addBuyableItem({'earth arrow'}, 7850, 5, 'earth arrow')
shopModule:addBuyableItem({'flaming arrow'}, 7840, 5, 'flaming arrow')
shopModule:addBuyableItem({'flash arrow'}, 7838, 5, 'flash arrow')
shopModule:addBuyableItem({'onyx arrow'}, 7365, 7, 'onyx arrow')
shopModule:addBuyableItem({'power bolt'}, 2547, 7, 'power bolt')
shopModule:addBuyableItem({'throwing star'}, 2399, 42, 'throwing star')
shopModule:addBuyableItem({'shiver arrow'}, 7839, 5, 'shiver arrow')
shopModule:addBuyableItem({'piercing bolt'}, 7363, 5, 'piercing bolt')
shopModule:addBuyableItem({'assassin star'}, 7368, 100, 'assassin star')
shopModule:addBuyableItem({'infernal bolt'}, 6529, 30, 'infernal bolt')
shopModule:addBuyableItem({'throwing knife'}, 2410, 25, 'throwing knife')
shopModule:addBuyableItem({'small stone'}, 1294, 1, 'small stone')

shopModule:addSellableItem({'bow'}, 2456, 130, 'bow')
shopModule:addSellableItem({'crossbow'}, 2455, 160, 'crossbow')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')

npcHandler:addModule(FocusModule:new())
 
Make it by urself, is it so hard?
yea

Credits: Bulet

LUA:
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({'brown backpack'}, 1988, 20, 'brown backpack')
shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope')
shopModule:addBuyableItem({'scythe'}, 2550, 50, 'scythe')
shopModule:addBuyableItem({'pick'}, 2553, 50, 'pick')
shopModule:addBuyableItem({'shovel'}, 2554, 50, 'shovel')
shopModule:addBuyableItem({'rust remover'}, 9930, 100, 'rust remover')

npcHandler:addModule(FocusModule:new())




LUA:
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({'bow'}, 2456, 400, 'bow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 'crossbow')
shopModule:addBuyableItem({'royal spear'}, 7378, 15, 'royal spear')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addBuyableItem({'arrow'}, 2544, 3, 'arrow')
shopModule:addBuyableItem({'sniper arrow'}, 7364, 5, 'sniper arrow')
shopModule:addBuyableItem({'bolt'}, 2543, 4, 'bolt')
shopModule:addBuyableItem({'earth arrow'}, 7850, 5, 'earth arrow')
shopModule:addBuyableItem({'flaming arrow'}, 7840, 5, 'flaming arrow')
shopModule:addBuyableItem({'flash arrow'}, 7838, 5, 'flash arrow')
shopModule:addBuyableItem({'onyx arrow'}, 7365, 7, 'onyx arrow')
shopModule:addBuyableItem({'power bolt'}, 2547, 7, 'power bolt')
shopModule:addBuyableItem({'throwing star'}, 2399, 42, 'throwing star')
shopModule:addBuyableItem({'shiver arrow'}, 7839, 5, 'shiver arrow')
shopModule:addBuyableItem({'piercing bolt'}, 7363, 5, 'piercing bolt')
shopModule:addBuyableItem({'assassin star'}, 7368, 100, 'assassin star')
shopModule:addBuyableItem({'infernal bolt'}, 6529, 30, 'infernal bolt')
shopModule:addBuyableItem({'throwing knife'}, 2410, 25, 'throwing knife')
shopModule:addBuyableItem({'small stone'}, 1294, 1, 'small stone')

shopModule:addSellableItem({'bow'}, 2456, 130, 'bow')
shopModule:addSellableItem({'crossbow'}, 2455, 160, 'crossbow')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')

npcHandler:addModule(FocusModule:new())

rep++ :)
 
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({'brown backpack'}, 1988, 20, 1, 'brown backpack')
shopModule:addBuyableItem({'rope'}, 2120, 50, 1, 'rope')
shopModule:addBuyableItem({'scythe'}, 2550, 50, 1, 'scythe')
shopModule:addBuyableItem({'pick'}, 2553, 50, 1, 'pick')
shopModule:addBuyableItem({'shovel'}, 2554, 50, 1, 'shovel')
shopModule:addBuyableItem({'rust remover'}, 9930, 100, 1, 'rust remover')

npcHandler:addModule(FocusModule:new())
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({'bow'}, 2456, 400, 1, 'bow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 1, 'crossbow')
shopModule:addBuyableItem({'royal spear'}, 7378, 15, 1, 'royal spear')
shopModule:addBuyableItem({'spear'}, 2389, 10, 1, 'spear')
shopModule:addBuyableItem({'arrow'}, 2544, 3, 1, 'arrow')
shopModule:addBuyableItem({'sniper arrow'}, 7364, 5, 1, 'sniper arrow')
shopModule:addBuyableItem({'bolt'}, 2543, 4, 1, 'bolt')
shopModule:addBuyableItem({'earth arrow'}, 7850, 5, 1, 'earth arrow')
shopModule:addBuyableItem({'flaming arrow'}, 7840, 5, 1, 'flaming arrow')
shopModule:addBuyableItem({'flash arrow'}, 7838, 5, 1, 'flash arrow')
shopModule:addBuyableItem({'onyx arrow'}, 7365, 7, 1, 'onyx arrow')
shopModule:addBuyableItem({'power bolt'}, 2547, 7, 1, 'power bolt')
shopModule:addBuyableItem({'throwing star'}, 2399, 42, 1, 'throwing star')
shopModule:addBuyableItem({'shiver arrow'}, 7839, 5, 1, 'shiver arrow')
shopModule:addBuyableItem({'piercing bolt'}, 7363, 5, 1, 'piercing bolt')
shopModule:addBuyableItem({'assassin star'}, 7368, 100, 1, 'assassin star')
shopModule:addBuyableItem({'infernal bolt'}, 6529, 30, 1, 'infernal bolt')
shopModule:addBuyableItem({'throwing knife'}, 2410, 25, 1, 'throwing knife')
shopModule:addBuyableItem({'small stone'}, 1294, 1, 1, 'small stone')

shopModule:addSellableItem({'bow'}, 2456, 130, 1, 'bow')
shopModule:addSellableItem({'crossbow'}, 2455, 160, 1, 'crossbow')
shopModule:addSellableItem({'spear'}, 2389, 3, 1, 'spear')

npcHandler:addModule(FocusModule:new())
 
Status
Not open for further replies.
Back
Top