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

xx time change outfit

legendxd

New Member
Joined
Dec 29, 2009
Messages
47
Reaction score
3
hi ppl any1 can help me with an script of pokemon>>

i need a script that can do it:

if a player have xx time idle change the sprite of the poke (as if he sleeping) and if player move go back to the original sprite

i want learn lua but is hard get free guides and i'm under age so cant buy guides :(

thanks and sorry for my bad english
 
Lua:
local mins = 2
local outfit = 53

local c = createConditionObject(CONDITION_OUTFIT)
setConditionParam(c, CONDITION_PARAM_TICKS, -1)
setConditionParam(c, CONDITION_PARAM_SUBID, 1)
addOutfitCondition(c, {lookType = outfit})

function onThink(cid, interval)
	if isCreature(cid) then
		local t = getPlayerIdleTime(cid)
		if t == 500 then
			doRemoveCondition(cid, CONDITION_OUTFIT, 1)
		elseif t == mins * 60000 then
			doAddCondition(cid, c)
		end
	end

	return true
end
 
Back
Top