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

!partycheck - !guildcheck

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,766
Solutions
1
Reaction score
225
Location
Chile, Santiago
Hi there, I need a command that works like this: it should show on Server Log channel how many knights, paladins, druids and sorcerers are in the party, and show the 3 knights with higher level (to know who is blocking or will do it).

Also the same for !guildcheck: it should show on Server Log channel how many players of the guild are online, showing their names, and after that, show the 3 knights with higher level.

If someone could make this, I would be glad, :)
 
I am making this thing, I started and now the script should show (If the script it work, of course. I do not have tested.) all but at the moment I do not have scripted the (3 high blockerts part).
Lua:
	function getOnlineGuildMembers(cid) -- by Xafterin
		local t = {}
		local p = getPlayersOnline()
		local g = getPlayerGuildId(cid)
		for _, ps in ipairs(p) do
			local gs = getPlayerGuildId(ps)
			if(g == gs) then
				table.insert(t, ps)
			end
		end
		return t
	end
	function getStringVocationCount(cid, tab)
		for i = 0, 8 do
			local v = getPlayerVocation(cid)
			if(v == i) then
				local var = tab[cid][v]
				var = var + 1
				local vocVar = getPlayerVocationName(cid)
				local str = str .. var .. " " .. vocVar .. " " .. (var > 1 and "s." or ".")
			end
		end
		return str
	end
	local vocCount = {}
	local text = "There"
function onSay(cid, words, param, channel)
	if(words == "!partycheck") then
		local pmem = getPartyMembers(getPartyLeader(cid))
		if(pmem) then
			for _, pyd in ipairs(pmem) do
				text = text .. " is only one person, you!!!"
				if(#pmem > 1) then
					text = text .. " are on party " .. getStringVocationCount(pyd, vocCount) 
					return true
				end
			end
		else
			text = "You are not in any party."
		end
	elseif(words == "!guildcheck") then
		local gmem = getOnlineGuildMembers(cid)
		if(gmem) then
			local noneCount = 0
			local g = {name = getPlayerGuildName(cid)}
			text = "[".. g.name .."] There are ".. #gmem .." players playing. "
			for _, gid in ipairs(gmem) do
				noneCount = noneCount + 1
				if(#gmem == 1) then
					text = "You are alone in this guild."
				else
					text = text .. getPlayerName(gid) .. (noneCount == #gmem and "." or ", ") 
				end
			end
		end
	end
	doPlayerSendTextMessage(cid, 22, text)
	local relocate = {text, noneCount, vocCount}
	for i = 1, #relocate do
		relocate[i] = nil
	end
	return 0
end
 
-.-!

vBulletin Message
Knight God, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

for a script need 9 usd? ¬¬

Don Danielo: NO SUPPORT for private SVN TFS (0.4) here !

SUPPORT NO REQUESTS <-learn to read
 
Last edited:
Back
Top