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

Can anyone make npc?

helvetti

New Member
Joined
Oct 16, 2008
Messages
115
Reaction score
0
Location
Finland
Okay i think this would be easy npc for you scripters but i need npc that sells rings
Npc name: Ring Seller
All Cost: 5k
i give you the ids:
Axe Ring:2208
Might Ring:2164
Death Ring:6300
Life Ring:2168
Ring of Healing:2214
Stealth Ring:2165
Dwarven Ring:2213
Club Ring:2209
Sword Ring:2207
Power Ring:2166
Energy Ring:2167
Time Ring:2169

-----------------------------------
I would use some People in my server
 
Last edited:
In
data\npc
Make
Ring Seller.xml

Code:
<npc name="Ring Seller" script="data/npc/scripts/ringseller.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell all rings (everything for 5000 gold coins)!" />
		<parameter key="shop_buyable" value="Axe Ring,2208,5000;Might Ring,2164,5000;Death Ring,6300,5000;Ring of Healing,2214,5000;Stealth Ring,2165,5000;Dwarven Ring,2213,5000;Club Ring,2209,5000;Sword Ring,2207,5000;Power Ring,2166,5000;Energy Ring,2167,5000;Time Ring,2169,5000;Life Ring,2168,5000" />
	</parameters>
</npc>

In
data\npc\scripts
Make
ringseller.lua

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

npcHandler:addModule(FocusModule:new())

I hope it works :)
 
In
data\npc
Make
Ring Seller.xml

Code:
<npc name="Ring Seller" script="data/npc/scripts/ringseller.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell all rings (everything for 5000 gold coins)!" />
		<parameter key="shop_buyable" value="Axe Ring,2208,5000;Might Ring,2164,5000;Death Ring,6300,5000;Ring of Healing,2214,5000;Stealth Ring,2165,5000;Dwarven Ring,2213,5000;Club Ring,2209,5000;Sword Ring,2207,5000;Power Ring,2166,5000;Energy Ring,2167,5000;Time Ring,2169,5000;Life Ring,2168,5000" />
	</parameters>
</npc>

In
data\npc\scripts
Make
ringseller.lua

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

npcHandler:addModule(FocusModule:new())

I hope it works :)

Works really good
Nice Work :peace:
 
Back
Top