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

Change Gender

Strashni

minera.servegame.com
Joined
May 10, 2009
Messages
230
Reaction score
0
Location
Montenegro
Hi,i was using search...but didn't find..

i need script for change sec/gender..!changesex ...
 
if you use tfs 0.3.5
add this in mods make file named
changender_command.xml


Lua:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
	<description>
		This mod will add new command for players - !sex.
		Players will be able to change gender, cost can be configured.
	</description>

	<config name="changender_config"><![CDATA[
		config = {
			costPremiumDays = 3
		}
	]]></config>
	<talkaction words="!sex" event="buffer"><![CDATA[
		domodlib('changender_config')
		if(getPlayerSex(cid) >= 2) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
			return
		end

		if(getPlayerPremiumDays(cid) < config.costPremiumDays) then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time - changing gender costs " .. config.costPremiumDays .. " premium days.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			return
		end

		if(getPlayerPremiumDays(cid) < 65535) then
			doPlayerAddPremiumDays(cid, -config.costPremiumDays)
		end

		doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.costPremiumDays .. " days of premium time.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
	]]></talkaction>
</mod>
 
Back
Top