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

Request 2 PvP Scripts.

Sorbal

Member
Joined
Jul 23, 2010
Messages
406
Reaction score
11
Location
Poland
Hello Otlanders, i would like to 2 PvP scripts.
  • If player A kills player B more than three times in a row he won't get the frag reward
  • If A player kills another player with a higher level will automatically get 500 exp.
:rolleyes: Msg here if you need more informations.
 
Last edited:
second
LUA:
function onLogin(cid)
	registerCreatureEvent(cid, "kill_exp")
	return true
end

function onDeath(cid,corpse,deathList)
	local expp = 5000 	-- added experience
	local target = deathList[1]		-- or deathList[0] i dont remeber
	if isPlayer(target) then
		if getPlayerLevel(cid) > getPlayerLevel(target) then
			doPlayerAddExperience(target,expp)
			doSendAnimatedText(getThingPos(target),expp,TEXTCOLOR_WHITE)
		end
	end
	return true
end

creaturescript.xml
XML:
<event type="death" name="kill_exp" event="script" value="XXXX.lua"/>
<event type="login" name="kill_exp_log" event="script" value="XXXX.lua"/>

"XXXX" --> is the file name, both will be leading to same file name
 
Last edited:
I think its work good, no errors in console but i have one question. If 13 lvl (Test Ii on screen) kill lvl 15 (victim) this killed 15 lvl get too 500 exp oO? Screen:


Can you fix it? And thanks for the current script :). Thanks for the detailed explanation of what and where I have to set.
 
Back
Top