• 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 Soul = Frag?

Demnish

Tibian Hero
Joined
Sep 28, 2011
Messages
402
Solutions
2
Reaction score
65
Location
Sweden
Is there any way to change so that soul is gained when you kill someone and lost with frag delay?

Example:
I have killed 100 players, now I have 100 soul and redskull, after 6 hours I lose 1 soul.

Simply put; Soul = Frags.


SOLVED
Yes, there's a way to do that. You'll need to set soul gain ticks to 0, soul gain to 0 and create creaturescripts for that, using onKill and so on. As well as the every 6hour thing that can be done in a lot of ways.
 
Last edited:
Yes, there's a way to do that. You'll need to set soul gain ticks to 0, soul gain to 0 and create creaturescripts for that, using onKill and so on. As well as the every 6hour thing that can be done in a lot of ways.
 
Do you have any idea on the creaturescript? I've already set my soul ticks and gain to 0.

Thank you for your reply :)
 
Quick example for tfs 1.0


Code:
function onKill(cid, target, damage, flags)
if isPlayer(target) == true then
player:addSoul(1)
position:sendMagicEffect(CONST_ME_MAGIC_BLUE, cid)
end
return true
end
 
I seen it is SOLVED?

You have script that works or are you still needing help, you get the idea though right?
 
I put it on SOLVED because I think I can manage it myself with what information you guys gave me, but if you do have code for it, please post it. :)
 
Quick example for tfs 1.0


Code:
function onKill(cid, target, damage, flags)
if isPlayer(target) == true then
player:addSoul(1)
position:sendMagicEffect(CONST_ME_MAGIC_BLUE, cid)
end
return true
end
have adapted for 1.5 but is not working can somebody help?
Lua:
local killevent = CreatureEvent("PVP Reward2")

function killevent.onKill(player, target)
if target:isPlayer() then
player:addSoul(1)
--position:sendMagicEffect(CONST_ME_MAGIC_BLUE, cid)
end
return true
end
killevent:register()

local login = CreatureEvent("PVP Reward2")

function login.onLogin(player)
    player:registerEvent("PVP Reward2")
    return true
end
 
Lua:
local cfg = {
sendMagicEffect = { enabled = true, value = CONST_ME_MAGIC_BLUE }
}

local killevent = CreatureEvent("PVP Reward2")
function killevent.onKill(player, target)
if target:isPlayer() then
player:addSoul(1)
   if cfg.sendMagicEffect.enabled then
      local pos = player:getPosition()
      pos:sendMagicEffect(cfg.sendMagicEffect.value)
   end
end
return true
end
killevent:register()

local login = CreatureEvent("onLogin_pvpReward")
function login.onLogin(player)
    player:registerEvent("PVP Reward2")
    return true
end
 
Back
Top