Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Talkactions] Seks w Tibii


Inkubator

Rekomendowane odpowiedzi

Opublikowano

Wchodzimy w folder "talkactions/scripts" i w nim tworzymy plik "sex.lua", później wklejamy do niego to co w code:

 

local aidsCombat = createCombatObject()
local aidsCondition = createConditionObject(CONDITION_DROWN)
setConditionParam(aidsCondition, CONDITION_PARAM_DELAYED, 2)
addDamageCondition(aidsCondition, 10, 3000, -20)
setCombatCondition(aidsCombat, aidsCondition)

function onSay(cid, words, param)
local sex = {
limit = 30, -- co jaki czas można 'robić' sex
proposal = getPlayerStorageValue(cid, 30020),
accept = cid,
randomity = math.random(100),
effect = math.random(3),
child = 5,
aids = 80
}

local targetPos = getPlayerLookPos(cid)
targetPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local target = getThingfromPos(targetPos)

if isPlayer(target.uid) == TRUE then
local lookDir = FALSE
if getPlayerLookDir(target.uid) == getPlayerLookDir(cid)-2 then
lookDir = TRUE
elseif getPlayerLookDir(target.uid) == getPlayerLookDir(cid)+2 then
lookDir = TRUE
end
if lookDir == TRUE then
if getPlayerSex(target.uid) == getPlayerSex(cid) then
doPlayerSendCancel(cid, 'You cannot make sex with same gender as self, pervert!')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
if target.uid == sex.proposal then
if os.time(t) > getPlayerStorageValue(sex.proposal, 30021) and os.time(t) > getPlayerStorageValue(sex.accept, 30021) then
if getPlayerStorageValue(sex.proposal, 30022) > 0 or getPlayerStorageValue(sex.accept, 30022) > 0 then
doSendAnimatedText(getCreaturePosition(sex.proposal), 'Ahh, Ahh...', TEXTCOLOR_YELLOW)
doSendAnimatedText(getThingPos(sex.accept), 'Ohh, Ohh!', TEXTCOLOR_TEAL)

doSendMagicEffect(getPlayerPosition(sex.proposal),CONST_ME_STUN)
doSendMagicEffect(getPlayerPosition(sex.accept),CONST_ME_STUN)

setPlayerStorageValue(sex.proposal, 30022, 0)
setPlayerStorageValue(sex.accept, 30022, 0)
else
if sex.aids ~= 100 and sex.randomity >= sex.aids then
local returns = {
hurt = 'Sex without condoms brings consequences - You just got AIDS!\nYour sickness will hurt alot...',
partner = 'Sex without condoms brings consequences - Your partner just got AIDS!',
both = 'Sex without condoms brings consequences - You and Your partner just got AIDS!\nYour sickness will hurt alot...'
}
local aids = {
proposal = returns.both,
accept = returns.both,
player = FALSE
}

if sex.effect == 1 then
aids.proposal = returns.hurt
aids.accept = returns.partner
aids.player = sex.proposal
elseif sex.effect == 2 then
aids.proposal = returns.partner
aids.accept = returns.hurt
aids.player = sex.accept
end
doPlayerSendTextMessage(sex.proposal, MESSAGE_STATUS_WARNING, aids.proposal)
doPlayerSendTextMessage(sex.accept, MESSAGE_STATUS_WARNING, aids.accept)

if aids.player == FALSE then
doSendMagicEffect(getPlayerPosition(sex.proposal), CONST_ME_YELLOW_RINGS)
doSendMagicEffect(getPlayerPosition(sex.accept), CONST_ME_YELLOW_RINGS)
doCombat(0, aidsCombat, numberToVariant(sex.proposal))
doCombat(0, aidsCombat, numberToVariant(sex.accept))
else
doSendMagicEffect(getPlayerPosition(aids.player), CONST_ME_YELLOW_RINGS)
doCombat(0, aidsCombat, numberToVariant(aids.player))
end
elseif sex.randomity <= sex.child then
local child = {
mother = sex.proposal,
father = sex.accept,
motherMsg = '\nAs a good parent You spend whole Your gold for the child.',
fatherMsg = "",
payEr = sex.proposal
}

if getPlayerSex(sex.proposal) == 1 then
child.fatherMsg = child.motherMsg
child.payEr = child.father
child.mother = sex.accept
child.father = sex.proposal
child.motherMsg = ""
end

