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

TalkAction Advanced sex system

Cool, but I'll never use it on my server... Sex in tibia? lol. I think I've seen this on some servers. Strange but cool..
 
I made some changes to adapt it to TFS 0.3.6, NOT TESTED
Lua:
local combat = createCombatObject()
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 20, 2000, -10)
setCombatCondition(combat, condition)

function onSay(cid, words, param, channel)

	local sexProposal = getPlayerStorageValue(cid, 66600)
	local sexAccept = cid
	local noCondom = math.random(4)
	local aidsEffect = math.random(3)
	local posDir = getCreatureLookPosition(cid)

	local playerPos = getCreaturePosition(cid)
	local target = getThingfromPos(posDir)
	if isPlayer(target.uid) then
		if getPlayerLookDirection(target.uid) == getPlayerLookDirection(cid) - 2 or getPlayerLookDirection(target.uid) == getPlayerLookDirection(cid) + 2 then
			sameLookDir = true
		else
			sameLookDir = false
		end
		if sameLookDir then
			if getPlayerSex(target.uid) == getPlayerSex(cid) then
				return doPlayerSendCancel(cid, "You cannot make sex with same gender as self, pervert!") and doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			end

			if getPlayerGroupId(cid) > 3 and getPlayerGroupId(cid) >= getPlayerGroupId(target.uid) then
				sexProposal, sexAccept, allowSex = cid, target.uid, true
			elseif target.uid == sexProposal then
				allowSex = true
			else
				allowSex = false
			end

			if allowSex then
				if getCreatureStorage(sexProposal, 66660) > 0 or getPlayerStorageValue(sexAccept, 66660) > 0 then
					doSendAnimatedText(getCreaturePosition(sexProposal), "Ahh, Ahh...", TEXTCOLOR_YELLOW)
					doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_STUN)
					doSendAnimatedText(getThingPos(sexAccept), "Ohh, Ohh!", TEXTCOLOR_TEAL)
					doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_STUN)
					doCreatureSetStorage(sexProposal, 66660, 0)
					doCreatureSetStorage(sexAccept, 66660, 0)
				else
					if noCondom == 3 then
						hurtMessage = "Sex without condoms brings consequences - You just got AIDS!\nYour sickness will hurt alot..."
						partnerMessage = "Sex without condoms brings consequences - Your partner just got AIDS!"
						bothMessage = "Sex without condoms brings consequences - You and Your partner just got AIDS!\nYour sickness will hurt alot..."
						if aidsEffect == 1 then
							proposalMessage, acceptMessage, hurtPlayer = hurtMessage, partnerMessage, sexProposal
						elseif aidsEffect == 2 then
							proposalMessage, acceptMessage, hurtPlayer = partnerMessage, hurtMessage, sexAccept
						else
							proposalMessage, acceptMessage, hurtPlayer = bothMessage, bothMessage, true
						end

						doPlayerSendTextMessage(sexProposal, MESSAGE_STATUS_WARNING, proposalMessage)
						doPlayerSendTextMessage(sexAccept, MESSAGE_STATUS_WARNING, acceptMessage)
						if not hurtPlayer then
							doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(sexProposal))
							doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(sexAccept))
						else
							doSendMagicEffect(getCreaturePosition(hurtPlayer), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(hurtPlayer))
						end
					elseif noCondom == 2 then
						payMessage = "\nAs a good parent You spend whole Your gold for the child."
						if getPlayerSex(sexProposal) == 0 then
							childMother, childFather, motherMsg, fatherMsg = sexProposal, sexAccept, payMessage, ""
						else
							childMother, childFather, motherMsg, fatherMsg = sexAccept, sexProposal, "", payMessage
						end

						doPlayerSendTextMessage(childFather, MESSAGE_STATUS_WARNING, "Sex without condoms brings consequences - " ..getCreatureName(childMother).. " just born a child!" .. fatherMsg)
						doPlayerSendTextMessage(childMother, MESSAGE_STATUS_WARNING, "Sex without condoms brings consequences - You have just born a child! " .. motherMsg)
						doSendMagicEffect(getCreaturePosition(childFather), CONST_ME_FIREWORK_YELLOW)
						doSendMagicEffect(getCreaturePosition(childMother), CONST_ME_FIREWORK_RED)

						childGender = (math.random(2) == 1 and "son" or "daughter")
						doSetItemSpecialDescription(doPlayerAddItem(childMother, 6579, 1), "It is a " .. childGender .. " of " .. getCreatureName(childFather) .. " and " .. getCreatureName(childMother) .. ".")
						doPlayerRemoveMoney(sexProposal, getPlayerMoney(sexProposal))
					else
						doSendAnimatedText(getCreaturePosition(sexProposal), "Ahh, Ahh...", TEXTCOLOR_YELLOW)
						doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_STUN)
						doSendAnimatedText(getThingPos(sexAccept), "Ohh, Ohh!", TEXTCOLOR_TEAL)
						doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_STUN)
					end
					doCreatureSetStorage(sexProposal, 66600, 0)
					doCreatureSetStorage(sexAccept, 66600, 0)
				end
			else
				if getPlayerStorageValue(target.uid, 66600) == cid then
					doPlayerSendCancel(cid, "You have already sent a sex proposal to " ..getCreatureName(target.uid).. ".")
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
				else
					doCreatureSetStorage(target.uid, 66600, cid)
					doPlayerSendTextMessage(cid, 22, "You have sent a sex proposal to " ..getCreatureName(target.uid).. ".")
					doPlayerSendTextMessage(target.uid, 22, getCreatureName(cid).. " wants to have a sex with You.")
					doSendMagicEffect(getCreaturePosition(target.uid), CONST_ME_HEARTS)
				end
			end
		else
			doPlayerSendCancel(cid, "You must stand after your partner to do sex.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You may do sex only with players.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end
 
I made some changes to adapt it to TFS 0.3.6, NOT TESTED
Lua:
local combat = createCombatObject()
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 20, 2000, -10)
setCombatCondition(combat, condition)

