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

Lua A command to be invisible for monsters

Maxwel1

Legend Of Everything
Joined
Feb 3, 2009
Messages
196
Reaction score
1
Location
In The Jungle
Code:
local invisible = createConditionObject(CONDITION_GAMEMASTER, 100000, true, GAMEMASTER_INVISIBLE)

function onSay(cid, words, param, channel)
if getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) ~= true and doPlayerRemoveSoul(cid, 1) then
doAddCondition(cid, invisible)
else
	
	doPlayerSendCancel(cid,"You already invisible now or you dont have enough soul to use that command.") 
	end

	return true
end


just be invisible for monsters only not players too so any idea to modify that thing?
 
Use utana vid as the script? Or.. what do you mean? xd

He mean that this should be that type of Invisible that even a Demon can't see you..

hmm, as I can see this is will be a Invisible + Add Ignored by monsters..

etc "SetPlayerFlags (cid, -something-)... check if you got some familiar function in your server,

don't forgett to check for "Duration" somkething...


Edit: Else you have to go scores edit... add a "Power Invisible" or something..
 
I highly doubt this will work, but try it. :thumbup:

Lua:
local invisTime = 60 -- Seconds
local condition = createConditionObject(GAMEMASTER_INVISIBLE)
function onSay(cid, words, param)
    if (param == "") then
	doPlayerSendCancel(cid, "That is an incorrect param.")
    return TRUE
    end
    if getCreatureCondition(cid, condition) == TRUE then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are alreaday invisible.")
    else
	doAddCondition(cid, condition, invisTime * 1000)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are now COMPLETELY invisible for ".. invisTime .." seconds.") 
    end
    return TRUE
end
 
Thanks but no it didn't

1st this talkaction don need param.

2nd the problem not in the script. it's the gamemaster_invisible (sub condition) itself. so it's source problem or actually when i took a look in the source i fond i need to add game master invisible flag too the player (Not sure)

3rd What i need in this script simply is that the player be invisible for all other normal playrs and monsters at the same time. for a period of time.

anywayz thanks alot and wish sumone can help me ^^

MaXwEl
 
@Max,
You can make a special group,
then make a "Talkaction" that assigns that player,
the new group for X amount of time.
 

Similar threads

Back
Top