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

Script problem = lag

Dymek

New Member
Joined
Dec 30, 2008
Messages
54
Reaction score
1
Location
Poland
@edit
Soo other question. Why on my pvp-e server, team kill ppl then server have big lag ?

Here is script:
Code:
function onKill(cid, target)
	if isPlayer(target) then
		local exp = ((getPlayerLevel(target) / getPlayerLevel(cid)) ^ 0.9) * getPlayerExperience(target) * 0.10
		doPlayerAddExp(cid, math.min(exp))
		doPlayerAddItem(cid, 9020, 1)
		doCreatureSay(cid, "Exp up++", TALKTYPE_MONSTER)
                doSendMagicEffect(getThingPos(cid), 28)
	end
	return true
end
 
Last edited:
Code:
function onKill(cid, target)
    if isPlayer(target) then
        local exp = getPlayerLevel(target) / getPlayerLevel(cid) ^ 0.9 * getPlayerExperience(target) * 0.10
        doPlayerAddExp(cid, math.min(exp))
        doPlayerAddItem(cid, 9020, 1)
        doCreatureSay(cid, "Exp up++", 19)
                doSendMagicEffect(getThingPos(cid), 28)
    end
    return true
end

try this 1

and why do u want to shorten ur script o_O
 
Code:
function onKill(cid, target)
	if isPlayer(target) then
		local exp = ((getPlayerLevel(target) / getPlayerLevel(cid)) ^ 0.9) * getPlayerExperience(target) * 0.10
		doPlayerAddExp(cid, math.ceil(exp))
		doPlayerAddItem(cid, 9020, 1)
		doCreatureSay(cid, "Exp up++", TALKTYPE_ORANGE_1)
		doSendMagicEffect(getThingPos(cid), 28)
	end
	return true
end
? :/
 
Back
Top