function onSay(cid, words, param, channel)

	local sexProposal = getPlayerStorageValue(cid, 66600)
	local sexAccept = cid
	local noCondom = math.random(4)
	local aidsEffect = math.random(3)
	local posDir = getCreatureLookPosition(cid)

	local playerPos = getCreaturePosition(cid)
	local target = getThingfromPos(posDir)
	if isPlayer(target.uid) then
		if getPlayerLookDirection(target.uid) == getPlayerLookDirection(cid) - 2 or getPlayerLookDirection(target.uid) == getPlayerLookDirection(cid) + 2 then
			sameLookDir = true
		else
			sameLookDir = false
		end
		if sameLookDir then
			if getPlayerSex(target.uid) == getPlayerSex(cid) then
				return doPlayerSendCancel(cid, "You cannot make sex with same gender as self, pervert!") and doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			end

			if getPlayerGroupId(cid) > 3 and getPlayerGroupId(cid) >= getPlayerGroupId(target.uid) then
				sexProposal, sexAccept, allowSex = cid, target.uid, true
			elseif target.uid == sexProposal then
				allowSex = true
			else
				allowSex = false
			end

			if allowSex then
				if getCreatureStorage(sexProposal, 66660) > 0 or getPlayerStorageValue(sexAccept, 66660) > 0 then
					doSendAnimatedText(getCreaturePosition(sexProposal), "Ahh, Ahh...", TEXTCOLOR_YELLOW)
					doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_STUN)
					doSendAnimatedText(getThingPos(sexAccept), "Ohh, Ohh!", TEXTCOLOR_TEAL)
					doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_STUN)
					doCreatureSetStorage(sexProposal, 66660, 0)
					doCreatureSetStorage(sexAccept, 66660, 0)
				else
					if noCondom == 3 then
						hurtMessage = "Sex without condoms brings consequences - You just got AIDS!\nYour sickness will hurt alot..."
						partnerMessage = "Sex without condoms brings consequences - Your partner just got AIDS!"
						bothMessage = "Sex without condoms brings consequences - You and Your partner just got AIDS!\nYour sickness will hurt alot..."
						if aidsEffect == 1 then
							proposalMessage, acceptMessage, hurtPlayer = hurtMessage, partnerMessage, sexProposal
						elseif aidsEffect == 2 then
							proposalMessage, acceptMessage, hurtPlayer = partnerMessage, hurtMessage, sexAccept
						else
							proposalMessage, acceptMessage, hurtPlayer = bothMessage, bothMessage, true
						end

						doPlayerSendTextMessage(sexProposal, MESSAGE_STATUS_WARNING, proposalMessage)
						doPlayerSendTextMessage(sexAccept, MESSAGE_STATUS_WARNING, acceptMessage)
						if not hurtPlayer then
							doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(sexProposal))
							doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(sexAccept))
						else
							doSendMagicEffect(getCreaturePosition(hurtPlayer), CONST_ME_YELLOW_RINGS)
							doCombat(0, combat, numberToVariant(hurtPlayer))
						end
					elseif noCondom == 2 then
						payMessage = "\nAs a good parent You spend whole Your gold for the child."
						if getPlayerSex(sexProposal) == 0 then
							childMother, childFather, motherMsg, fatherMsg = sexProposal, sexAccept, payMessage, ""
						else
							childMother, childFather, motherMsg, fatherMsg = sexAccept, sexProposal, "", payMessage
						end

						doPlayerSendTextMessage(childFather, MESSAGE_STATUS_WARNING, "Sex without condoms brings consequences - " ..getCreatureName(childMother).. " just born a child!" .. fatherMsg)
						doPlayerSendTextMessage(childMother, MESSAGE_STATUS_WARNING, "Sex without condoms brings consequences - You have just born a child! " .. motherMsg)
						doSendMagicEffect(getCreaturePosition(childFather), CONST_ME_FIREWORK_YELLOW)
						doSendMagicEffect(getCreaturePosition(childMother), CONST_ME_FIREWORK_RED)

						childGender = (math.random(2) == 1 and "son" or "daughter")
						doSetItemSpecialDescription(doPlayerAddItem(childMother, 6579, 1), "It is a " .. childGender .. " of " .. getCreatureName(childFather) .. " and " .. getCreatureName(childMother) .. ".")
						doPlayerRemoveMoney(sexProposal, getPlayerMoney(sexProposal))
					else
						doSendAnimatedText(getCreaturePosition(sexProposal), "Ahh, Ahh...", TEXTCOLOR_YELLOW)
						doSendMagicEffect(getCreaturePosition(sexProposal), CONST_ME_STUN)
						doSendAnimatedText(getThingPos(sexAccept), "Ohh, Ohh!", TEXTCOLOR_TEAL)
						doSendMagicEffect(getCreaturePosition(sexAccept), CONST_ME_STUN)
					end
					doCreatureSetStorage(sexProposal, 66600, 0)
					doCreatureSetStorage(sexAccept, 66600, 0)
				end
			else
				if getPlayerStorageValue(target.uid, 66600) == cid then
					doPlayerSendCancel(cid, "You have already sent a sex proposal to " ..getCreatureName(target.uid).. ".")
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
				else
					doCreatureSetStorage(target.uid, 66600, cid)
					doPlayerSendTextMessage(cid, 22, "You have sent a sex proposal to " ..getCreatureName(target.uid).. ".")
					doPlayerSendTextMessage(target.uid, 22, getCreatureName(cid).. " wants to have a sex with You.")
					doSendMagicEffect(getCreaturePosition(target.uid), CONST_ME_HEARTS)
				end
			end
		else
			doPlayerSendCancel(cid, "You must stand after your partner to do sex.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	else
		doPlayerSendCancel(cid, "You may do sex only with players.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end

check that code again it will not work.
Edit:
nvm you fixed it! :p
 
ehh, what about gay sex? or lesbian ;> you need some tolerance to homosexual people =D
 
Back
Top