• 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 Rashid(100 % loot sellable)

splifus

New Member
Joined
Oct 18, 2007
Messages
122
Reaction score
3
Location
Canada
I had nothing to do today..so I took the old rashid and make it sell all thing he normaly sell in real tibia..Maybe its was alrdy releashed somewhere else..I dont care..I dont want any credit. I use it on TFS last version.


should already have a file named "all.lua" in data/npc/script

add this in data/npc/

make a file named : 'rashid.xml'

and copy and past this
Code:
<npc name="Rashid" script="data/npc/scripts/all.lua" autowalk="5" floorchange="0">
<health now="100" max="100"/>
<look type="146" head="119" body="118" legs="119" feet="132" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|, I buy many items,you are abble to choise between Armors,Weapons,Helmets,Shields,Legs and Boots,Amulets,Tools, What do u offer me?" />
<parameter key="message_farewell" value="Good bye |PLAYERNAME|, Cya later!!" />
<parameter key="module_shop" value="1" />
<parameter key="shop_sellable" value="light shovel,5710,300;ancient amulet,2142,200;scarab amulet,2135,200;medusa shield,2536,9000;demon shield,2520,30000;castle shield,2535,5000;scarab shield,2540,2000;dark shield,2521,400;tortoise shield,6131,150;bone shield,2541,80;steel boots,2645,20000;pirate boots,5462,3000;fur boots,7457,2000;crocodile boots,3982,1000;pirate knee breeches,5918,200;skull helmet,5741,40000;beholder helmet,3972,7500;devil helmet,2462,1000;pirate hat,6096,1000;ragnir helmet,7462,400;krimhorn helmet,7461,200;pirate shirt,6095,500;leopard armor,3968,1000;mammoth fur cape,7463,6000;dwarven armor,2503,20000;golden armor,2466,20000;dragon scale mail,2492,40000;dragon slayer,7402,15000;war axe,2454,9000;heavy machete,2442,90;daramanian mace,2439,110;mammoth whopper,7381,300;silver dagger,2402,500;taurus mace,7425,500;crystal sword,7449,600;furry club,7432,1000;daramanian waraxe,2440,1000;wyvern fang,7408,1500;brutetamers staff,7379,1500;beastslayer axe,3962,1500;dragonbone staff,7430,3000;diamond sceptre,7387,3000;lunar staff,7451,5000;sapphire hammer,7437,7000;amber staff,7426,8000" />

<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="weapons;armors;helmets;shields;legs and boots;amulets;tools" />


<parameter key="keyword_reply1" value="I buy these weapons, dragon slayer,war axe,amber staff,sapphire hammer,lunar staff,diamond sceptre,dragonbone staff,beastslayer axe,brutetamer's staff,wyvern fang,daramanian waraxe,furry club,crystal sword,taurus mace,silver dagger,mammoth whopper,daramanian mace,heavy machete." />
<parameter key="keyword_reply2" value="I buy these armors, dragon scale mail,dwarven armor,golden armor,mammoth fur cap,leopard armor,pirate shirt." />
<parameter key="keyword_reply3" value="I buy these helmets, skull helmet,beholder helmet,devil helmet,pirate hat,ragnir helmet,krimhorn helmet." />
<parameter key="keyword_reply4" value="i buy these shields, demon shield,medusa shield,castle shield,scarab shield,dark shield,tortoise shield,bone shield." />
<parameter key="keyword_reply5" value="I buy these legs and boots, steel boots,pirate boots,fur boots,crocrodile boots and pirate knee breeches." />
<parameter key="keyword_reply6" value="I buy these amulets, ancient amulet and scarab amulet." />
<parameter key="keyword_reply7" value="I buy these tools, light shovel." />
</parameters>
</npc>

Maybe its work on other server ..I dont know but here is the all.lua (you should put this on data/npc/script/"all.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())

Finaly I took some picture and I made something with paint :p
rashiddoneyn7.png



Enjoy it :)

Timax25~
 
Last edited:
Make it sellable only if player has done the quest.

Hint: it has to be in *.lua part.
 
Well, for me its gonna be a little quest like a tower (djinn quest) once he opened the chest u have access to rashid. Thats why I didnt make it with the quest, Incase you dont want to do like me.


I hope you understand -.^


and thanks Moqill.
 
mmmyy i update my TFS to 2.13 and npc no go.
 
NPC BUGGED!

data/global.lua:451: in function 'doPlayerSellItem'
data/npc/lib/npcsystem/modules.lua:719: in function 'callback'
data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
data/npc/lib/npcsystem/npchandler.lua:265: in function 'onCreatureSay'
data/npc/scripts/rashid.lua:8: in function <data/npc/scripts/rashid.lua:8>
 
I want to this NPC working only when you have done quest can you help me with this?
 
Nice script im going to use this ;)

@ Up its very hard to make 100% the same quest as real tibia.

what you can do is something like this :

make a quest with lots of monsters and rooms. and after you are in the last room you get a reward the reward is a key to open the door to get by Rashid ;) its easy to map and script
 
Back
Top Bottom