• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Cool Sex System

@lajnusen
Change this line
Code:
doSetItemSpecialDescription(child,'It is a son of '..getCreatureName(cid)..' and '..getCreatureName(target.uid)..'.')
to this
Code:
doSetItemSpecialDescription(doPlayerAddItem(cid,ITEM_CHILD, 1),'It is a son of '..getCreatureName(cid)..' and '..getCreatureName(target.uid)..'.')
 
cool i don't get aids why? only chield cool

can you add for get son only with sex 1 and 0

sex 1 and 1 no can't get son

sex 0 and 0 no can't get son \o/
 
I can't get it to work the creator of the script need to fix it...
it would be nice to see it. :)
 
Here is full working script.

Here is a full working script without erros!

Code:
local ITEM_CONDON = 6527
local ITEM_GOLD = 2148
local ITEM_PLATINUM = 2152
local ITEM_CRYSTAL = 2160
local ITEM_CHILD = 6579
local damage = 50
local times = 50
local noCondon = math.random(1,4)


local combat = createCombatObject()
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, times, 100, -damage)
setCombatCondition(combat, condition)

function onSay(cid, words, param)
	local playerPos = getCreaturePosition(cid)
	if (getPlayerLookDir(cid) == 1) then 
		target = {x = playerPos.x + 1, y = playerPos.y, z = playerPos.z, stackpos = 253}
	elseif (getPlayerLookDir(cid) == 2) then
		target = {x = playerPos.x, y = playerPos.y + 1, z = playerPos.z, stackpos = 253}
	elseif (getPlayerLookDir(cid) == 3) then
		target = {x = playerPos.x - 1, y = playerPos.y, z = playerPos.z, stackpos = 253}
	else
		target = {x = playerPos.x, y = playerPos.y - 1, z = playerPos.z, stackpos = 253}
	end
	target = getThingfromPos(target)
	if (isPlayer(target.uid) == TRUE) then
		if (getPlayerLookDir(target.uid) == getPlayerLookDir(cid)) then
			if (getPlayerItemCount(cid, ITEM_CONDON) > 0) then
				doSendAnimatedText(playerPos, 'Craw!!!', TEXTCOLOR_GOLD)
				doSendAnimatedText(getThingPos(target.uid), 'Oh God!!', TEXTCOLOR_CRYSTAL)
				doPlayerRemoveItem(cid, ITEM_CONDON, 1)
			else
				if (noCondon < 3) then
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You got AIDS!')
					doCombat(0,combat,numberToVariant(cid))
				else
					doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You got a child!')
					local child = doPlayerAddItem(ITEM_CHILD, 1)
			doSetItemSpecialDescription(doPlayerAddItem(cid,ITEM_CHILD, 1),'It is a son of '..getCreatureName(cid)..' and '..getCreatureName(target.uid)..'.')
					local gps = getPlayerItemCount(cid, ITEM_GOLD)
					local pcs = getPlayerItemCount(cid, ITEM_PLATINUM)
					local ccs = getPlayerItemCount(cid, ITEM_CRYSTAL)
					if (gps > 0 or pcs > 0 or ccs > 0) then
						doPlayerRemoveItem(cid, ITEM_GOLD, gps)
						doPlayerRemoveItem(cid, ITEM_PLATINUM, pcs)
						doPlayerRemoveItem(cid, ITEM_CRYSTAL, ccs)
					else
						return TRUE
					end
				end
			end
		else
			return TRUE
		end
	else
		return TRUE
	end
	return FALSE
end

Then add this i talkactions.xml

Code:
<talkaction words="!sex" script="sex.lua"/>

Give Nostradamus_ Reps for this nice script. :)
 
Rep for you, Nostradamus_.
I have improved the script a little bit, so it may be more 'real' (eg. You may not do it with same gender, female borns the child, etc =p).
If someone would want it, leave a message or send PM and ill post it =)
 
Back
Top