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

TalkAction Improved Server Information [0.2 + 0.3]

RunarM

Finally back
Joined
Jul 17, 2008
Messages
1,636
Reaction score
32
Location
Norway/Tromsø
Server Information...

Data/Talkaction/Scripts
All.lua (for TFS 0.3)
Lua:
-- Serverinfo by RunarM, Crying Damson 0.3 --
local config = {
	rateExperience = getConfigInfo('rateExperience'),
	rateSkill = getConfigInfo('rateSkill'),
	rateLoot = getConfigInfo('rateLoot'),
	rateMagic = getConfigInfo('rateMagic'),
	rateSpawn = getConfigInfo('rateSpawn'),
	protectionLevel = getConfigInfo('protectionLevel'),
	stages = getBooleanFromString(getConfigInfo('experienceStages'))
}
function onSay(cid, words, param, channel)
	local exp = config.rateExperience
	if(config.stages == TRUE) then
		exp = getExperienceStage(getPlayerLevel(cid))
	end
	guild = "None"
		news = "We just changed the website layout!"
		name = getPlayerName(cid)
	    level = getPlayerLevel(cid)
	    access = getPlayerAccess(cid)
		version = "1.0"
		motto = "We keep the gaming feeling alive." 
		local hours = math.ceil(getWorldUpTime() / 3600) - 1
	local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
	if minutes == 60 then
		minutes = 0
		hours = hours + 1
	end
	doPlayerPopupFYI(cid, "Welcome to WinterLand \nServer Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel .. "\nNews:\n " .. news .." \n  \n\n You are Logged in as:\n Name: " .. name .."\n Level: " .. level .."\n Access: " .. access .."\n\n Server Version: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
	return TRUE
end

in Talkaction.xml (Works on both 0.2 and 0.3)
Code:
	<talkaction words="!all" script="all.lua"/>

Here is a picture of it:
Enjott.jpg


[I will maybe be adding more features in the future.]
[Easy to add for example your Motto under the news, if you need just ask me]



Kind Regards, Runarm.

Here is my fix: This works perfectly with mystic spirit 0.2.
Exprate works. But it might not be compatible with exp stages. It will only display exprate shown from config.lua
Data/Talkaction/Scripts
All.lua (for TFS 0.2)
Lua:
-- Serverinfo by RunarM, Mystic Spirit 0.2 fix by Znote --
  local config = {
        rateLoot = getConfigInfo('rateLoot'),
        worldType = getConfigInfo('worldType'),
        rateMagic = getConfigInfo('rateMagic'),
        rateSpawn = getConfigInfo('rateSpawn'),
        protectionLevel = getConfigInfo('protectionLevel'),
}
function onSay(cid, words, param, channel)
        local exp = config.rateExperience
        if(config.stages == TRUE) then
                exp = getExperienceStage(getPlayerLevel(cid))
        end
        guild = "None"
                news = "We just changed the website layout!"
                name = getPlayerName(cid)
            level = getPlayerLevel(cid)
            access = getPlayerAccess(cid)
                version = "1.0"
                motto = "We keep the gaming feeling alive."
                local hours = math.ceil(getWorldUpTime() / 3600) - 1
        local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
        if minutes == 60 then
                minutes = 0
                hours = hours + 1
        end
        doPlayerPopupFYI(cid, "Welcome to this server \nServer Information:\n\nExperience rate: x" .. rateExp .. "\nSkills rate: x" .. rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel .. "\nWorld Type: " .. config.worldType .. "\nNews:\n " .. news .." \n  \n\n You are Logged in as:\n Name: " .. name .."\n Level: " .. level .."\n Access: " .. access .."\n\n Server Version: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
        return TRUE
end


Focusing on the player:
Lua:
function onSay(cid, words, param, channel)
	    guild = getPlayerGuildName(name)
		name = getPlayerName(cid)
	    level = getPlayerLevel(cid)
	    access = getPlayerAccess(cid)
		magic = getPlayerMagLevel(cid)
		hp = getPlayerHealth(cid)
		mana = getPlayerMana(cid)
		food = getPlayerFood(cid)
		voca = getPlayerVocation(cid)
		look = getPlayerLookDir(cid)
		--- Extra (not using)---
		Position = getPlayerPosition(cid) --- Player's position ---
		Temple = getPlayerMasterPos(cid) --- Player's temple position --- 
		Town = getPlayerTown(cid) --- Player's town id --- 
		Item = getPlayerItemCount(cid,ITEMIDHERE) --- How many of x items the player has (edit ITEMIDHERE)--- 
		Soul = getPlayerSoul(cid) --- Player's soul ---  
		Cap = getPlayerFreeCap(cid) --- Player's free cap --- 
		Light = getPlayerLight(cid) --- Player's light ticket ---  
		Sex = getPlayerSex(cid) --- Player's sex--- 
		
		
	doPlayerPopupFYI(cid, "Welcome: " .. name .."(" .. hp .." / " .. mana .." ) \n Vocation: " .. voca .."\n Level: " .. level .."\n Magic Level: " .. magic .."\n Guild: " .. guild .."\n Access: " .. access .."\n Food ticks: " .. food .."\n You are looking: " .. look .."")
	return TRUE
end
 
Last edited:
Seems nice, but you should add feature that shows what PvP is enabled, I mean, if it's Non-pvp, Pvp-e, or just Pvp. =)

Or is it easy to edit? Just copy one of the rows and edit the textes to pvp thingy in config? ;)
 
@Dedicated lol?

<talkaction words="!all" script="all.lua"/>

<talkaction words="!serverinfo" script="all.lua"/>
 
Seems nice, but you should add feature that shows what PvP is enabled, I mean, if it's Non-pvp, Pvp-e, or just Pvp. =)

Or is it easy to edit? Just copy one of the rows and edit the textes to pvp thingy in config? ;)

