• 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] Total invisibility [SOLVED]

Serginov

Onkonkoronkonk
Joined
Jun 28, 2008
Messages
1,321
Reaction score
18
Location
Sweden - Dalarna
Solved the invisibility problem ;p
Now it's just this part;
Solved this part too ;p Just had to add cid;p
addEvent(removeInvisible, cfg.invisible_time * 1000, cid)
Code:
function removeInvisible(cid)
    doCreatureExecuteTalkAction(cid, "/ghost", true)
end
function cd(cid)
    setPlayerStorageValue(cid, cfg.invisible_onCooldown, 0)
end

addEvent(cd, cfg.invisible_cooldown * 1000)
addEvent(removeInvisible, cfg.invisible_time * 1000)
(not the whole script ;p just the addEvent part, as that is the part failing ;s)
Code:
[Error - TalkAction Interface]
In a timer event called from:
data/talkactions/scripts/kill streaks/features.lua:onSay
Description:
(luaDoCreatureSetStorage) Creature not found

[Error - TalkAction Interface]
In a timer event called from:
data/talkactions/scripts/kill streaks/features.lua:onSay
Description:
(luaDoCreatureExecuteTalkaction) Creature not found
 
Last edited:
I can't get the invisibsibility to work ;s Thought it was fixed, but not ;/
Code:
elseif cfg.useInvisibility and words == "!stealth" then
        if getPlayerStorageValue(cid, cfg.kills) >= cfg.invisible_reqKills then
            if getPlayerStorageValue(cid, cfg.invisible_onCooldown) < 1 then
                if getPlayerStorageValue(cid, cfg.invisible_chargeStorage) >= 1 then
                    setPlayerGroupId(cid, 7)
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You used one charge of your invisible skill. You now have " .. getPlayerStorageValue(cid, cfg.invisible_chargeStorage) .. " charges left.")
                    setPlayerStorageValue(cid, cfg.invisible_onCooldown, os.time() + (cfg.invisible_cooldown * 1000))
                    [COLOR=Red]doCreatureExecuteTalkAction(cid, "/ghost", true)[/COLOR]
                    addEvent(invisible, cfg.invisible_time * 1000)
                    if cfg.invisible_useCharges then
                        setPlayerStorageValue(cid, cfg.replenish_chargeStorage, getPlayerStorageValue(cid, cfg.replenish_chargeStorage)-1)
                    end
                else
                    doPlayerSendCancel(cid, "You don't have any charges left!")
                end
            else
                doPlayerSendCancel(cid, "You have to wait " .. cfg.invisible_cooldown .. " seconds until you can use the invisibility skill again!")
            end
        else
            doPlayerSendCancel(cid, "You need " .. cfg.invisible_reqKills .. " kills to use the invisibility skill.")
        end
    else
        doPlayerSendCancel(cid, "This ability have been disabled by the admin.")
    end
Said like "Ghost cannot be executed by a player with a special, invisibility flag." something like that. and I can't fix it ;s
 
Why should I add a storage to an invisible player? The only storage needed is onCooldown storage, so you can't spam the skill

EDIT; OOH I think i found what's wrong xD
wait!

EDIT2; nop didn't work

EDIT3; :O didn't notice before, but i get an error in console;
Code:
[Error - TalkAction Interface]
In a timer event called from:
scriptPath/blabla.lua:onSay
Description:
(luaDoCreatureExecuteTalkaction) Creature not found
"15:22 Command disabled for players with special, invisibility flag."
 
Last edited:
Solved the invisibility problem ;p
Now it's just this part;
Code:
function removeInvisible(cid)
    doCreatureExecuteTalkAction(cid, "/ghost", true)
end
function cd(cid)
    setPlayerStorageValue(cid, cfg.invisible_onCooldown, 0)
end

addEvent(cd, cfg.invisible_cooldown * 1000)
addEvent(removeInvisible, cfg.invisible_time * 1000)
(not the whole script ;p just the addEvent part, as that is the part failing ;s)
Code:
[Error - TalkAction Interface]
In a timer event called from:
data/talkactions/scripts/kill streaks/features.lua:onSay
Description:
(luaDoCreatureSetStorage) Creature not found

[Error - TalkAction Interface]
In a timer event called from:
data/talkactions/scripts/kill streaks/features.lua:onSay
Description:
(luaDoCreatureExecuteTalkaction) Creature not found
 
Last edited:
Back
Top