A pedido de lucasbro, desenvolvi um sistema de casamento que consiste no seguinte:
Ao casar, você recebe um anel que possui uma mensagem única no mesmo, e fica então oficialmente casado.
Ao divorciar, você perde o anel e poderá então casar novamente.
Essas funções devem ser usadas em NPCs por usarem a função selfSay. Então vamos lá as funções:
STORAGE_MARY_SYSTEM = 2225 function Mary(cid, name) if getPlayerSex(cid) == 0 then partner = 'him' else partner = 'her' end if getPlayerStorageValue(cid,STORAGE_MARY_SYSTEM) == 1 then -- CASADO selfSay('Sorry ' .. getPlayerName(cid) .. ', but you are already married.') else -- SOLTEIRO setPlayerStorageValue(cid,STORAGE_MARY_SYSTEM,1) ring = doPlayerAddItem(cid,2121,1) doSetSpecialDescription(ring,'This ring sybomlizes the pure and true love with ' .. getPlayerName(cid) .. ' and ' .. name .. '.') selfSay('So i declare you and ' .. name .. ' husband and wife! You can kiss ' .. partner .. '.') end end function Divorce(cid) if getPlayerSex(cid) = 0 then partner = 'wife' else partner = 'husband' end if getPlayerStorageValue(cid,STORAGE_MARY_SYSTEM) == 1 then setPlayerStorageValue(cid,STORAGE_MARY_SYSTEM) == 0 doPlayerRemoveItem(cid,2121,1) selfSay('Too bad, you and your ' .. partner .. ' wants to divorce? Ok, and good look in your life.') end else selfSay('You are not married to get divorce!') end end
Espero que gostem