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

FragReward (TFS 0.2.13)

It doesnt give any errors on console. Its just, nothing happens when one char kill another. There is no reward like it used to be on TFS0.2.11 and previous versions.

I've got this on my creaturescripts.xml:
PHP:
<event type="preparedeath" name="FragReward" script="fragreward.lua"/>

And fragreward.lua:

PHP:
function onPrepareDeath(cid, killer)
if(isPlayer(killer) == TRUE) then
if getPlayerLevel(killer) >= (getPlayerLevel(killer)/2) then
doSetItemSpecialDescription(doPlayerAddItem(killer,5943,1), "This is the heart of "..getPlayerName(cid).."["..getPlayerLevel(cid).."]. He or She was killed by ".. getPlayerName(killer) .."["..getPlayerLevel(killer).."].")
end 
end 
end
 
Last edited:
Try this:
Code:
function onKill(cid, target)
	if(isPlayer(cid) == TRUE) then
		if getPlayerLevel(cid) >= (getPlayerLevel(cid)/2) then
			doSetItemSpecialDescription(doPlayerAddItem(cid,5943,1), "This is the heart of "..getPlayerName(target).."["..getPlayerLevel(target).."]. He or She was killed by ".. getPlayerName(cid) .."["..getPlayerLevel(cid).."].")
		end
	end
end

Code:
<event type="kill" name="FragReward" script="fragreward.lua"/>
 
Back
Top