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

[Mod / NPC][8.7+] Advanced "The Travelling Trader Quest" (Rashid)

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,696
Location
Poland
I haven't seen actual real Tibia accurate Rashid yet so I decided to make one(with all keywords, separate lists and perfect day handler).

Tested on: 0.3.7
Also should work on: 0.1, 0.4

Feathures:
  • Simple storage config, Teckman's datapack compatible
  • Npc spawn and mission are set on server startup, if you don't restart your server everyday, you may define npc relocation hour in globalevent(set hour and set DynamicHandler to true)
  • RL trade(separate lists, storage requirement), missions(on one mission word, based onStartUp), transcript(based on wiki and replies when he was in Carlin)*
  • You may use item name as alternative of mission word
  • 9.81+ items on trade list
  • backwards compability - 9.2+ items marked on list so you can easily remove them in case you want this script on older clients
*No script can be 100% RL - some statements such as reply for "no", MSG_QUEST_DONE, MSG_MISSION_DONE, "yes" without having quest item and crimson sword messages are not actually same as on RL - I can't check these cases myself

Installation:
  • download rar file and merge mods folder with yours.
    [*] (optional) if your server uses achievement system place "Recognised Trader" achievement in line marked near end of Rashid.lua
  • you need to go to poh and make sure package is obtainable and door is storage restricted, if it isn't fix it on the map yourself
  • if you have Rashid, Willard, Miraia, Briasol, Uzgod and Snake Eye in data\npcs folder remove them

Download:
MEGA | SpeedyShare | EN SendSpace

Scan:
VirusTotal

In case you want only Rashid files here they are:
RashidHandler.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Rashid storage handler and spawner" version="1.0" author="Zbizo" contact="[email protected]" enabled="yes">
	<config name="rshandler_config"><![CDATA[
	config = {
		["Monday"] = {x=32205, y=31159, z=7},
		["Tuesday"] = {x=32303, y=32833, z=7},
		["Wednesday"] = {x=32577, y=32753, z=7},
		["Thursday"] = {x=33067, y=32876, z=6},
		["Friday"] = {x=33233, y=32483, z=7},
		["Saturday"] = {x=33166, y=31808, z=6},
		["Sunday"] = {x=32328, y=31784, z=6},
	}
	daynumber = {["Monday"] = 1,["Tuesday"] = 2,["Wednesday"] = 3,["Thursday"] = 4,["Friday"] = 5,["Saturday"] = 6,["Sunday"] = 7}
	numberday = {[1] = "Monday",[2] = "Tuesday",[3] = "Wednesday",[4] = "Thursday",[5] = "Friday",[6] = "Saturday",[7] = "Sunday"}
	DAY_GLOBALSTORAGE = 25358 -- must be same as in rashid.lua
	
	function setdaynumber()
		Rshd = doCreateNpc('Rashid', config[os.date("%A")])
		setGlobalStorageValue(DAY_GLOBALSTORAGE, daynumber[os.date("%A")])
	end
		]]></config>
	<globalevent name="rashidspawn" type="startup" event="script"><![CDATA[
	domodlib('rshandler_config')	
	function onStartup()
		addEvent(setdaynumber, 1000)
		return true
	end
	]]></globalevent>
	<globalevent name="rashidmove" time="09:00:00" event="script"><![CDATA[
	-- event will be executed at hh:mm:ss everyday
	-- if console drops error like "onTimer not found" replace onTime() for onTimer()
	domodlib('rshandler_config')
	
	local DynamicHandler = false -- alternative handler on certain hour if you don't restart your server every 24h
	
	function onTime()
	if DynamicHandler == true then
		local gst = 0
		if getGlobalStorageValue(DAY_GLOBALSTORAGE) == 7 then
			gst = 1
		else
			gst = (getGlobalStorageValue(DAY_GLOBALSTORAGE) + 1)
		end
		
		setGlobalStorageValue(DAY_GLOBALSTORAGE, gst)
		doTeleportThing(Rshd,config[numberday[gst]])
	end
		return true
	end
	]]></globalevent>
	<item id="8209" article="a" name="crimson sword" override="yes">
		<attribute key="description" value="This is the sword Rashid ordered."/>
		<attribute key="weight" value="3600"/>
	</item>
	<item id="11395" article="a" name="cheap crimson sword" override="yes">
		<attribute key="description" value="This is the sword Rashid ordered, but has questionable quality, though."/>
		<attribute key="weight" value="3600"/>
	</item>
</mod>

