JDB
OtLand Veteran
- Joined
- Jun 1, 2009
- Messages
- 4,145
- Solutions
- 2
- Reaction score
- 115
The Forgotten Server 0.3.6pl1 - Tested and Working
data/creaturescripts/scripts/login.lua
data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/reward.lua
Changelog:
Code:
[FONT="Palatino Linotype"][B]00:00 You see George's Heart.
It weighs 35.00 oz.
He was killed at level 40 by James who was level 20 at the time. [Unjustified][/B][/FONT]
Code:
[FONT="Palatino Linotype"][B]00:00 You see George's Heart.
It weighs 35.00 oz.
He was killed at level 39 by James who was level 20 at the time. [Justified][/B][/FONT]
data/creaturescripts/scripts/login.lua
PHP:
registerCreatureEvent(cid, "Reward")
data/creaturescripts/creaturescripts.xml
PHP:
<event type="death" name="Reward" event="script" value="reward.lua"/>
data/creaturescripts/scripts/reward.lua
Code:
function onDeath(cid, corpse, deathList)
if isPlayer(cid) then
local v = { killer_name = getCreatureName(deathList[1]), killer_level = getPlayerLevel(deathList[1]), target_name = getCreatureName(cid), target_level = getPlayerLevel(cid) }
local reward = doAddContainerItem(corpse.uid, 5943, 1)
doItemSetAttribute(reward, "description", "" .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed at level " .. v.target_level .. " by " .. v.killer_name .. " who was level " .. v.killer_level .. " at the time. " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "[Unjustified]" or "[Justified]"))
doItemSetAttribute(reward, "name", v.target_name .."'s Heart")
end
return true
end
Changelog:
- Added " at line 5.
Last edited: