• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC 8.1 Rashid ! (Npc, buying items)

Sibuna

New Member
Joined
Feb 1, 2008
Messages
7
Reaction score
1
Hello,

I'm releasing my npc named Rashid! It's based on the real npc that can be found in Real Tibia, If you dont know who Rashid is please take an look here.

make an .xml file in Data/npc and name it rashid.xml, after you have done that copy this inside code.

Code:
<npc name="Rashid" script="data/npc/scripts/rashid.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="129" head="132" body="79" legs="97" feet="132" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="message_greet" value="Hello |PLAYERNAME|." />
</parameters>
</npc>

Creat an .lua in data/npc/scripts and name it rashid.lua, after you have done that copy this inside.
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({'Fur boots', 'Fur boots'},7457, 2000,'Fur boots')
shopModule:addSellableItem({'Dragon Scale Mail', 'Dragon Scale Mail'},2492, 40000,'Dragon Scale Mail')
shopModule:addSellableItem({'Demon Shield', 'Demon Shield'},2520, 30000,'Demon Shield')
shopModule:addSellableItem({'Golden Armor', 'Golden Armor'},2466, 20000,'Golden Armor')
shopModule:addSellableItem({'mammoth fur cape', 'mammoth fur cape'},7463, 6000,'mammoth fur cape')
shopModule:addSellableItem({'Medusa Shield', 'Medusa Shield'},2536, 9000,'Medusa Shield')
shopModule:addSellableItem({'Steel Boots ', 'Steel Boots '},2645, 30000,'Steel Boots ')
shopModule:addSellableItem({'Skull Helmet', 'Skull Helmet'},5741, 40000,'Skull Helmet')
shopModule:addSellableItem({'Beholder Helmet', 'Beholder Helmet'},3972, 7500,'Beholder Helmet')
shopModule:addSellableItem({'Ragnir Helmet', 'Ragnir Helmet'},7462, 400,'Ragnir Helmet')
shopModule:addSellableItem({'Dragon Slayer', 'Dragon Slayer'},7402, 15000,'Dragon Slayer')
shopModule:addSellableItem({'Wyvern Fang', 'Wyvern Fang'},7408, 1500,'Wyvern Fang')
shopModule:addSellableItem({'War Axe', 'War Axe'},2454, 9000,'War Axe')
shopModule:addSellableItem({'Sapphire Hammer', 'Sapphire Hammer'},7437, 7000,'Sapphire Hammer')
shopModule:addSellableItem({'Dragonbone Staff', 'Dragonbone Staff'},7430, 3000,'Dragonbone Staff')
shopModule:addSellableItem({'Diamond Sceptre', 'Diamond Sceptre'},7387, 3000,'Diamond Sceptre')
shopModule:addSellableItem({'Mammoth Whopper', 'Mammoth Whopper'},7381, 300,'Mammoth Whopper')
 
npcHandler:addModule(FocusModule:new())


Comments please:))
 
Last edited by a moderator:
This doesen't work on my evolutions based 8.1 anyone can help me?
maybe it doesn't work becouse its THE FORGOTTEN SERVER FORUM and its code for TFS. Evolution is out of date... got new Jiddo NPC system in Evo 8.1? :>
 
Nice script. OFC, I will have to add the rest of the items myself =(! Anyways, good start.
 
this is not working for tfs :O
13:33 Rashid: Hello Admin Rhumor.
13:33 Admin Rhumor [98]: sell fur boots
13:34 Admin Rhumor [98]: sell Mammoth Whopper
13:34 Admin Rhumor [98]: offer
13:34 Admin Rhumor [98]: job
13:34 Rashid: Good bye, Admin Rhumor!
 
Great npc, I'm using it and thanks for making it!
 
Otherwise, it acts in to tfs...

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="data/npc/scripts/rashid.lua" autowalk="1" floorchange="0">
	<health now="100" max="100"/>
	<look type="134" head="57" body="59" legs="40" feet="76" addons="0"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="(npc buy this item>)furboots,2457,2000...and so on (first name; next id item; next cost 1 item; next as a lot)"/>
		<parameter key="shop_buyable" value="(nps sell this item)[looking for sell value)"/>
	</parameters>
</npc>
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

npcHandler:addModule(FocusModule:new())
 
rashid.xml

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="data/npc/scripts/rashid.lua" autowalk="1" floorchange="0">
	<health now="100" max="100"/>
	<look type="146" head="10" body="30" legs="13" feet="30" addons="3"/>
	<parameters>
		<parameter key="module_shop" value="1"/>
		<parameter key="shop_sellable" value="dragon scale mail,2492,40000;golden armor,2466,20000;demon shield,2520,30000;madusa shield,2536,9000;steel boots,2645,30000;skull helmet,5741,10000;wyvern fang,7408,1500;dragon slayer,7402,5000;sapphire hammer,7437,3000;ancient amulet,2142,200;scarab amulet,2135,200;scarab shield,2540,2000;"/>
	</parameters>
</npc>


and rashid.lua

PHP:
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

npcHandler:addModule(FocusModule:new())

i think helpful
This is a MINE SKRIPT
 
ROfl,
1. Ssaj w/e ur name is
Stop trying to get ur posts up with commands like I use it?OMg you use every script of the Forum.I wanna see ur totally bugged server.Rofl.

2. I got a question
You talked about real Rashid , well , i would rather like to have a real one which spawns at different locations every day.
 
Back
Top