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

Anty-Afk (uzyskałem pomoc)

PATrar

New Member
Joined
Jun 11, 2009
Messages
88
Reaction score
0
Wiem że istnieje google i opcja "Search" ale mi nie pomaga, a ja potrzebuje prostego skryptu że po 15 minutach nie ruszania się w tibii wyloguje cie z ostrzeżeniem przy 14 minutach. Kiedyś widziałem tutaj skrypt w Polish boardzie lecz teraz nie mogę go znaleźć więc jakby ktoś go miał to bardzo proszę o podzielenie się nim

Pozdrawiam PATrar
 
Last edited:
Chodzi o to że po 15 minutach nie ruszania się wylogowuje cie
 
Jestem dziś zryty i chyba nie wiem oco Ci chodzi xD!

config.lua ? ; O
 
idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000

to nie działa
 
A w login.lua dodałeś ? W creaturescripts.xml masz?

Code:
<event type="think" name="Idle" event="script" value="idle.lua"/>

login.lua

Code:
	registerCreatureEvent(cid, "Idle")

Co nie działa ?
Wszystko działa !
 
Nie było dodane:
Lua:
registerCreatureEvent(cid, "Idle")

Dzięki wielkie działa
 
A w login.lua dodałeś ? W creaturescripts.xml masz?

Code:
<event type="think" name="Idle" event="script" value="idle.lua"/>

login.lua

Code:
	registerCreatureEvent(cid, "Idle")

Co nie działa ?
Wszystko działa !

Nie było dodane:
Lua:
registerCreatureEvent(cid, "Idle")

Dzięki wielkie działa
sorry, ale niechce zakładać nowego tematu.
chodzi o to że nie działają mi kicki. Jeżeli ktoś afkuje na trainerach niechce go wywalić. Po tych 15 minutach.
Wyszysto co pan wyzej mam dodane.

tutaj skyrpt idle:
local config = {
idleWarning = getConfigValue('idleWarningTime'),
idleKick = getConfigValue('idleKickTime')
}

function onThink(cid, interval)
if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or
getPlayerCustomFlagValue(cid, PlayerCustomFlag_AllowIdle)) then
return true
end

local idleTime = getPlayerIdleTime(cid) + interval
doPlayerSetIdleTime(cid, idleTime)
if(config.idleKick > 0 and idleTime > config.idleKick) then
doRemoveCreature(cid)
elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
if(config.idleKick > 0) then
message = message .. ", you will be disconnected in "
local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
if(diff > 1) then
message = message .. diff .. " minutes"
else
message = message .. "one minute"
end

message = message .. " if you are still idle"
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
end

return true
end
 
sorry, ale niechce zakładać nowego tematu.
chodzi o to że nie działają mi kicki. Jeżeli ktoś afkuje na trainerach niechce go wywalić. Po tych 15 minutach.
Wyszysto co pan wyzej mam dodane.

tutaj skyrpt idle:

stopAttackingAtExit ?
 
To kup donatora i poszukaj mojego posta, tam typkowi napisalem takie cos, ze jak wali traina, a da exita to go usuwa z gry. xd
 
Ok masz:
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if (doConvertIntegerToIp(getPlayerIp(cid)) == "0.0.0.0" and getCreatureName(getCreatureTarget(cid)) == "Training Monk") then
			doRemoveCreature(cid)
		end
	end
	return true
end
 
@Chojrak
calkiem to nie glupie z tym ip, myslalem ze last logged zostaje.
 
Ok masz:
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if (doConvertIntegerToIp(getPlayerIp(cid)) == "0.0.0.0" and getCreatureName(getCreatureTarget(cid)) == "Training Monk") then
			doRemoveCreature(cid)
		end
	end
	return true
end

to jest tak że jak da exit to po wpisaniu komendy /mc ma ip 0.0.0?
 
Back
Top