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

Pvp-enforced frag system.

Chaos ruler

New Member
Joined
Dec 1, 2008
Messages
73
Reaction score
0
Location
The Netherlands
Hey!

I hope you guys could help me with this.

I want my server to stay Pvp-enforced but! also see frags on someone when you kill it. And not lose frags when you log out. Like: You see blaba. He is a master sorcerer. He has 475 frags. It would be so cool to use that! Also you should still be able to get exp if you kill someone..

How do i script this? Is this a source edit? I have no clue.

Also remember this is a 8.10 ot. So if you post a script or link me to something.. This server doesn't support hard scripts! :(

Well thanks in advance!
 
In new servers it's possible to add that without source editing, but on 8.1 I think you must edit:
player.cpp
Find line with:
PHP:
::getDescription
and then add 'somewhere' script to show 'soul' (soul points) in description of player. In your script that count frags (lua?) add function to add 1 soul point. Set start soul points = 0. Set max. soul points (search this option in vocations.xml file) ~10000

If you know how to compile source (.cpp files), but don't know how to edit you can post link to your player.cpp file in this thread.
 
Lua:
local storage = 9000
 
function onKill(cid, target, lastHit)
	if isPlayer(target) and cid ~= target then
		local frags = math.max(0, getCreatureStorage(cid, storage)) + 1
		setPlayerStorageValue(cid, storage, frags)
		if frags >= 10 then
			doCreatureSetSkullType(cid, SKULL_YELLOW)
		elseif frags >= 20 then
			doCreatureSetSkullType(cid, SKULL_WHITE)
		elseif frags >= 50 then
			doCreatureSetSkullType(cid, SKULL_RED)
		end
	end
	return true
end
 
Set..

Lua:
worldType = "pvp"

Lua:
	rateExperienceFromPlayers = 10

AND..


Lua:
	-- Experience from players
	minLevelThresholdForKilledPlayer = 0.5
	maxLevelThresholdForKilledPlayer = 1.5
 
Last edited:
Back
Top