doPlayerSendTextMessage(child.father, MESSAGE_STATUS_WARNING, 'Sex without condoms brings consequences - '..getCreatureName(child.mother)..' just born a child!' .. child.fatherMsg)
doPlayerSendTextMessage(child.mother, MESSAGE_STATUS_WARNING, 'Sex without condoms brings consequences - You have just born a child!' .. child.motherMsg)
doSendMagicEffect(getPlayerPosition(child.father), CONST_ME_FIREWORK_YELLOW)
doSendMagicEffect(getPlayerPosition(child.mother), CONST_ME_FIREWORK_RED)
doPlayerRemoveMoney(child.payEr, getPlayerMoney(child.payEr))

local returns = {
item = doPlayerAddItem(child.mother, 6579, 1),
gender = "daughter"
}
if math.random(2) == 1 then
returns.gender = "son"
end
doSetItemSpecialDescription(returns.item, 'It is a '..returns.gender..' of '..getCreatureName(child.father)..' and '..getCreatureName(child.mother)..'.')
else
doSendAnimatedText(getCreaturePosition(sex.proposal), 'Ahh, Ahh...', TEXTCOLOR_YELLOW)
doSendMagicEffect(getPlayerPosition(sex.proposal),CONST_ME_STUN)
doSendAnimatedText(getThingPos(sex.accept), 'Ohh, Ohh!', TEXTCOLOR_TEAL)
doSendMagicEffect(getPlayerPosition(sex.accept),CONST_ME_STUN)
end
end

setPlayerStorageValue(sex.proposal, 30020, 0)
setPlayerStorageValue(sex.accept, 30020, 0)
setPlayerStorageValue(sex.proposal, 30021, (os.time(t) + sex.limit))
setPlayerStorageValue(sex.accept, 30021, (os.time(t) + sex.limit))
else
doPlayerSendCancel(cid, 'You can not have sex more than once per ' .. sex.limit.. ' seconds.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
if getPlayerStorageValue(target.uid, 30020) == cid then
doPlayerSendCancel(cid, 'You have already sent a sex proposal to '..getCreatureName(target.uid)..'.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
else
setPlayerStorageValue(target.uid, 30020, cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You have sent a sex proposal to '..getCreatureName(target.uid)..'.')
doPlayerSendTextMessage(target.uid, MESSAGE_INFO_DESCR, getCreatureName(cid)..' wants to have a sex with You.')
doSendMagicEffect(getPlayerPosition(target.uid), CONST_ME_HEARTS)
end
end
end
else
doPlayerSendCancel(cid, 'You must stand after your partner to have a sex.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, 'You may have sex only with players.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return FALSE
end

 

 

 

W "talkactions/talkactions.xm" dodajemy linijkę:

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

 

 

Do global.lua dodajemy:

 

function getPlayerLookPos(cid)
       return getPosByDir(getThingPos(cid), getPlayerLookDir(cid))
end

function getPosByDir(basePos, dir)
       local pos = basePos
       if(dir == NORTH) then
               pos.y = pos.y-1
       elseif(dir == SOUTH) then
               pos.y = pos.y + 1
       elseif(dir == WEST) then
               pos.x = pos.x-1
       elseif(dir == EAST) then
               pos.x = pos.x+1
       elseif(dir == NORTHWEST) then
               pos.y = pos.y-1
               pos.x = pos.x-1
       elseif(dir == NORTHEAST) then
               pos.y = pos.y-1
               pos.x = pos.x+1
       elseif(dir == SOUTHWEST) then
               pos.y = pos.y+1
               pos.x = pos.x-1
       elseif(dir == SOUTHEAST) then
               pos.y = pos.y+1
               pos.x = pos.x+1
       end
       return pos
end

function getPlayerMoney(cid)
       return ((getPlayerItemCount(cid, ITEM_CRYSTAL_COIN) * 10000) + (getPlayerItemCount(cid, ITEM_PLATINUM_COIN) * 100) + getPlayerItemCount(cid, ITEM_GOLD_COIN))
end

Enjoy! Teraz możemy mieć dziecko :)

b_560_95_1.png

Opublikowano

Dzięki !

Przydało mi się :)

Aby zobaczyć opis kliknij Spoilera !!

 

 

Życie to bułka z dżemem, jak coś nie pasi to robisz nową.

 

Nazywam się...

GhostE

Elitarny członek do spraw specjalnych.

S.Z.K.O.Ł.A - SPECJALNY ZAKŁAD KARNO - OPIEKUŃCZY ŁĄCZĄCY ANALFABETÓW

 

Szkoła to też CS.

 

Dyrektor - HeadAdmin

Nauczyciel - Admin

Uczniowie - Gracze

Ściągi - Cheaty

Klasy - Serwery

Dzwonek - zmiana mapy.

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...