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

Dead = Lag

Skoczi

New Member
Joined
Jun 6, 2012
Messages
115
Reaction score
0
Witam mam problem , gdy na serwie jest z 20+ osób .
I jak ktoś padnie ,a zazwyczaj jak padną z 2-3 osoby w tym samym momencie robi się sekundowy-max 2sekundowy lag
Jak to naprawić?
 
Nie posiadam takowych.

- - - Updated - - -

PS .
Mój komp :
4GB Ramu.
2x3.0GHz.
i net 20mb.

Win 7.
TFS 0.3.6pl1. 854
 
Ewentualnie może być także login (może po śmierci relog laguje?) , prepare (między śmiercią a życiem zachodzi pewna funkcja!) , przeleć creaturescripts...
 
Poważnie nie mam jedynie mała przeróbka login.lua

Code:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	  registerCreatureEvent(cid, "Mail")  
	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	
	end
	  
	  Outfit(cid)
    registerCreatureEvent(cid, "Party") 
	registerCreatureEvent(cid, "ReportBug")
	registerCreatureEvent(cid, "AdvanceSave")
	return true
	
end
return true
 
Ew myslę,że moze to być przez to ze ,po wbiciu lvla dostaje się full mane i full hp. ale niestety nie mam pojęcia jak to wyłączyć.

- - - Updated - - -


Mam 300 vocations i każda ma swoj outfit , i po wylogowaniu on się zmienia , ale gdy mam to , wszystko jest ok. ;D
 
Skoczi, a jak ktos sie wyloga to procke nie skacze?
- jezeli TAK - obczaj czy nie maja za duuuuzo itemkow przy sobie ew. w depocie.

Bo ja osobiscie nie widze innej opcji na laga w tym momencie poza zbyt duza ilosc items w BP/Depo... bo twoje Death jest czyste... A wbijanie levela nie ma nic do tego xD

Pokaz jeszcze funkcje przy wylogowaniu.
 
Łatwiej by chyba było, jak byś wrzucił folder z creaturescripts.... Bo w takie zgadywanki to można się bawić i bawić.
 
Nie ma lagów przy normalnym wylogowaniu np jak ktoś stoi w temple , tylko przy smierci.

a to moje creaturescipts.xml

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>

	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
	
	<event type="statschange" name="Party" event="script" value="party.lua"/> 
	
	
	<event type="think" name="Antibot" event="script" value="antibot.lua"/>
	
</creaturescripts>
 
Last edited:
Ew myslę,że moze to być przez to ze ,po wbiciu lvla dostaje się full mane i full hp. ale niestety nie mam pojęcia jak to wyłączyć.

- - - Updated - - -



Mam 300 vocations i każda ma swoj outfit , i po wylogowaniu on się zmienia , ale gdy mam to , wszystko jest ok. ;D

no napewno prosty onAdvance, który robi doCreatureAddHealth(cid,getCreatureMaxHealth(cid) - getCreatureHealth(cid)) robi laga przy śmierci... weź no -.-

wklej nam swoje creaturescript.xml


AHA BTW, WINDOWS BĘDZIE MIAŁ PROBLEMY Z DUŻĄ ILOŚCIĄ VOCATIONS, TO MOŻE TEMU MASZ LAGA ;]
 
creaturesctip.xml

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>

	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
	
	<event type="statschange" name="Party" event="script" value="party.lua"/> 
	
	
	<event type="think" name="Antibot" event="script" value="antibot.lua"/>
	
</creaturescripts>
 
<event type="statschange" name="Party" event="script" value="party.lua"/>
<event type="think" name="Antibot" event="script" value="antibot.lua"/>

Pokaż to.
 
Code:
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(attacker) == false then
return true
end

if isPlayer(cid) == false then
return true
end

if isInParty(cid) == false then
return true
end

if getPlayerParty(cid) == getPlayerParty(attacker) then
if combat ~= COMBAT_HEALING then
return doPlayerSendCancel(cid, 'You cannot attack teammate.') and false
end
end

return true
end

antibot wywalone , ale nie widzę poprawy.
 
ta, bo masz w chuj vocations i pewnie temu, że potem szuka ile ma ustawić typkowi życia itp? niewiem, ale pewnie coś z vocations.xml jak masz ich 300... xddddd
 
Back
Top