Here is with pvp thing:

Lua:
local config = {
        rateExperience = getConfigInfo('rateExperience'),
        rateSkill = getConfigInfo('rateSkill'),
        rateLoot = getConfigInfo('rateLoot'),
        worldType = getConfigInfo('worldType'),
        rateMagic = getConfigInfo('rateMagic'),
        rateSpawn = getConfigInfo('rateSpawn'),
        protectionLevel = getConfigInfo('protectionLevel'),
        stages = getBooleanFromString(getConfigInfo('experienceStages'))
}
function onSay(cid, words, param, channel)
        local exp = config.rateExperience
        if(config.stages == TRUE) then
                exp = getExperienceStage(getPlayerLevel(cid))
        end
        guild = "None"
                news = "We just changed the website layout!"
                name = getPlayerName(cid)
            level = getPlayerLevel(cid)
            access = getPlayerAccess(cid)
                version = "1.0"
                motto = "We keep the gaming feeling alive." 
                local hours = math.ceil(getWorldUpTime() / 3600) - 1
        local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
        if minutes == 60 then
                minutes = 0
                hours = hours + 1
        end
        doPlayerPopupFYI(cid, "Welcome to Florensia \nServer Information:\n\nExperience rate: x" .. exp .. "\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel .. "\nWorld Type: " .. config.worldType .. "\nNews:\n " .. news .." \n  \n\n You are Logged in as:\n Name: " .. name .."\n Level: " .. level .."\n Access: " .. access .."\n\n Server Version: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
        return TRUE
end
 
Yo, when i try run this i get this problem,
[06/08/2009 22:37:31] data/talkactions/scripts/all.lua:8: attempt to call global 'getBooleanFromString' (a nil value)
[06/08/2009 22:37:31] Warning: [Event::checkScript] Can not load script. /scripts/all.lua

Whats wrong?
 
This is only compatible with Crying Damson (the 0.3 series). and not 0.2.

Here is my fix: This works perfectly with mystic spirit 0.2.
There might be problems showing the exp stage though.
Lua:
-- Serverinfo by RuneM, Mystic Spirit 0.2 fix by Znote --
  local config = {
        rateLoot = getConfigInfo('rateLoot'),
        worldType = getConfigInfo('worldType'),
        rateMagic = getConfigInfo('rateMagic'),
        rateSpawn = getConfigInfo('rateSpawn'),
        protectionLevel = getConfigInfo('protectionLevel'),
}
function onSay(cid, words, param, channel)
        local exp = config.rateExperience
        if(config.stages == TRUE) then
                exp = getExperienceStage(getPlayerLevel(cid))
        end
        guild = "None"
                news = "We just changed the website layout!"
                name = getPlayerName(cid)
            level = getPlayerLevel(cid)
            access = getPlayerAccess(cid)
                version = "1.0"
                motto = "We keep the gaming feeling alive."
                local hours = math.ceil(getWorldUpTime() / 3600) - 1
        local minutes = math.ceil((getWorldUpTime() - (3600 * hours)) / 60)
        if minutes == 60 then
                minutes = 0
                hours = hours + 1
        end
        doPlayerPopupFYI(cid, "Welcome to this server \nServer Information:\n\nExperience rate: x" .. rateExp .. "\nSkills rate: x" .. rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn .. "\nProtection level: " .. config.protectionLevel .. "\nWorld Type: " .. config.worldType .. "\nNews:\n " .. news .." \n  \n\n You are Logged in as:\n Name: " .. name .."\n Level: " .. level .."\n Access: " .. access .."\n\n Server Version: " .. version .." \n Uptime:  ".. hours .."  hours and " .. minutes .." minutes.")
        return TRUE
end
 
Last edited:
Back
Top