• 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:
<group id="7" name="invisPlayer" flags="70368744177664"/> (total invisibility, in Player flags)

Will a player be invis all the time with that flag

EDIT; WOPS SORRI FOR DOPPEL POST

EDIT2; It should be setPlayerGroupId(cid, Group Id here), right? ;p

EDIT3;
Code:
local invisible_time = 25
setPlayerStorageValue(cid, cfg.invisible_storageActive, [COLOR=Red]os.time() + (invisible_time * 1000[/COLOR]))
is the red part correct? ;p Will it be 25 seconds?
 
Last edited:
ye, but then you need event which checks if time has expired, every 1 sec :p

it's better to only use 1 event that 'ends' the invisibility by changing the group ID.
 
I already figured that part out ;p

Code:
    if getPlayerStorageValue(cid, cfg.invisible_storageActive) < 1 and getPlayerGroupId(cid) == 7 then
        for _, pEffect in ipairs(getOnlinePlayers()) do
            setPlayerGroupId(cid, 1)
        end
    end
 
I already figured that part out ;p

Code:
    if getPlayerStorageValue(cid, cfg.invisible_storageActive) < 1 and getPlayerGroupId(cid) == 7 then
        for _, pEffect in ipairs(getOnlinePlayers()) do
            setPlayerGroupId(cid, 1)
        end
    end
wtf, why do you loop through all players just to set player's group id to 1
 
Code:
function onThink(interval)
	for _, player in ipairs(getPlayersOnline()) do
		if(exhaustion.get(player, ur_storage) == false) then
			doPlayerSetGroupId(player, 1)
		end
	end
	return true
end

Then in your script:
Code:
exhaustion.set(cid, storage, 25)
 
because it's a global event xD and it's more other stuff in the global event too so i don't use creaturescript onthink ;P

aaaaand
I get some stupid shitty errors when i kill someone..;
cpcpccppcp.jpg

Trying to finish my kill streak script, will be so awesome xD
 
Back
Top