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

[Need help!!] With loot script

ethernal96

New Member
Joined
Jun 23, 2013
Messages
3
Reaction score
0
I need a script for % chance of loot item for every player who hits at least once a monster.
Example:
Player X Hit Monster Y once
After death of monster Y player X have chance 25% for item Z which will appear in his backpack (not in corpse).

Sorry for bad english.

Tfs 8.54
 
Specific monster like MvP bosses. And there is a problem, becouse im only a mapper in our project, and i really dont know what version of tfs it is. I've asked a server admin about that, but he wasnt sure also xD. Is it a big problem what type of tfs is?
 
Last edited:
Code:
function onDeath(cid, corpse, deathList)
     for x = 1, #deathList do
         if isPlayer(deathList[x]) and math.random(1, 4) == 1 then
             doPlayerAddItem(deathList[x], 2112, 1)
         end
     end
     return true
end
Register the event name in the monster xml script.
Code:
<script>
     <event name="Loot"/>
</script>
 
Back
Top