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

Lua serverinfo

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
Hello, i found this script and added it to my serverinfo.lua but ui'm not rly sure what it does... i thought if i wrote !serverinfo ingame i would be able to see exp lootrate etc etc but nothing happends.


Lua:
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)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end
 
    local pid = getPlayerByNameWildcard(param)
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
        return true
    end
 
    local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
    local pos = getCreaturePosition(pid)
        if(config.stages) then
      exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
  end
 
    doPlayerPopupFYI(cid, "Information" ..
 
    "\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 ..
        "\nName: " .. getCreatureName(pid) ..
        "\nAccess: " .. getPlayerAccess(pid) ..
        "\nLevel - " .. getPlayerLevel(pid) .. " ")
 
    return true
end

//Glidarn
 
Server info for website

http://otland.net/f118/gesior-acc-server-info-72686/

Server Auto info

http://otland.net/f82/server-autoinfo-uptime-players-54820/

!serverinfo

Try this one :

Code:
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) then
		exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
	end

	doPlayerPopupFYI(cid, "Server 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)
	return true
end
Code:
<talkaction words="!serverinfo" event="script" value="serverinfo.lua"/>
 
Back
Top