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

AFK Outfit & Guild Master

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I have an request for you.
If player is afk for ~5 minutes him outfit changed to 89 when he got voc=3, when he got voc=4 the outfit changes into 93.
If player un-afk the outfit changes to previous (remove afk-outfit condition)

Anyone can make it ?

@ Edit.

Anyone got Guild Master for TFS 0.3.5pl1 ? It will be nice if you share me :)
 
@Holahulu
Nope, i dont make it for this, i have a RPG based server and i need something like in other mmo -> If player stays dont moving just afk, they are sleeping or dancing, sitting, etc, you know what i mean.
 
Not tested, if it doesn't work remove " * 1000":
PHP:
local voc_outfit = {0, 0, 89, 93} -- 0 = no outfit change, x = outfit ID
local afkTime = 300 -- in seconds

function onThink(cid, interval)
	if(voc_outfit[getPlayerVocation(cid)] == 0 or getTileInfo(getCreaturePosition(cid)).nologout or 
		getCreatureNoMove(cid) or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
		return true
	end

	if(getPlayerIdleTime(cid) > afkTime * 1000 and voc_outfit[getPlayerVocation(cid)] ~= getCreatureOutfit(cid).lookType) then
		local outfit = getCreatureOutfit(cid)
		outfit.lookType = voc_outfit[getPlayerVocation(cid)]
		doSetCreatureOutfit(cid, outfit, interval * 2)
	end

	return true
end
Add in creaturescripts.xml and register in onLogin!
 
explain the guild master script
Player go to npc, say hi, then 'create guild', name of guild. When player is leader he can go to npc and say 'invite' and then player name. Other player can go to NPC and join guild (if he is invited).
Like on classic 7.6 otses (yurots, evo)
 
Player go to npc, say hi, then 'create guild', name of guild. When player is leader he can go to npc and say 'invite' and then player name. Other player can go to NPC and join guild (if he is invited).
Like on classic 7.6 otses (yurots, evo)

Exacly but for tfs 0.3.5pl1
 
Back
Top