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

[Request] Icon of Skulls

Sentinel3

New Member
Joined
Oct 16, 2014
Messages
180
Reaction score
0
Hey everyone!!

I just created this thread for know how to set a green skull to player in-game.
I mean this type of skull (
Green_Skull.gif
) behind the name of God.

Like this picture:
Captura_zpsdbb96f57.png


Can I achieve this on my OT?

Using TFS 1.0

Thank you so much for read and I guess that someone know how to do it :D!
 
Last edited:
it's depend on whatever you want
you need it if player done quest with required storage , or if he got certain vocation , or if he got certain group id , or .. etc ..

for example
Code:
if player:getGroup():getId(xx) then -- id xx for God
        player:setSkull(SKULL_GREEN)
else
        player:sendCancelMessage(text) -- replace text for which message you want
end

try this and tell me the result
this is creature script login i think
also don't forgot to register it in login.lua
 
Last edited:
it's depend on whatever you want
you need it if player done quest with required storage , or if he got certain vocation , or if he got certain group id , or .. etc ..

I said that the god should have the skull in-game, so.. I mean with a certain group id!
 
it's depend on whatever you want
you need it if player done quest with required storage , or if he got certain vocation , or if he got certain group id , or .. etc ..

for example
Code:
if player:getGroup():getId(xx) then -- id xx for God
        player:setSkull(SKULL_GREEN)
else
        player:sendCancelMessage(text) -- replace text for which message you want
end

try this and tell me the result
this is creature script login i think
also don't forgot to register it in login.lua
 
Error in console:
HTML:
[Warning - Event::checkScript] Can not load script: scripts/others/login.lua
data/creaturescripts/scripts/others/login.lua:40: 'end' expected (to close 'function' at line 1) near 'local'

Script data/creaturescripts/scripts/others/login.lua
HTML:
function onLogin(player)
    local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    player:registerEvent("PlayerDeath")
    player:registerEvent("bigfootBurdenQuestVesperoth")
    player:registerEvent("bigfootBurdenQuestWarzone")
    player:registerEvent("bigfootBurdenQuestWeeper")
    player:registerEvent("bigfootBurdenQuestWiggler")
    player:registerEvent("bossSummoning")
    player:registerEvent("theNewFrontierQuestShardOfCorruption")
    player:registerEvent("theNewFrontierQuestTirecz")
    player:registerEvent("inServiceOfYalaharQuestsDiseased")
    player:registerEvent("inServiceOfYalaharQuestsMorik")
    player:registerEvent("inServiceOfYalaharQuestsQuara")
    player:registerEvent("inquisitionQuestBosses")
    player:registerEvent("inquisitionQuestUngreez")
    player:registerEvent("killingInTheNameOfQuestKills")
    player:registerEvent("masterVoiceQuest")
    player:registerEvent("elementalspheresquestOverlords")
    player:registerEvent("SvargrondArenaKill")
    player:registerEvent("AdvanceSave")
    player:registerEvent("StorageConversion")
    player:registerEvent("Recompensa")
   
    --Others
    player:stopMove(false)
    return true
       
    local player = Player(cid)
        if player:getGroup():getId(5) then -- id xx for God
            player:setSkull(SKULL_GREEN)
        else
            player:sendCancelMessage(text) -- replace text for which message you want
    end
end
 
Got this in console:
HTML:
Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/login.lua:onLogin
data/creaturescripts/scripts/others/login.lua:3: attempt to index local 'player' (a number value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/others/login.lua:3: in function <data/creaturescripts/scripts/others/login.lua:1>

Script data/creaturescripts/scripts/others/login.lua

HTML:
function onLogin(player)
    local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    player:registerEvent("PlayerDeath")
    player:registerEvent("bigfootBurdenQuestVesperoth")
    player:registerEvent("bigfootBurdenQuestWarzone")
    player:registerEvent("bigfootBurdenQuestWeeper")
    player:registerEvent("bigfootBurdenQuestWiggler")
    player:registerEvent("bossSummoning")
    player:registerEvent("theNewFrontierQuestShardOfCorruption")
    player:registerEvent("theNewFrontierQuestTirecz")
    player:registerEvent("inServiceOfYalaharQuestsDiseased")
    player:registerEvent("inServiceOfYalaharQuestsMorik")
    player:registerEvent("inServiceOfYalaharQuestsQuara")
    player:registerEvent("inquisitionQuestBosses")
    player:registerEvent("inquisitionQuestUngreez")
    player:registerEvent("killingInTheNameOfQuestKills")
    player:registerEvent("masterVoiceQuest")
    player:registerEvent("elementalspheresquestOverlords")
    player:registerEvent("SvargrondArenaKill")
    player:registerEvent("AdvanceSave")
    player:registerEvent("StorageConversion")
    player:registerEvent("Recompensa")
   
    if player:getGroup():getId(xx) then -- id xx for God
        player:setSkull(SKULL_GREEN)
    else
        player:sendCancelMessage(text) -- replace text for which message you want
    end
    --Others
    player:stopMove(false)
    return true
end
 
man i mean create new script inside creaturescripts/scripts
ex : greenskull.lua
And put my script inside it

In creaturescripts.xml
Register it as login event

Them register it like other events on login.lua

Like service of yalahar

Problem i'm using phone xD so i can't give you full details
 
Well I guess that your script is okay, but you have to add:

-> Function:
HTML:
function onLogin(player)

-> A value for player:
HTML:
local player = Player(cid)
 
Back
Top