• 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 [c++]or [lua] tfs 0.4 Skulls yellow, green, white, red, etc

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
Hello Otland

Well i have edited my source(player.cpp) to avoid get yellow skull or white in case you attack someone
also removed the condition of get red after x ammount of player kills and its working good

PS: you can check the changes in player.cpp or the lines that i have omitted searching for //WAR

https://ghostbin.com/paste/779ku
also im using this lua script to simulate the skull by range system
Lua:
local storage = 4321
function onKill(cid, target)
    local frags = getPlayerStorageValue(cid, storage)
    if(isPlayer(target)) then
        setPlayerStorageValue(cid, storage, frags+1)
        if(frags < 2) then
            doCreatureSetSkullType(cid, SKULL_YELLOW)
        elseif(frags < 4) then
            doCreatureSetSkullType(cid, SKULL_GREEN)
        elseif(frags < 6) then
            doCreatureSetSkullType(cid, SKULL_WHITE)
        elseif(frags > 7) then
            doCreatureSetSkullType(cid, SKULL_RED)
        end
    end
    return true
end

the issue that im having is that player are loosing skull when they log out or if they die

can someone provide me an script to avoid lost on log out?

cheers
 
Solution
@Felipe93
I don't think you will need this one: frag_reset_ondeath.lua
Só, change the skull_login.lua to:

Lua:
local storage = 4321
function onLogin(cid)
    local frags = getPlayerStorageValue(cid, storage)
    if(isPlayer(cid)) then
        if(frags == 1) then
            doCreatureSetSkullType(cid, SKULL_YELLOW)
        elseif(frags >= 2 and frags <= 4) then
            doCreatureSetSkullType(cid, SKULL_GREEN)
        elseif(frags >= 5 and frags <= 6) then
            doCreatureSetSkullType(cid, SKULL_WHITE)
        elseif(frags => 7) then
            doCreatureSetSkullType(cid, SKULL_RED)
        end
    end
    return true
end

And change skull_rewards.lua to:

Lua:
local storage = 4321
function onKill(cid, target)
    local...
edit // sorry admins by the double post well finally i achieved (edit i fact i didn't it was done by @gabriel28)this on older tfs but if someone is looking for this into newest tfs here you got how to do it
all credits goes to @gabriel28 and @StreamSide that ofc helped here too and did it's part in here
the source editions were released here.. and some commits were just experiments made by me.. following old posts :) but well hoperfully this would help someone
anyone that want to achieve this will do it reading this thread.. for newer or older releases
tibia 10.x
maybe a war ot based on tibia 12.. would be fun....
 
Last edited:
Back
Top