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

NPC Npc Examples

Tito Mazapan

Member
Joined
Sep 27, 2009
Messages
36
Best answers
0
Reaction score
5
And what about NPC's that just talk to you when you say something? For example:
P: Hello
NPC: Hello, I am Steve,what do you need?
P: job
NPC: I am the leader of the explorer society....
...


Or NPC's that take objects from you in exchange for a reward, for example:
P:hi
NPC: Hello
P: mission
NPC: Ahh this minotaurs, they stole the ring of my wife, it's all i have of her...please bring it to me and i will reward it.
P: bye


P:hi
NPC: hello
P:Mission/Ring
NPC: have youbrought the ring??
P: Yes
NPC: oh thank you.. (and it gives for example 5k)

and maybe if you can, taht it stays in questlog and that you can only do it once or that you need tohave talked to him before beig ableto givehim the ring it would be awesome. Thanks in advance,
Marc
 

emgump

New Member
Joined
Nov 4, 2009
Messages
6
Best answers
0
Reaction score
0
Can you also add the npc script that sells/buy eq?
 

Tibia Rox

Member
Joined
Feb 4, 2009
Messages
1,181
Best answers
0
Reaction score
9
Location
U.S.A
How do I make an npc have darker blue text, signifying a key word?
 

Tibia Rox

Member
Joined
Feb 4, 2009
Messages
1,181
Best answers
0
Reaction score
9
Location
U.S.A
Can you also add the npc script that sells/buy eq?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="rashid.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<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>
 

Spory

New Member
Joined
May 12, 2010
Messages
8
Best answers
0
Reaction score
0
Please tell me how to make a NPC that tell me to kill 50 Nomads in order to give me one addon. Please.
 
Joined
Aug 2, 2011
Messages
225
Best answers
1
Reaction score
20
Location
Now in Korat, Thailand
I have a delema. I want this NPC to sell 45 Scarab Coins
Donator.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Donation Shop Keeper" script="data/npc/scripts/donation shop.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="133" head="114" body="94" legs="19" feet="0" addons="3" corpse="2212"/>
	<parameters>
		<parameter key="message_greet" value="Hi |PLAYERNAME|! I sell only Donation Items only attained in this Shop" />
		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="quest;help;buy;cash;token;website" />
		<parameter key="keyword_reply1" value="You can find quests all over this world, start to check with other NPCs!" />
		<parameter key="keyword_reply2" value="I (Trade) only Donation Items only attained in this Shop." />
		<parameter key="keyword_reply3" value="Check the blackboards."/>
		<parameter key="keyword_reply4" value="You can purchase Cash Tokens on our website."/>
		<parameter key="keyword_reply5" value="You can purchase Cash Tokens on our website."/>
		<parameter key="keyword_reply6" value="Our Website: http://xroxor.webs.com/"/>
		<parameter key="message_needmoremoney" value="You do not have enough cash tokens." />
		<parameter key="message_decline" value="Is |TOTALCOST| cash tokens too much for you?" />
	</parameters>
</npc>
donation shop.lua
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({'VIP Medal'}, 5785, 19000, 'VIP Medal')
shopModule:addBuyableItem({'45 Scarab Coins'}, 2159, 10, 45,	'45 Scarab Coins')
shopModule:addBuyableItem({'Stuffed Dragon'}, 6566, 1,	'Stuffed Dragon')
shopModule:addBuyableItem({'Mermaids Tear'}, 2346, 1, 'Mermaids Tear')
shopModule:addBuyableItem({'Morgaroth Heart'}, 5943, 1,	'Morgaroth Heart')

npcHandler:addModule(FocusModule:new())
Were the delema is: you say hi to the npc, then say trade and you see a pile of 45 Scarab Coins but you buy and gives you 1, I want it so you buy 45 for 10 gold, not 1 for 10 gold and you move the bar over to 45 and it charges you 10x45=450 for it. So how can I do that in this script.

What I am trying to do is create a Cash system for Donations.
1. You go on the website, Donate, depending oon how much you donate, it gives you Cash tokens, (Cash Token = Christmas Token). let's say 1 to 10. you donate 1 dollar and get 10 Cash Tokens
2. you go online to the Donation Shop and buy a VIP Medal for 3 tokens, now you have VIP access. You want some cash so you pay 7 Cash tokens for 85cc. Now you run out of Cash Tokens, and try to buy a Stuffed Dragon from Doation Shop, The Owner says "Sorry you need Cash Tokens to buy that" This is were I want to go with it.
 
Last edited:

Alkenix

New Member
Joined
Oct 2, 2008
Messages
26
Best answers
0
Reaction score
2
Location
Germany
Why is there a different script for rune-seller and equip-seller? o_O
They have to do the same thing..
Just sell/buy my loot.

Can't i copy the rune-seller script, change the name and items to (for example a weapon seller) and bind it to the smith?oO


Btw..I know it not belong in this threat..But..
Can some tell me where i can change the start equip using the ingame acc manager and server distro The Forgotten Server
Version: 0.2.14 (Mystic Spirit) Link.
 

xKnightmarex

New Member
Joined
Mar 11, 2013
Messages
94
Best answers
0
Reaction score
3
I'm looking for a script for a npc that would, if you were in the guild, be able to add you to the guildhall house list so that you could enter. Any ideas of where I should start? Models? I can't find much unfortunately
 

Sweadia

New Member
Joined
Sep 24, 2011
Messages
6
Best answers
0
Reaction score
0
Maybe a noob question, but how do I know what colour is what number?

Example: head="63"<--How do you count that number? I'm guessing atm lmfao
 
Top