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

Script Tiles

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
283
Solutions
3
Reaction score
123
Location
Exive me
GitHub
none
I need script of tile only for males and other for females

Code:
function onStepIn(cid)
 if item.actionid == 123456 and if getPlayerSex(cid) == 0 then

Warning mensage
MESSAGE_STATUS_CONSOLE_BLUE,"you dont are male to pass")

 if item.actionid == 654321 and if getPlayerSex(cid) == 1 then

Warning mensage
MESSAGE_STATUS_CONSOLE_BLUE,"you dont are female to pass")
        end
        return true
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
local gender = item.actionid - 186
local checkCreature = {isPlayer, isMonster, isNpc}
local function pushBack(cid, position, fromPosition, displayMessage)
	doTeleportThing(cid, fromPosition, false)
	doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
	if(displayMessage) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected against unwanted intruders.")
	end
end
	if(isInArray({PLAYERSEX_FEMALE,  PLAYERSEX_MALE, PLAYERSEX_GAMEMASTER}, gender)) then
		if(gender ~= getPlayerSex(cid)) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

If you are using a newer version of TFS, all of this is in your tiles.xml
 
Back
Top