Rashid.xml
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rashid" script="mods/npc/scripts/Rashid.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="146" head="99" body="102" legs="122" feet="115" addons="2"/>
<parameters>
        <parameter key="message_greet" value="Ah, a {customer}! Be greeted, |PLAYERNAME|!"/>
        <parameter key="message_farewell" value="Farewell, |PLAYERNAME|, may the winds guide your way."/>
		<parameter key="message_walkaway" value="Good bye." />

		<parameter key="module_keywords" value="1" />
		<parameter key="keywords" value="name;job;custom;ab'dendriel;ankrahmun;carlin;cormaya;darashia;edron;fibula;greenshore;kazordoon;liberty bay;northport;port hope;senja;svargrond;thais;vega;venore;time;king;queen;emperor" />
		<parameter key="keyword_reply1" value="I am Rashid, son of the desert." />
		<parameter key="keyword_reply2" value="I am a travelling trader. I don't buy everything, though. And not from everyone, for that matter." />
		<parameter key="keyword_reply3" value="I am a travelling trader. I don't buy everything, though. And not from everyone, for that matter." />
		<parameter key="keyword_reply4" value="Elves... I don't really trust them. All this talk about nature and flowers and treehugging... I'm sure there's some wicked scheme behind all this." />
		<parameter key="keyword_reply5" value="My beloved hometown! Ah, the sweet scent of the desert sands, the perfect shape of the pyramids... stunningly beautiful." />
		<parameter key="keyword_reply6" value="I have to go to Carlin once in a while, since the queen wishes to see my exclusive wares in regular intervals." />
		<parameter key="keyword_reply7" value="Cormaya? Not a good place to make business, it's way too far and small." />
		<parameter key="keyword_reply8" value="It's not the real thing, but almost as good. The merchants there claim ridiculous prices, which is fine for my own business." />
		<parameter key="keyword_reply9" value="Ah yes, Edron! Such a lovely and quiet island! I usually make some nice business there." />
		<parameter key="keyword_reply10" value="Too few customers there, it's not worth the trip." />
		<parameter key="keyword_reply11" value="Um... I don't think so." />
		<parameter key="keyword_reply12" value="I don't like being underground much. I also tend to get lost in these labyrinthine dwarven tunnels, so I rather avoid them." />
		<parameter key="keyword_reply13" value="When you avoid the slums, it's a really pretty city. Almost as pretty as the governor's daughter." />
		<parameter key="keyword_reply14" value="Um... I don't think so." />
		<parameter key="keyword_reply15" value="I like the settlement itself, but I don't set my foot into the jungle. Have you seen the size of these centipedes??" />
		<parameter key="keyword_reply16" value="Um... I don't think so." />
		<parameter key="keyword_reply17" value="I wish it was a little bit warmer there, but with a good mug of barbarian mead in your tummy everything gets a lot cosier." />
		<parameter key="keyword_reply18" value="I feel uncomfortable and rather unsafe in Thais, so I don't really travel there." />
		<parameter key="keyword_reply19" value="Um... I don't think so." />
		<parameter key="keyword_reply20" value="Although it's the flourishing trade centre of Tibia, I don't like going there. Too much competition for my taste." />
		<parameter key="keyword_reply21" value="It's almost time to journey on." />
		<parameter key="keyword_reply22" value="Kings, queens, emperors and kaliphs... everyone claims to be different and unique, but actually it's the same thing everywhere." />
		<parameter key="keyword_reply23" value="Kings, queens, emperors and kaliphs... everyone claims to be different and unique, but actually it's the same thing everywhere." />
		<parameter key="keyword_reply24" value="Kings, queens, emperors and kaliphs... everyone claims to be different and unique, but actually it's the same thing everywhere." />
		<!-- if you found something missing, post in script thread -->
</parameters>
</npc>

Rashid.lua
Lua:
 Rashid.lua - Pastebin.com[/url]
 
i don't know what to say execpt Awesome Request multiple times by much members this would be useful :) :p
 
i didn't tested it because i am busy but it seems nice.
1-what will happen if the server crash at 08:59:59 :p


- - - Updated - - -

and i am using 0.3.6 (8.6)
 
i didn't tested it because i am busy but it seems nice.
1-what will happen if the server crash at 08:59:59 :p


- - - Updated - - -

and i am using 0.3.6 (8.6)

He will spawn at daily location(eg if it's tuesday he will spawn in LB onStartUp)
script wasn't tested on 0.3.6
you have to remove 8.7+ items from his list if you want it to run without debugs/errors/etc.

@down
relocation event won't be executed and he will spawn on position based on your computer's date
 
Last edited:
what will happen if the server crashed before 08:00:00 and launched after it
EG
Crashed:07:30:00
launched:08:30:00
 
@tetra
When the server is started Rashid is spawned at the correct position matching the date. It does not change anything when you start the server.
 
hey, i would like to host this ot. i have been a god of a ot so i know what i am doing, i don't have time to make a ot my self so i need one. plz reply to me i really want a ot for my self agine. i am tired of playing for others. plz reapply bec i have exp thanks
 
Back
Top