Ir para conteúdo

Mulizeu

Barão
  • Total de itens

    218
  • Registro em

  • Última visita

  • Dias Ganhos

    4

Histórico de Reputação

  1. Thanks
    Mulizeu recebeu reputação de coyotestark45 em Procurado   
    Primeiramente Irei falar um pouco sobre o systema, ele e bem simples mais e legal!
    é um sistema de recompensa pela cabeça do jogador, a medida que o jogador mata outro ele acumula kills, e quando chega a uma determinada quantia de kill, sua cabeça vale uma recompensa, e quem matar esse jogador recebe o premio
    --------------------------------------------------------------------------------------
    Para ver quantos kills o jogador tem basta falar !kill ou /kill
    {maxKill = 2 -- quantia de player que vai matar
     
    ---------------------------------------------------------------------------------------
     
    Vá ate a pasta mods crie um arquivo chamado, Procurado.xml e coloque
     
    V 1.0
     

    <?xml version="1.0" encoding="UTF-8"?> <mod name="Procurado" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="pcr_func"><![CDATA[ config = {maxKill = 2, storage = 913874, reward = {2160,100}} function getKills(cid) return getPlayerStorageValue(cid,config.storage) < 0 and 0 or getPlayerStorageValue(cid,config.storage) end ]]></config> <event type="login" name="ProcuradoRegister" event="script"><![CDATA[ domodlib('pcr_func') function onLogin(cid) registerCreatureEvent(cid, "ProcuradoRegister") registerCreatureEvent(cid, "ProcuradoKill") registerCreatureEvent(cid, "ProcuradoDeath") if getPlayerStorageValue(cid,config.storage) == -1 then setPlayerStorageValue(cid,config.storage,0) end return true end]]></event> <talkaction words="/kill;!kill" event="buffer"><![CDATA[ domodlib('pcr_func') return doPlayerSendTextMessage(cid,27,"You have "..getKills(cid).." Killer of the peoples") ]]></talkaction> <event type="kill" name="ProcuradoKill" event="script"><![CDATA[ domodlib('pcr_func') function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) == TRUE then setPlayerStorageValue(cid, config.storage, getKills(cid)+1) doSendAnimatedText(getCreaturePosition(cid),"+Kill",math.random(1,5)) if getKills(cid) == config.maxKill then doBroadcastMessage("The Player "..getCreatureName(cid).." was Killer "..config.maxKill.." people and now his head is worth "..config.reward[2].." "..getItemNameById(config.reward[1]) , 22) end end return true end]]></event> <event type="death" name="ProcuradoDeath" event="script"><![CDATA[ domodlib('pcr_func') function onDeath(cid, corpse, deathList) if isPlayer(deathList[1]) and getKills(cid) >= config.maxKill then doPlayerAddItem(deathList[1],config.reward[1],config.reward[2]) setPlayerStorageValue(cid, config.storage, 0) doBroadcastMessage("The Player "..getCreatureName(deathList[1]).." was Killed "..getCreatureName(cid).." and earned his reward" , 20) end return true end ]]></event> </mod>
     
    Aceito Sujestões e ideias para melhorar o systema
     
    Agradeço ao VODKART, por ter passado para mods,e deixar o script melhor configuravel
  2. Upvote
    Mulizeu recebeu reputação de PokemonBR em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  3. Upvote
    Mulizeu recebeu reputação de Neo Sonny em [Poke-Tibia] Script Saffari Ajuda   
    Vá em Data/ Npcs Crie Um arquivo chamado Saffari.xml e coloque
    <?xml version="1.0" encoding="UTF-8"?><npc name="Loren" script="saffari.lua" walkinterval="350000" floorchange="0" speed="0" lookdir="2"><health now="150" max="150"/><look type="495" head="0" body="15" legs="20" feet="25"/>    <parameters>        <parameter key="message_greet" value="Hello, I am living here with Professor Oak and Professor Ivy, I am training those Lapras, but they need some {travel}s to get stronge."/>    </parameters></npc>  
    Agora em npcs/Script crie um Arquivo chamado saffari.lua e coloque
    focus = 0talk_start = 0target = 0following = falseattacking = falselocal SaffariBalls = {ID SAFFARI BALLS}local SafariEnter = {x=1676, y=1389, z=6} -- Posição da Entrada Safarifunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos)if focus == cid then   selfSay('See ya.')   focus = 0   talk_start = 0endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str)return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg)msg = string.lower(msg)if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then   selfSay('Olá a entrada no Saffari custará 1k vc aceita??')   focus = cid   talk_start = os.clock()elseif (msgcontains(msg, 'yes') ) then   if getPlayerItemCount(cid,2391) >= 1 or getPlayerItemCount(cid,2394) >= 1 or getPlayerItemCount(cid,2392) >= 1 or getPlayerItemCount(cid,2393) >= 1 then      selfSay("Você não pode entrar no Saffari com nenhuma outra ball exceto a Saffari!! Cya")      focus = 0      talk_start = 0   elseif getPlayerStorageValue(cid, 98796) >= 1 or getPlayerStorageValue(cid, 98797) >= 1 then      selfSay("Você já está na saffari zone!")      focus = 0      talk_start = 0   elseif doPlayerRemoveMoney(cid, 100000) then       setPlayerStorageValue(cid, 98796, 1)      setPlayerStorageValue(cid, 98797, 1)      doPlayerAddItem(cid, 12617, SaffariBalls)        doTeleportThing(cid, SafariEnter)      doSendMagicEffect(getThingPos(cid), 21)      talk_start = os.clock()   else      selfSay("Você não tem dinheiro suficiente")         focus = 0      talk_start = 0   endelseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3) then   selfSay('Sorry, Im busy at this moment.')elseif (msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3) then   selfSay('Good bye then.')   focus = 0   talk_start = 0endendfunction onCreatureChangeOutfit(creature)endfunction onThink()if (os.clock() - talk_start) > 30 thenif focus > 0 thenselfSay('See ya.')endfocus = 0endend  
  4. Upvote
    Mulizeu recebeu reputação de mauro222 em [Poke-Tibia] Script Saffari Ajuda   
    Vá em Data/ Npcs Crie Um arquivo chamado Saffari.xml e coloque
    <?xml version="1.0" encoding="UTF-8"?><npc name="Loren" script="saffari.lua" walkinterval="350000" floorchange="0" speed="0" lookdir="2"><health now="150" max="150"/><look type="495" head="0" body="15" legs="20" feet="25"/>    <parameters>        <parameter key="message_greet" value="Hello, I am living here with Professor Oak and Professor Ivy, I am training those Lapras, but they need some {travel}s to get stronge."/>    </parameters></npc>  
    Agora em npcs/Script crie um Arquivo chamado saffari.lua e coloque
    focus = 0talk_start = 0target = 0following = falseattacking = falselocal SaffariBalls = {ID SAFFARI BALLS}local SafariEnter = {x=1676, y=1389, z=6} -- Posição da Entrada Safarifunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos)if focus == cid then   selfSay('See ya.')   focus = 0   talk_start = 0endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str)return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg)msg = string.lower(msg)if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 3 then   selfSay('Olá a entrada no Saffari custará 1k vc aceita??')   focus = cid   talk_start = os.clock()elseif (msgcontains(msg, 'yes') ) then   if getPlayerItemCount(cid,2391) >= 1 or getPlayerItemCount(cid,2394) >= 1 or getPlayerItemCount(cid,2392) >= 1 or getPlayerItemCount(cid,2393) >= 1 then      selfSay("Você não pode entrar no Saffari com nenhuma outra ball exceto a Saffari!! Cya")      focus = 0      talk_start = 0   elseif getPlayerStorageValue(cid, 98796) >= 1 or getPlayerStorageValue(cid, 98797) >= 1 then      selfSay("Você já está na saffari zone!")      focus = 0      talk_start = 0   elseif doPlayerRemoveMoney(cid, 100000) then       setPlayerStorageValue(cid, 98796, 1)      setPlayerStorageValue(cid, 98797, 1)      doPlayerAddItem(cid, 12617, SaffariBalls)        doTeleportThing(cid, SafariEnter)      doSendMagicEffect(getThingPos(cid), 21)      talk_start = os.clock()   else      selfSay("Você não tem dinheiro suficiente")         focus = 0      talk_start = 0   endelseif (msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 3) then   selfSay('Sorry, Im busy at this moment.')elseif (msgcontains(msg, 'bye') and focus == cid and getDistanceToCreature(cid) < 3) then   selfSay('Good bye then.')   focus = 0   talk_start = 0endendfunction onCreatureChangeOutfit(creature)endfunction onThink()if (os.clock() - talk_start) > 30 thenif focus > 0 thenselfSay('See ya.')endfocus = 0endend  
  5. Upvote
    Mulizeu recebeu reputação de BrunooMaciell em Duvida Imagem   
  6. Upvote
    Mulizeu recebeu reputação de phelipericardao em Marriage System [+Npc]   
    Vlw por me dizer q ia postar!
     
    Brincadeira minha nega =]
     
    bacana msm, gostei =] deu um upgrade!
  7. Upvote
    Mulizeu recebeu reputação de LTKReturns em Teleportar So Se For VIP   
    function onUse(cid, item, frompos, item2, topos) local config = { pz = "yes", -- players precisam estar em protection zone para usar? ("yes" or "no"). battle = "yes", -- players deve estar sem battle ("yes" or "no") pos = {x=343, y=161, z=7} } if isVip(cid) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"voce nao e vip!.") return TRUE end if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE end if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.") return TRUE end if item.itemid == 8979 then doPlayerSendTextMessage(cid,22,"Você Foi Teleportado Para O Templo!") removeOnUse = "no" -- remover quando usar ("yes" or "no") doTeleportThing(cid,config.pos) doSendMagicEffect(getCreaturePosition(cid), 10) doSendMagicEffect(frompos,6) end return 1 end
  8. Upvote
    Mulizeu recebeu reputação de Chapalirous em [Encerrado] Boost Stone   
    EDITED O POSTE
     
     
     

    function onUse(cid, item, frompos, item2, topos) if not isCreature(item2.uid) or not isSummon(item2.uid) then doPlayerSendCancel(cid, "You can only give this Boost to trainers' pokemons.") return true end if getCreatureHealth(item2.uid) == 0 then return true end local pb = getPlayerSlotItem(getCreatureMaster(item2.uid), 8) --doPlayerSendTextMessage(cid, 27, "You gave a Boost Stone to "..getPokeName(item2.uid)..".") local level = getItemAttribute(pb.uid, "level") local exp = getItemAttribute(pb.uid, "exp") local neededexp = getItemAttribute(pb.uid, "nextlevelexp") local boost = getItemAttribute(pb.uid, "boost") or 0 if boost >= 200 then doPlayerSendCancel(cid, "Your pokemon is already at maximum boost.") return true end doRemoveItem(item.uid, 1) if getHappiness(item2.uid) < 50 then doSendMagicEffect(getThingPos(item2.uid), 168) return true end doCreatureSay(item2.uid, "BOOST+.", TALKTYPE_ORANGE_1) doSetItemAttribute(pb.uid, "boost", boost + 1) doPlayerSendTextMessage(getCreatureMaster(item2.uid), 27, "Your "..getPokeName(item2.uid).." has eaten a Boost Stone!") doSendFlareEffect(getThingPos(item2.uid)) doSendAnimatedText(getThingPos(item2.uid), "B O O S T!", 215) doCreatureSay(cid, getPokeName(item2.uid)..", take this Boost!", TALKTYPE_SAY) return false end
  9. Upvote
    Mulizeu recebeu reputação de HeMp_BoY em Procurado   
    Primeiramente Irei falar um pouco sobre o systema, ele e bem simples mais e legal!
    é um sistema de recompensa pela cabeça do jogador, a medida que o jogador mata outro ele acumula kills, e quando chega a uma determinada quantia de kill, sua cabeça vale uma recompensa, e quem matar esse jogador recebe o premio
    --------------------------------------------------------------------------------------
    Para ver quantos kills o jogador tem basta falar !kill ou /kill
    {maxKill = 2 -- quantia de player que vai matar
     
    ---------------------------------------------------------------------------------------
     
    Vá ate a pasta mods crie um arquivo chamado, Procurado.xml e coloque
     
    V 1.0
     

    <?xml version="1.0" encoding="UTF-8"?> <mod name="Procurado" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="pcr_func"><![CDATA[ config = {maxKill = 2, storage = 913874, reward = {2160,100}} function getKills(cid) return getPlayerStorageValue(cid,config.storage) < 0 and 0 or getPlayerStorageValue(cid,config.storage) end ]]></config> <event type="login" name="ProcuradoRegister" event="script"><![CDATA[ domodlib('pcr_func') function onLogin(cid) registerCreatureEvent(cid, "ProcuradoRegister") registerCreatureEvent(cid, "ProcuradoKill") registerCreatureEvent(cid, "ProcuradoDeath") if getPlayerStorageValue(cid,config.storage) == -1 then setPlayerStorageValue(cid,config.storage,0) end return true end]]></event> <talkaction words="/kill;!kill" event="buffer"><![CDATA[ domodlib('pcr_func') return doPlayerSendTextMessage(cid,27,"You have "..getKills(cid).." Killer of the peoples") ]]></talkaction> <event type="kill" name="ProcuradoKill" event="script"><![CDATA[ domodlib('pcr_func') function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) == TRUE then setPlayerStorageValue(cid, config.storage, getKills(cid)+1) doSendAnimatedText(getCreaturePosition(cid),"+Kill",math.random(1,5)) if getKills(cid) == config.maxKill then doBroadcastMessage("The Player "..getCreatureName(cid).." was Killer "..config.maxKill.." people and now his head is worth "..config.reward[2].." "..getItemNameById(config.reward[1]) , 22) end end return true end]]></event> <event type="death" name="ProcuradoDeath" event="script"><![CDATA[ domodlib('pcr_func') function onDeath(cid, corpse, deathList) if isPlayer(deathList[1]) and getKills(cid) >= config.maxKill then doPlayerAddItem(deathList[1],config.reward[1],config.reward[2]) setPlayerStorageValue(cid, config.storage, 0) doBroadcastMessage("The Player "..getCreatureName(deathList[1]).." was Killed "..getCreatureName(cid).." and earned his reward" , 20) end return true end ]]></event> </mod>
     
    Aceito Sujestões e ideias para melhorar o systema
     
    Agradeço ao VODKART, por ter passado para mods,e deixar o script melhor configuravel
  10. Upvote
    Mulizeu recebeu reputação de Derlexy em Dúvida No Script De Uma Runa.   
    Sobre aquilo assim q tiver tempo te mando ageitado! esquenta com rep+ nao, oq vale é ajudar e aprender cada dia!
  11. Upvote
    Mulizeu deu reputação a Vodkart em Trade Logs   
    Explicação:
     
    Vocês sabem que os comandos que o GOD usa ficam salvos em um arquivo.txt certo?
    Esse sistema é parecido, só que quando o jogador for trocar items pelo trade vão ficar salvo os IDS dos items que foram trocados e os nomes dos players.
     
     
     
     
    1° Versão é feita pelo Banco de dados:
     
     
     
    2° Versão é salvo em um arquivo.txt em data/logs
     
     
  12. Upvote
    Mulizeu recebeu reputação de Beeki em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  13. Upvote
    Mulizeu recebeu reputação de renanmarcosofcl em [Encerrado] [Pokemon] Dúvidas? - Pda   
    @manobruninxx eu dei uma editada pra tu
     

    function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid,22563) == -1 then doPlayerAddItem(cid,11640,1) --ID do item, no caso Demon Armor.Na frente é a quantidade, no caso se a quest for de dinheiro tu põe a quantidade. doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce ganhou uma Box 3.") --Essa é a mensagem quando o player completa a quest, ponha como quiser. setPlayerStorageValue(cid,22563,1) --Essa é a Storage Value else doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Voce ja pegou seu premio.") --Essa é a Mensagem se o player tiver feito a quest. end return TRUE end
  14. Upvote
    Mulizeu recebeu reputação de jhon992 em Procurado   
    Primeiramente Irei falar um pouco sobre o systema, ele e bem simples mais e legal!
    é um sistema de recompensa pela cabeça do jogador, a medida que o jogador mata outro ele acumula kills, e quando chega a uma determinada quantia de kill, sua cabeça vale uma recompensa, e quem matar esse jogador recebe o premio
    --------------------------------------------------------------------------------------
    Para ver quantos kills o jogador tem basta falar !kill ou /kill
    {maxKill = 2 -- quantia de player que vai matar
     
    ---------------------------------------------------------------------------------------
     
    Vá ate a pasta mods crie um arquivo chamado, Procurado.xml e coloque
     
    V 1.0
     

    <?xml version="1.0" encoding="UTF-8"?> <mod name="Procurado" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="pcr_func"><![CDATA[ config = {maxKill = 2, storage = 913874, reward = {2160,100}} function getKills(cid) return getPlayerStorageValue(cid,config.storage) < 0 and 0 or getPlayerStorageValue(cid,config.storage) end ]]></config> <event type="login" name="ProcuradoRegister" event="script"><![CDATA[ domodlib('pcr_func') function onLogin(cid) registerCreatureEvent(cid, "ProcuradoRegister") registerCreatureEvent(cid, "ProcuradoKill") registerCreatureEvent(cid, "ProcuradoDeath") if getPlayerStorageValue(cid,config.storage) == -1 then setPlayerStorageValue(cid,config.storage,0) end return true end]]></event> <talkaction words="/kill;!kill" event="buffer"><![CDATA[ domodlib('pcr_func') return doPlayerSendTextMessage(cid,27,"You have "..getKills(cid).." Killer of the peoples") ]]></talkaction> <event type="kill" name="ProcuradoKill" event="script"><![CDATA[ domodlib('pcr_func') function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) == TRUE then setPlayerStorageValue(cid, config.storage, getKills(cid)+1) doSendAnimatedText(getCreaturePosition(cid),"+Kill",math.random(1,5)) if getKills(cid) == config.maxKill then doBroadcastMessage("The Player "..getCreatureName(cid).." was Killer "..config.maxKill.." people and now his head is worth "..config.reward[2].." "..getItemNameById(config.reward[1]) , 22) end end return true end]]></event> <event type="death" name="ProcuradoDeath" event="script"><![CDATA[ domodlib('pcr_func') function onDeath(cid, corpse, deathList) if isPlayer(deathList[1]) and getKills(cid) >= config.maxKill then doPlayerAddItem(deathList[1],config.reward[1],config.reward[2]) setPlayerStorageValue(cid, config.storage, 0) doBroadcastMessage("The Player "..getCreatureName(deathList[1]).." was Killed "..getCreatureName(cid).." and earned his reward" , 20) end return true end ]]></event> </mod>
     
    Aceito Sujestões e ideias para melhorar o systema
     
    Agradeço ao VODKART, por ter passado para mods,e deixar o script melhor configuravel
  15. Upvote
    Mulizeu recebeu reputação de fagundes14 em Procurado   
    Primeiramente Irei falar um pouco sobre o systema, ele e bem simples mais e legal!
    é um sistema de recompensa pela cabeça do jogador, a medida que o jogador mata outro ele acumula kills, e quando chega a uma determinada quantia de kill, sua cabeça vale uma recompensa, e quem matar esse jogador recebe o premio
    --------------------------------------------------------------------------------------
    Para ver quantos kills o jogador tem basta falar !kill ou /kill
    {maxKill = 2 -- quantia de player que vai matar
     
    ---------------------------------------------------------------------------------------
     
    Vá ate a pasta mods crie um arquivo chamado, Procurado.xml e coloque
     
    V 1.0
     

    <?xml version="1.0" encoding="UTF-8"?> <mod name="Procurado" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="pcr_func"><![CDATA[ config = {maxKill = 2, storage = 913874, reward = {2160,100}} function getKills(cid) return getPlayerStorageValue(cid,config.storage) < 0 and 0 or getPlayerStorageValue(cid,config.storage) end ]]></config> <event type="login" name="ProcuradoRegister" event="script"><![CDATA[ domodlib('pcr_func') function onLogin(cid) registerCreatureEvent(cid, "ProcuradoRegister") registerCreatureEvent(cid, "ProcuradoKill") registerCreatureEvent(cid, "ProcuradoDeath") if getPlayerStorageValue(cid,config.storage) == -1 then setPlayerStorageValue(cid,config.storage,0) end return true end]]></event> <talkaction words="/kill;!kill" event="buffer"><![CDATA[ domodlib('pcr_func') return doPlayerSendTextMessage(cid,27,"You have "..getKills(cid).." Killer of the peoples") ]]></talkaction> <event type="kill" name="ProcuradoKill" event="script"><![CDATA[ domodlib('pcr_func') function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) == TRUE then setPlayerStorageValue(cid, config.storage, getKills(cid)+1) doSendAnimatedText(getCreaturePosition(cid),"+Kill",math.random(1,5)) if getKills(cid) == config.maxKill then doBroadcastMessage("The Player "..getCreatureName(cid).." was Killer "..config.maxKill.." people and now his head is worth "..config.reward[2].." "..getItemNameById(config.reward[1]) , 22) end end return true end]]></event> <event type="death" name="ProcuradoDeath" event="script"><![CDATA[ domodlib('pcr_func') function onDeath(cid, corpse, deathList) if isPlayer(deathList[1]) and getKills(cid) >= config.maxKill then doPlayerAddItem(deathList[1],config.reward[1],config.reward[2]) setPlayerStorageValue(cid, config.storage, 0) doBroadcastMessage("The Player "..getCreatureName(deathList[1]).." was Killed "..getCreatureName(cid).." and earned his reward" , 20) end return true end ]]></event> </mod>
     
    Aceito Sujestões e ideias para melhorar o systema
     
    Agradeço ao VODKART, por ter passado para mods,e deixar o script melhor configuravel
  16. Upvote
    Mulizeu recebeu reputação de RHCP em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  17. Upvote
    Mulizeu recebeu reputação de cacaiu em [Encerrado] [Pokemon] Dúvidas? - Pda   
    Fala ae Galera Eu fiquei um bom tempo sem entrar aki no topico mais tem mta gente com problemas então vou ajudar, irei olhar o problema do blastoise primeiro reportado pelo @StlyeMaldoso, jaja posto uma solução!
     
     
    Edited--- Irei postar a solução nesse msm poste
     
    Edited2 --
     
    Solução do problema do blastoise
     
    http://www.4shared.c...emon_moves.html
     
    Rep+ Custa Nda
  18. Upvote
    Mulizeu recebeu reputação de StyloMaldoso em [Encerrado] [Pokemon] Dúvidas? - Pda   
    Fala ae Galera Eu fiquei um bom tempo sem entrar aki no topico mais tem mta gente com problemas então vou ajudar, irei olhar o problema do blastoise primeiro reportado pelo @StlyeMaldoso, jaja posto uma solução!
     
     
    Edited--- Irei postar a solução nesse msm poste
     
    Edited2 --
     
    Solução do problema do blastoise
     
    http://www.4shared.c...emon_moves.html
     
    Rep+ Custa Nda
  19. Upvote
    Mulizeu recebeu reputação de BrunooMaciell em [Encerrado] [Pokemon] Dúvidas? - Pda   
    Fala ae Galera Eu fiquei um bom tempo sem entrar aki no topico mais tem mta gente com problemas então vou ajudar, irei olhar o problema do blastoise primeiro reportado pelo @StlyeMaldoso, jaja posto uma solução!
     
     
    Edited--- Irei postar a solução nesse msm poste
     
    Edited2 --
     
    Solução do problema do blastoise
     
    http://www.4shared.c...emon_moves.html
     
    Rep+ Custa Nda
  20. Upvote
    Mulizeu recebeu reputação de PsyMcKenzie em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  21. Upvote
    Mulizeu recebeu reputação de AnneMotta em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  22. Upvote
    Mulizeu recebeu reputação de Vodkart em New Marriage System   
    Na sua db execute:

    CREATE TABLE marriage_system ( id INTEGER NOT NULL, player_id INTEGER NOT NULL, partner VARCHAR( 255 ) NOT NULL, marriage_date INTEGER NOT NULL, PRIMARY KEY ( id ) );
     
    Mods
     
    MarriageSystem.xml

    <?xml version="1.0" encoding="UTF-8"?> <mod name="MarriageSystem" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes"> <config name="marry_func"><![CDATA[ marry_config = { Premium = false, OnlyDifferentSex = false, Marry_Price = 300000, Divorce_Price = 100000, Level = 50, MaxSqm = 7 -- to up system and win bonus } Marry_stage = { [0] = {exp = 350000, marry_percent = 50, player_experience = 0}, [1] = {exp = 700000, marry_percent = 45, player_experience = 2}, [2] = {exp = 1050000, marry_percent = 40, player_experience = 4}, [3] = {exp = 1400000, marry_percent = 35, player_experience = 6}, [4] = {exp = 1750000, marry_percent = 30, player_experience = 8}, [5] = {exp = 2100000, marry_percent = 25, player_experience = 10}, [6] = {exp = 2450000, marry_percent = 20, player_experience = 12}, [7] = {exp = 2800000, marry_percent = 15, player_experience = 14}, [8] = {exp = 3150000, marry_percent = 10, player_experience = 16}, [9] = {exp = 3500000, marry_percent = 5, player_experience = 18}, [10] = {exp = 0, marry_percent = 0, player_experience = 20} } marriage_tabble = {exp = 350250,level = 340200} function isMarried(cid) local m = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(m:getID() == -1) then local e = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") if(e:getID() == -1) then return false end end return true end function isPatner(cid) local p = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") if(p:getID() == -1) then return true end return false end function isMarryOnline(cid) if not getPlayerByNameWildcard(getPartner(cid)) then return false end return true end function getPartner(cid) if isPatner(cid) then a = db.getResult("SELECT `player_id` FROM `marriage_system` WHERE `partner` = '"..getPlayerGUID(cid).."';") b = "player_id" else a = db.getResult("SELECT `partner` FROM `marriage_system` WHERE `player_id` = '"..getPlayerGUID(cid).."';") b = "partner" end local query = a return getPlayerNameByGUID(query:getDataString(b)) end function doMarry(cid, patner) return db.executeQuery("INSERT INTO `marriage_system` (`player_id`, `partner`, `marriage_date`) VALUES ('".. getPlayerGUID(cid) .."', '"..patner.."', '".. os.time() .."');") end function doDivorcePlayer(cid) if isPatner(cid) then pid,player = getPlayerGUIDByName(getPartner(cid)),getPlayerByNameWildcard(getPartner(cid)) else pid,player = getPlayerGUID(cid),cid end if(not player or isPlayerGhost(player)) then db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.level .. ";") db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = " .. pid .. " AND `key` = " .. marriage_tabble.exp .. ";") else setPlayerStorageValue(player, marriage_tabble.level,0) setPlayerStorageValue(player, marriage_tabble.exp,0) end return db.executeQuery("DELETE FROM `marriage_system` WHERE `player_id` = '" .. pid .. "';") end function getMarryStatus(cid, status) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return getPlayerStorageValue(player,status == "level" and marriage_tabble.level or marriage_tabble.exp) < 0 and 0 or getPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp) end function setMarryStatus(cid, status, amount) player = isPatner(cid) and getPlayerByNameWildcard(getPartner(cid)) or cid return setPlayerStorageValue(player, status == "level" and marriage_tabble.level or marriage_tabble.exp, getMarryStatus(player, status)+amount) end function getMarryExp(cid) return getMarryStatus(cid, "exp") end function addMarryExp(cid, amount) return setMarryStatus(cid, "exp", amount) end function addMarryLevel(cid, amount) return setMarryStatus(cid, "level", amount) end function getMarryLevel(cid) return getMarryStatus(cid, "level") end function getMarryDate(cid) local player = isPatner(cid) and getPlayerGUIDByName(getPartner(cid)) or getPlayerGUID(cid) local date = db.getResult("SELECT `marriage_date` FROM `marriage_system` WHERE `player_id` = '"..player.."';") return os.date("%d %B %Y %X ", date:getDataInt("marriage_date")) end ]]></config> <talkaction words="/marriage;!marriage;!divorce;/divorce" event="buffer"><![CDATA[ domodlib('marry_func') config = {TimeAccept = 30, sqm = 3, storage1 = 873438, storage2 = 532579} if words =="!marriage" or words =="/marriage" then param = string.lower(param) if (param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"invalid command, for more information enter !marriage info") elseif(param == "info") then msg = "Marriage Info".."\n\nLevel Minimum: "..marry_config.Level.."\nMarriage Cost: "..marry_config.Marry_Price.."\nDivorce Cost: "..marry_config.Divorce_Price.."\n\nMarried Players have a bonus exp as a wedding gift given by the union".."\n\nThis bonus is only given if the married players are nearby.\n\nTo marry use the command:\n!marriage NAME" doShowTextDialog(cid,2160,msg) elseif(param == "status") then if isMarried(cid) then msg = "Marriage Status".."\n\nMarried with: ["..getPartner(cid).."]\n\nMarry Experience: "..(getMarryLevel(cid) ~= 10 and "["..getMarryExp(cid).."/"..Marry_stage[getMarryLevel(cid)].exp.."]" or "[Max]").."\n\nMarry Level: "..(getMarryLevel(cid) ~= 10 and "["..getMarryLevel(cid).."]" or "[Max]").."\n" else msg = "you are not married" end doPlayerPopupFYI(cid, msg) elseif (param =="date") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..(isMarried(cid) and "The date of his marriage with "..getPartner(cid).." was: "..getMarryDate(cid).."." or "you are not married.").."") elseif (param =="accept") then player = getPlayerStorageValue(cid, config.storage2) if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) <= config.sqm then doMarry(cid, getPlayerGUID(player)) doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! "..getCreatureName(cid).." accepted his marriage proposal.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations! you married with "..getCreatureName(player)) doSendMagicEffect(getCreaturePosition(cid), 35) doSendMagicEffect(getCreaturePosition(player), 35) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you're far away from her suitor.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end elseif (param =="reject") then if getPlayerStorageValue(cid, config.storage1) >= os.time() then if not isMarried(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"You just refuse the wedding invitation from player "..getCreatureName(getPlayerStorageValue(cid, config.storage2))) doPlayerSendTextMessage(getPlayerStorageValue(cid, config.storage2), MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid).." rejected his marriage proposal.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are already married.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you do not received none wedding invitation.") end else local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." is offline or does not exist.") return true elseif isMarried(cid) or isMarried(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ""..(isMarried(cid) and "you" or "he").." already is wedded.") return true elseif marry_config.Premium == true then if not isPremium(cid) or not isPremium(Player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must be premium") end return true elseif getPlayerLevel(cid) < marry_config.Level or getPlayerLevel(player) < marry_config.Level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "players must to be level "..marry_config.Level) return true elseif getPlayerStorageValue(player, config.storage1) >= os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param.." already have a wedding invitation, wait.") return true elseif getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) > config.sqm then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you are far away from each other to get married.") return true elseif marry_config.OnlyDifferentSex and getPlayerSex(cid) == getPlayerSex(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "you can only marry the opposite sex") return true elseif not doPlayerRemoveMoney(cid, marry_config.Marry_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but you do not have "..marry_config.Marry_Price.." gp(s) to ask "..param.." in marriage.") return true end setPlayerStorageValue(player, config.storage1,os.time()+config.TimeAccept) setPlayerStorageValue(player, config.storage2, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you asked "..param.." in marriage, wait a answer!") doPlayerSendTextMessage(player, MESSAGE_STATUS_CONSOLE_BLUE,getCreatureName(cid).." asked you in marriage, enter !marriage accept or !marriage reject") end elseif words =="!divorce" or words =="/divorce" then if isMarried(cid) then if doPlayerRemoveMoney(cid, marry_config.Divorce_Price) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Congratulations, you end up divorcing from player: "..getPartner(cid)) doDivorcePlayer(cid) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Sorry, you do not have "..marry_config.Divorce_Price.." gp(s).") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"you are not married.") end end return true ]]></talkaction> <event type="login" name="MarryRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ExpMarry") registerCreatureEvent(cid, "MarryLook") registerCreatureEvent(cid, "MarryStats") registerCreatureEvent(cid, "MarryNoAttack") return true end]]></event> <event type="look" name="MarryLook" event="script"><![CDATA[ domodlib('marry_func') function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and isMarried(thing.uid) then doPlayerSetSpecialDescription(thing.uid, "\nMarried with "..getPartner(thing.uid).." - [Nv: " .. getMarryLevel(thing.uid) .."]\n") end return true end]]></event> <event type="combat" name="MarryNoAttack" event="script"><![CDATA[ domodlib('marry_func') if isPlayer(cid) and isPlayer(target) and isMarried(cid) and isMarried(target) then if (getCreatureName(target) == getPartner(cid))then doPlayerSendCancel(cid, "You may not attack this player.") return false end end return true ]]></event> <event type="kill" name="ExpMarry" event="script"><![CDATA[ domodlib('marry_func') function onKill(cid, target, lastHit) if isMonster(target) then conta = getMonsterInfo(string.lower(getCreatureName(target))).experience if isMarried(cid) and isMarryOnline(cid) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if getMarryLevel(cid) ~= 10 then mexp = math.ceil((conta*Marry_stage[getMarryLevel(cid)].marry_percent)/100) addMarryExp(cid, mexp) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)),MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_SMALL,"Marry exp + "..mexp) if getMarryExp(cid) >= Marry_stage[getMarryLevel(cid)].exp then addMarryLevel(cid, 1) if isMarryOnline(cid) then doPlayerSendTextMessage(getPlayerByNameWildcard(getPartner(cid)), MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), 35) end doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"[Marriage System] Level Up! [Nv: "..getMarryLevel(cid).."].") doSendMagicEffect(getCreaturePosition(cid), 35) end end local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.ceil(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*Marry_stage[getMarryLevel(cid)].player_experience)/100) doPlayerAddExperience(cid, count) end end return true end]]></event> <event type="statschange" name="MarryStats" event="script"><![CDATA[ domodlib('marry_func') Damage_percent = 50 -- metade n mexa Chance = 25 -- chance de conseguir o reflect ou couple damage if isMonster(attacker) and type == STATSCHANGE_HEALTHLOSS then if isMarried(cid) and isMarryOnline(cid) and getPlayerByNameWildcard(getPartner(cid)) and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(getPlayerByNameWildcard(getPartner(cid)))) <= marry_config.MaxSqm then if (Chance > math.random(1, 100)) then damage = math.ceil((value*Damage_percent)/100) if (50 > math.random(1, 100)) then doTargetCombatHealth(cid, attacker, COMBAT_PHYSICALDAMAGE, -damage, -damage, CONST_ME_HOLYDAMAGE) doSendAnimatedText(getCreaturePosition(cid), "REFLECT!", 140) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(cid), "Love!", 200) doCreatureAddHealth(cid, damage) if isMarryOnline(cid) then doSendMagicEffect(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), CONST_ME_HEARTS) doSendAnimatedText(getCreaturePosition(getPlayerByNameWildcard(getPartner(cid))), "Love!", 200) doCreatureAddHealth(getPlayerByNameWildcard(getPartner(cid)), -damage) end end end end end return true ]]></event> </mod>
     
     
    Configuração:
     
     
    CREDITOS : 25% Ao vodkart pela lib e 75% ao mulizeu(eu) Pelos demais scripts
  23. Upvote
    Mulizeu deu reputação a AnneMotta em Peça Sua Sign By: Annemotta   
    Bom como podem ver esses últimos dias venho me dedicando ao "photoshop" então resolvi fazer este tópico para ajudar alguns e me auto-ajudar a treinar já que estou começando agora, por enquanto irei fazer apenas uma sign por dia, não irei chamar de pagamento mais sim um rep de agradecimento seria legal por cada sign feita, então esta aberto aque, que venham os pedidos.


     

    OBS: Irei apenas fazer Sign ( 420x180).


     

    Algumas sign que ja fiz:
    http://www.xtibia.co...eria-annemotta/

  24. Upvote
    Mulizeu recebeu reputação de AnneMotta em [Dúvida] Script Alquimia   
    Pronto!
     
     

    function onUse(cid, item, item2,item3, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2476,t2=2464,t3=2472,t4=2492}, ["Dragon Scale Mail"] = {t1=2489,t2=2487,t3=2468,t4=2493} } local r1 = {x = 722, y = 1014, z = 7, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 724, y = 1014, z = 7, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 723, y = 1013, z = 7, stackpos= 2} -- Posição 3 ( NÃO MEXA NO stackpos= 2 ) local r4 = {x = 723, y = 1014, z = 7} -- Posição do Item a Ser Criado local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) local q3 = getThingfromPos(r3) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2 and q3.itemid == x.t3) then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) doRemoveItem(q3.uid, 1) addEvent(doCreateItem, 1000, x.t4, 1, r4) doSendMagicEffect(r4, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end return TRUE end
  25. Upvote
    Mulizeu recebeu reputação de Vilden em [Dúvida] Script Alquimia   
    Pronto!
     
     

    function onUse(cid, item, item2,item3, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2476,t2=2464,t3=2472,t4=2492}, ["Dragon Scale Mail"] = {t1=2489,t2=2487,t3=2468,t4=2493} } local r1 = {x = 722, y = 1014, z = 7, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 724, y = 1014, z = 7, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 723, y = 1013, z = 7, stackpos= 2} -- Posição 3 ( NÃO MEXA NO stackpos= 2 ) local r4 = {x = 723, y = 1014, z = 7} -- Posição do Item a Ser Criado local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) local q3 = getThingfromPos(r3) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2 and q3.itemid == x.t3) then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) doRemoveItem(q3.uid, 1) addEvent(doCreateItem, 1000, x.t4, 1, r4) doSendMagicEffect(r4, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end return TRUE end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...