• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Skull drop

AnarchGov

Member
Joined
Oct 3, 2011
Messages
263
Reaction score
6
This scriptmakes a player loot a skull with their name, level and who they were killed buy when they are fragged by another play. The problem is: The script works, but once you move the skull outside of the dead body...it goes back to saying it is just a skull and no longer says the info about the frag.

LUA:
function onDeath(cid, corpse, deathList)
 if isPlayer(cid) and isPlayer(deathList[1]) 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, 2320, 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 Skull")
 end
 return true
end


REP++
 
Last edited:
Back
Top