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

help please, i want a rank statue

Wartio

Any game ideas?
Joined
Apr 2, 2010
Messages
457
Reaction score
29
Location
Sweden
i want statue say who is currently highest level, of every voc


local GROUP_FILTER = 3 -- this is the highscore cutoff (it's usually 3 for gods and 2 for tutors, so we start at 3)
function onLook(cid, thing, position, lookDistance)
if(thing.itemid)then -- yay it's an item, we won't get a nil error!
if(thing.itemid == 9751)then -- now that we know its safe to index this value, we can check the itemid
local player = db.getResult("SELECT name, level FROM `players` WHERE group_id < " .. GROUP_FILTER .. " ORDER BY `level` DESC LIMIT 1;")
local name, level = player:getDataString("name"), player:getDataInt("level")
player:free()
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You see a statue of " .. name .. " (" .. level .. ").\nHighest level on the server.")
return false
end
end
return true
end

 
Back
Top