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

TFS 0.X players don't score frags when killing character that has custom aol

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
49
I'm using tfs 0.4 and this custom aol
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == true then
if (getPlayerSlotItem(cid, 2).itemid == 10133) then
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
return TRUE
end
end
return TRUE
end
and it works great, but if I kill someone who's using this aol, I don't get any frags which is kinda bad, how can I fix this?
edit: I just realized no frags are being counted at all, I already checked my config.lua for useFragHandler, deathListEnabled and etc and everythign seems fine, I don't think there's anything wrong with my creaturescripts either
 
Last edited:
This script works properly I just tested it, Check your config.lua and enable
LUA:
useFragHandler = true
advancedFragList = true
 
yeah wtf I tested with other character and it worked?? wtf
this one doesn't coutn frags tho since the player doesn't "die", cann ya help?
LUA:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)

if isPlayer(cid) and getPlayerSlotItem(cid, 2).itemid == 10134 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doCreatureAddHealth(cid, getCreatureMaxHealth(cid), 65535, 256, true)
doCreatureAddMana(cid, getCreatureMaxMana(cid))
doRemoveConditions(cid, false)
return false
end
return true

end
 
I think this will require source edits not sure if it can be done through Lua since your script disables death and only teleports players to temple.
No dead body/No frags/No EXP gained (if using it)
and also you'll have to add
doRemoveCondition(cid, CONDITION_INFIGHT)
and
doCreatureSetSkullType(cid, 0)
I am not sure how to do the source edits, I ran out of ideas hope someone else can help you.
 
I remember I had the first aol with one extra line that was
LUA:
doPlayerSetLossPercent(cid, experience, 0)
but the guy would go to level 1 when he died, isn't there a way to fix this?
 
That will get conflicted with blessing system so you'll have to set eachBlessReduction = 0 but blessing will be useless.
 
Back
Top