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

Solved Players dont loss eq when die :/

Xarly

Member
Joined
Mar 9, 2015
Messages
360
Reaction score
20
Hello guys we got a problem, the players only loss the bacpack when they die, so if someone can help me please for fix it>.< i want to loss eq too thanks in advance
 
tried this script droploot.lua but not working if someone can fix it for tfs 1.0 thanks ppl
function onDeath(player, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
if getPlayerFlagValue(player, PlayerFlag_NotGenerateLoot) or player:getVocation():getId() == VOCATION_NONE then
return true
end
local amulet = player:getSlotItem(CONST_SLOT_NECKLACE)
if amulet and amulet.itemid == ITEM_AMULETOFLOSS and not isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) then
local isPlayer = false
if killer:isPlayer() then
isPlayer = true
else
local master = killer:getMaster()
if master and master:isPlayer() then
isPlayer = true
end
end
if not isPlayer or isPlayer and not player:hasBlessing(6) then
player:removeItem(ITEM_AMULETOFLOSS, 1, -1, false)
end
else
local corpse = Container(corpse)
for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do
local item = player:getSlotItem(i)
if item then
if isInArray({SKULL_RED, SKULL_BLACK}, player:getSkull()) or math.random(1, item:isContainer() and 100 or 1000) <= player:getLossPercent() then
item:moveTo(corpse)
end
end
end
end
if not player:getSlotItem(CONST_SLOT_BACKPACK) then
player:addItem(ITEM_BAG, 1, false, CONST_SLOT_BACKPACK)
end
return true
end
 
K8sVGVc.png

in database ?
 
K8sVGVc.png

in database ?
where i check it exactly on players? if u can let me know how i find it exactly bro
EDIT: well if i remember i used another otserver with the same database and they loss eq so its a problem with something on the source or the ot.... please someone help!!!
 
Last edited:
where i check it exactly on players? if u can let me know how i find it exactly bro
EDIT: well if i remember i used another otserver with the same database and they loss eq so its a problem with something on the source or the ot.... please someone help!!!
In my DB dont have this lines, Xarly these lines you'll find in players in your db, but in my db dont have this lines..

PS: I believe also the sources is something related
 
Wason thx bro, really need help, tfs 1.0 unfortunately does not have much support yet :/
bro change on player.cpp
Change
Code:
if (playerSkull == SKULL_RED || playerSkull == SKULL_BLACK || uniform_random(1, (item->getContainer() ? 100 : 10000000)) <= getDropPercent()) {

to
Code:
if (playerSkull == SKULL_RED || playerSkull == SKULL_BLACK || uniform_random(1, (item->getContainer() ? 100 : 1000)) <= getDropPercent()) {


special thanks to ninja who gived the code
 
bro change on player.cpp
Change
Code:
if (playerSkull == SKULL_RED || playerSkull == SKULL_BLACK || uniform_random(1, (item->getContainer() ? 100 : 10000000)) <= getDropPercent()) {

to
Code:
if (playerSkull == SKULL_RED || playerSkull == SKULL_BLACK || uniform_random(1, (item->getContainer() ? 100 : 1000)) <= getDropPercent()) {


special thanks to ninja who gived the code
Okay will try it, thx @Ninja for support!
 
Back
Top