• 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, :)
 
Yes.
no support for 0.4, is a bad idea.
reasons:

1 ° Not only is there a method to achieve a 0.4 Tfs as well get with friends who are donors in Otland.

2 ° You can get the TFS in another forum and someone else has uploaded to the server or sell it elsewhere, the question is, not everyone gets the Tfs 0.4 in Otland.net if you get it, by people who or just know who you can pay more easily if you do not have Paypal.
 
@kito: maybe i can help you if you post your !guildcheck, i know you have it working.... xD

It is the same script that was posted before, but I changed the messages that it sended, so it can show arround 80 players without having troubles, just printing each name on each line, it shows name, vocation and level.
 
Last edited by a moderator:
It is the same script that was posted before, but I changed the messages that it sended, so it can show arround 80 players without having troubles, just printing each name on each line, it shows name, vocation and level.
Oks... I will try to help you.

I use TFS 0.4, a real map fixed completely by me, and added quite good ideas to my server.
Yep, i know, i play it... xD Im Erick's "cousin", but not blood relative... Large history... xD

The important fact here is that there is people that know how to program on LUA and PHP, but generally they don't have the ideas... The ideas come from people like me, I have an innovating mind, Im always doing new things and having new ideas...

If you can combine someone who has real good ideas and someone that can make them real, you will have a good OT, but if you don't have both... And if you only have the ideas, you need to manage somehow creating them, making them real, but you have at least a chance... If you just know how to program, you will never get good ideas.
I know it.... I dont really have many good ideas... :/ And when i have one, it's too big to script it.... xD



EDIT: Well, if you can see, the script that was posted here has BOTH commands on it, if you want to see it:
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
But you need to add them both in xml like this:
XML:
<talkaction words="!partycheck;/!guildcheck" event="script" value="name.lua"/>

Hope it works for you... It's not mine....
 
Last edited:
Oks... I will try to help you.


Yep, i know, i play it... xD Im Erick's "cousin", but not blood relative... Large history... xD


I know it.... I dont really have many good ideas... :/ And when i have one, it's too big to script it.... xD



EDIT: Well, if you can see, the script that was posted here has BOTH commands on it, if you want to see it:
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
But you need to add them both in xml like this:
XML:
<talkaction words="!partycheck;/!guildcheck" event="script" value="name.lua"/>

Hope it works for you... It's not mine....

Dude the problem is on the lua, and the ;/!guildcheck you will have to type /!guildcheck to use the command, erase that slash xD
 
Did you tried the talkaction?

Apart: About servers, but there are more poland and br servers than chileans.... So all of them, divides on more servers..... In chile, there are like 10 servers playables, other are trash... xD
 
!partycheck still doesn't work :p

Code:
    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
 
Last edited:
10573-gagha.jpg
 
Did you tried the talkaction?

Apart: About servers, but there are more poland and br servers than chileans.... So all of them, divides on more servers..... In chile, there are like 10 servers playables, other are trash... xD

The problem is not the talkactions at the .xml, the problem is the LUA script.
 
Back
Top