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

[TFS 1.5] Rashid Location Login Message

Extrodus

|| Blazera.net ||
Premium User
Joined
Dec 22, 2008
Messages
2,737
Solutions
7
Reaction score
541
Location
Canada
Super simple, but for those of you that are running ORTS and have Rashid changing locations this may be a good addition to have just to inform players where he's currently staying.
Link to Github // NPC Location Change: orts2/data/scripts/globalevents/npc_spawn/rashid.lua at main · EPuncker/orts2 (https://github.com/EPuncker/orts2/blob/main/data/scripts/globalevents/npc_spawn/rashid.lua)

Uses the same dialog as Tibia Wiki to describe where he is, so figured that saves a web search for the player.

Create rashidLocation.lua and place inside data/scripts/creaturescripts:
Lua:
local loginEvent = CreatureEvent("onLogin_rashidLocation")
loginEvent:type("login")

local rashidLocations = {
    ["Monday"] = "Svargrond, in Dankwart's tavern, south of the temple.",
    ["Tuesday"] = "Liberty Bay, in Lyonel's tavern, west of the depot.",
    ["Wednesday"] = "Port Hope, in Clyde's tavern, west of the depot.",
    ["Thursday"] = "Ankrahmun, in Arito's tavern, above the post office.",
    ["Friday"] = "Darashia, in Miraia's tavern, south of the guildhalls.",
    ["Saturday"] = "Edron, in Mirabell's tavern, above the depot.",
    ["Sunday"] = "Carlin depot, one floor above."
}

function loginEvent.onLogin(player)
    local currentDayOfWeek = os.date("%A")
    local rashidLocationMessage = "Rashid is currently visiting " .. rashidLocations[currentDayOfWeek]

    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, rashidLocationMessage)
    return true
end

loginEvent:register()

Hope it helps anyone in need!
 
Last edited:
Back
Top