Ir para conteúdo

Mendiguinho91

Campones
  • Total de itens

    42
  • Registro em

  • Última visita

  • Dias Ganhos

    1

Mendiguinho91 venceu a última vez em Fevereiro 16 2017

Mendiguinho91 had the most liked content!

Sobre Mendiguinho91

Informações

  • Forma que conheci o xTibia
    Outros Sites
  • Sou
    OT-Admin

Últimos Visitantes

858 visualizações

Mendiguinho91's Achievements

  1. Pelo o que eu sei, foi isso mesmo. Então está no mesmo nível que você pelo jeito, rs.
  2. Mendiguinho91

    TA FODA....

    Em 2010 o gustavo que era dono do xtibia disse que começaria a dar prêmios como pen drive, canecas, camisas personalizadas do xtibia... Naquela época você só podia dar 1 REP por dia, hoje são 3 se não me engano, também naquela época tinha mais gente jogando otserv, consequentemente o fórum era mais frequentado, vejo os todos TOP reputações do XITIBA, o maior feito deles não se limita ao "número" de REP que eles receberam no fórum, mas suas contribuições com a comunidade, com sistemas, tutoriais, etc... Quer fazer a diferença? Crie conteúdo inovador, ajude dando suporte e atendendo pedidos, porque lá na frente os números não serão nada, mas o reconhecimento de membros vale mais que tudo isso. Então Deu!
  3. Mendiguinho91

    TA FODA....

    Se REP não serve para nada,. retira do fórum o sistema.
  4. só se for no seu mundo, o script checa se o newLevel é maior que o var[2] n tem como não cara
  5. já está em uma variável global, era só checar se o player que upou era o mesmo que já era top... só isso! abraços
  6. @wevertonvrb use assim: local config = { tempo = 3, --tempo em segundos mensagem = { texto = "TOP LEVEL", --não use mais de 9 caracteres efeito = TEXTCOLOR_RED --efeito para a função doSendAnimatedText }, efeito = nil, --efeito da função doSendMagicEffect globalstr = 150202 -- uma global storage qualquer q esteje vazia } function TopEffect(cid) local var = tostring(getGlobalStorageValue(config.globalstr)):gsub(':', ''):explode(',') if not isCreature(cid) or getPlayerName(cid) ~= var[1] then return LUA_ERROR end doSendAnimatedText(getCreaturePosition(cid), config.mensagem.texto, config.mensagem.efeito) doSendMagicEffect(getCreaturePosition(cid), config.efeito) addEvent(TopEffect, config.tempo*1000, cid) end function onLogin(cid) if tonumber(getGlobalStorageValue(config.globalstr)) then -- virgin local query = db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` < 2 ORDER BY `level` DESC LIMIT 1") if (query:getID() ~= -1) then setGlobalStorageValue(config.globalstr, ":"..query:getDataString("name")..",:"..query:getDataInt("level")) TopEffect(cid) end else TopEffect(cid) end registerCreatureEvent(cid, "CheckTop") return true end function onAdvance(cid, skill, oldLevel, newLevel) if skill ~= SKILL__LEVEL then return true end local var = tostring(getGlobalStorageValue(config.globalstr)):gsub(':', ''):explode(',') if newLevel > tonumber(var[2]) and getPlayerName(cid) ~= var[1] then doBroadcastMessage("O jogador " .. getPlayerName(cid) .. " tornou-se o novo Top Level. Parabens!", 22) setGlobalStorageValue(config.globalstr, ":"..getPlayerName(cid)..",:"..newLevel) TopEffect(cid) end return true end
  7. não funciona em poketibia, pq mudaram mtas funções comparado ao tfs normal.
  8. eu coloquei para vender o item no meu site! os jogadores gostaram do sistema e funciona 100% créditos: vodkart
  9. O sistema é feito por Item que adiciona dias de "auto loot time" para a conta e só com esse "auto loot time" para funcionar o sistema. Também: Max Slots de acordo com free ou premium Dias de auto loot são acumulativos Tudo em único MODS! Fácil instalação! Comandos adicionados: !autoloot --> Mostra uma janela com as informações do sistema !autoloot item name --> para adicionar ou remover itens na lista. !autoloot money --> Vai começar a coletar os gold automaticamente !autoloot clear --> limpar os slots da lista !autoloot on/off --> para ativar ou desativar o sistema obs: aconselho a usar no máximo 8 Slots para não bugar a storage. execute no seu banco de dados: ALTER TABLE `accounts` ADD loot_time INT(15) NOT NULL DEFAULT 0; AutoLootItem.xml <?xml version="1.0" encoding="ISO-8859-1"?><mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="none.com" enabled="yes"><config name="Loot_func"><![CDATA[info = { AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515}, Max_Slots = {free = 2, premium = 5}, Storages = {27000,28001,28002}}function getAutoLootTime(cid) return db.getResult("SELECT `loot_time` FROM `accounts` WHERE `id` = "..getPlayerAccountId(cid)):getDataInt("loot_time")endfunction setAutoLootTime(cid, time) return db.executeQuery("UPDATE `accounts` SET `loot_time` = "..time.." WHERE `id` = "..getPlayerAccountId(cid))endfunction getAutoLootDays(cid) local days = math.ceil((getAutoLootTime(cid) - os.time())/(86400)) return days <= 0 and 0 or daysendfunction addAutoLootDays(cid, days) local add = (days <= 0 and 1 or days)*86400 local time = getAutoLootDays(cid) == 0 and (os.time() + add) or (getAutoLootTime(cid) + add) return setAutoLootTime(cid, time) endfunction setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1))endfunction getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tabendfunction isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, info.Storages[1]))do if tonumber(i) == tonumber(item) then return true end end return falseendfunction addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, info.Storages[1], x) else setPlayerStorageTable(cid, info.Storages[1], {item}) endendfunction removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, info.Storages[1], x)endfunction ShowItemsTabble(cid) local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n!autoloot on/off --> To enable or disable the collecting of items in the system.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nTime: "..(getAutoLootTime(cid) > 0 and "you have ["..getAutoLootDays(cid).."] days --> ends in "..os.date("%d/%m/%y %X", getAutoLootTime(cid)).."." or "no have Auto Loot time.").."\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nBalance Total: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.Storages[1]).."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n" for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.Storages[1])[i]).."\n" end return doPlayerPopupFYI(cid, str)endfunction getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return itemsendfunction getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return itemsendfunction doPlayerAddItemStacking(cid, itemid, amount) -- revisado local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0 if #item > 0 then for _ ,x in pairs(item) do local ret = getThing(x) if ret.type < 100 then doTransformItem(ret.uid, itemid, ret.type+amount) if ret.type+amount > 100 then doPlayerAddItem(cid, itemid, ret.type+amount-100) end break else _G = _G+1 end end if _G == #item then doPlayerAddItem(cid, itemid, amount) end else return doPlayerAddItem(cid, itemid, amount) endendfunction AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) return doPlayerDepositMoney(cid, deposit)endfunction corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then if isItemStackable(x.itemid) then doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end else doPlayerAddItem(cid, x.itemid) end doRemoveItem(x.uid) end end endend]]></config><event type="login" name="LootLogin" event="script"><![CDATA[function onLogin(cid) registerCreatureEvent(cid, "LootEventKIll") if isPremium(cid) and getPlayerStorageValue(cid, 27001) <= 0 then setPlayerStorageValue(cid, 27001, 1) elseif getPlayerStorageValue(cid, 27001) > 0 and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!") setPlayerStorageValue(cid, 27001, -1) setPlayerStorageValue(cid, info.Storages[1], -1) end return trueend]]></event><event type="kill" name="LootEventKIll" event="script"><![CDATA[domodlib('Loot_func')function onKill(cid, target, lastHit) if isPlayer(cid) and getAutoLootDays(cid) > 0 and getPlayerStorageValue(cid, info.Storages[3]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then addEvent(corpseRetireItems, 0, cid ,getThingPos(target)) end return trueend]]></event><talkaction words="!autoloot;/autoloot" event="buffer"><![CDATA[domodlib('Loot_func')local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.freeif not param or param == "" then ShowItemsTabble(cid) return trueelseif tonumber(param) then doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return trueelseif isInArray({"clean","limpar", "clear"}, param) then setPlayerStorageValue(cid, info.Storages[1], -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return trueelseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return trueelseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return trueendlocal item = getItemIdByName(param, false)if not item then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "This item does not exist.") return trueendlocal var = isInTable(cid, item)if isInArray({2148,2152,2160},item) then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "Enter !autoloot money to add money in your list!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "You can not add this item in the list!") return trueelseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then doPlayerSendTextMessage(cid, MESSAGE_FIRST, "max "..slots.." from auto loot") return trueendif not var then addItemTable(cid, item)else removeItemTable(cid, item)enddoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list")return true]]></talkaction><action itemid="7703" event="script"><![CDATA[domodlib('Loot_func')function onUse(cid, item, fromPosition, itemEx, toPosition) local days = 3 addAutoLootDays(cid, days) doSendMagicEffect(getCreaturePosition(cid), 29) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You received "..days.." days of AutoLoot, you have "..getAutoLootDays(cid).." auto loot days.") doRemoveItem(item.uid) return trueend]]></action></mod> Bbs: Caso seu servidor seja em mysql, troque 'db.executeQuery' por 'db.query' Para editar o sistema: <action itemid="7703" event="script"><![CDATA[ 7703 é o item que ao clicar vai dar os dias de auto loot. local days = 3 é a quantidade de dias que será adicionado na conta.
  10. só no teu mundo né? é pq n existe um onLOgin de certo para dar os minutos que falta
  11. e dai? vc pode pegar por exemplo local config = {{x = 1000, y = 1000 z = 6},{x = 2000, y = 1512,z = 5},{x = 3000, y = 1500,z = 7}} ai usa assim local storage = getPlayerStorage(cid, 1500) <= 0 and 1 or getPlayerStorage(cid, 1500)getthingPos(config[storage]) digamos que sua storage 1500 seja value 2 vai retornar: {x = 2000, y = 1512,z = 5},
  12. pq não joga a pos dentro ? local config = {{x = 1000, y = 1000 z = 6},{x = 2000, y = 1512,z = 5}} getthingPos(config[1]) -- retorna 1000,1000,6 getthingPos(config[2]) -- retorna 2000,1512,6
  13. Você acha mesmo que alguém vai adivinhar que sistema de reset você usa? cadê o seu sistema de reset para fazer a door conforme o sistema?
  14. Resumo: Para quem já jogou league of legends, o sistema é "parecido" com o Invite Friends, e para quem não jogou irei dar uma breve descrição sobre o sistema. Descrição: O sistema oferece algumas premiações como: Itens, Premium Days, Premium Points(para site) e Outfits. Claro que isso tudo é configurável. A ideia principal do sistema foi que essas premiações fossem exclusivas do sistema, digamos, que os jogadores só fossem recompensados e tivessem certas outfits se ele atingisse num número "X" de pontos por ter ajudado seu servidor a crescer! Como todo mundo almeja algo exclusivo e difícil de ser obtido, iria instigar os jogadores a usar o sistema e convidar seus amigos para o servidor! Como Funciona o Sistema? O sistema foi planejado para que jogadores "espertinhos" não burlassem o sistema e acontece da seguinte maneira: Temos o jogador João e a jogadora Maria: Maria necessita ser level 30 ou menor que 30(Configurável) para utilizar uma talkactions e dizer por quem foi invitada para o servidor, vamos supor que João a convidou Maria para jogar, João por sua vez necessita também ter um level avançado, digamos 50 ou superior(Configurável). Feito com sucesso o uso do sistema, ele funciona da seguinte maneira: OBS: Você pode dizer o nome do jogador mesmo que ele esteja OFFLINE! OBS2: Um ou mais Players podem ser invitador pelo MESMO JOGADOR! ENTÃO QUANTO MAIS PLAYER VOCÊ CHAMAR, MAIS FÁCIL DE RECEBER PONTOS E PREMIAÇÕES O jogador invitado, no caso o João, teria que atingir um número "X" de pontos para receber premiações, por exemplo: * Com 10 Pontos jogão recebe: Itens * Com 25 Pontos jogão recebe: Itens e Premium Points * Com 50 Pontos jogão recebe: Itens * Com 100 Pontos jogão recebe: Itens, Premium Points, Premium Days e Outifit (Claro que isso é tudo configurável em uma Tabela) E como recebo Recebo esses Pontos VODKART SEU FILHO DA PUTA! Se lembra que João Convidou Maria para Jogar? Então... Maria tem que atingir certos leveis para que João receba esses pontos! Por exemplo a tabela do sistema: levels_win = {[50] = 5,[80] = 6,[100] = 8,[150] = 10} Se Maria atingir level 50, João recebe 5 pontos Se Maria atingir level 80, João recebe 6 pontos Etc... Claro que isso tudo é acumulativo! E sabe o que mais? João recebe Pontos mesmo se estiver ONLINE ou OFFLINE! Sem mais delongas, Vamos instalar o sistema! data\creaturescripts\scripts InviteFriends.lua function onLogin(cid) registerCreatureEvent(cid, "FriendsPoints") if getPlayerStorageValue(cid, _invite_friends.storages[1]) < 0 then setPlayerStorageValue(cid, _invite_friends.storages[1], 0) setPlayerStorageValue(cid, _invite_friends.storages[4], 0) end if getInvitePoints(cid) > 0 then getRewardsFriend(getCreatureName(cid), getPlayerGUID(cid)) end return trueendfunction onAdvance(cid, skill, oldLevel, newLevel) if (skill == SKILL__LEVEL) then if hasInviteFriend(cid) and getPlayerStorageValue(cid, _invite_friends.storages[3]) < newLevel and _invite_friends.levels_win[newLevel] then local f_name, points = getNameFriend(cid), _invite_friends.levels_win[newLevel] local f_pid = getPlayerGUIDByName(f_name) setPlayerStorageValue(cid, _invite_friends.storages[3], newLevel) addInvitePoints(f_name, points) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[invite Friends] você atingiu o level "..newLevel.." e o seu amigou "..f_name.." recebeu "..points.." Friend Points. Obrigado!") if isPlayer(getPlayerByNameWildcard(f_name)) then getRewardsFriend(f_name, f_pid) end end end return trueend creaturescript.xml <event type="login" name="FriendsLogin" event="script" value="InviteFriends.lua"/> <event type="advance" name="FriendsPoints" event="script" value="InviteFriends.lua"/> data\talkactions\scripts InviteFriends.lua function onSay(cid, words, param, channel) local param = param:lower() if param == "" or not param then doPlayerSendCancel(cid, "Você precisa digitar o nome de um jogador.") return true elseif param == "points" then doPlayerPopupFYI(cid,"[+] Invite Friend System [+]\n\nvocê tem ["..getInvitePoints(cid)..] Friends Points.") return true elseif hasInviteFriend(cid) then doPlayerSendCancel(cid, "Você já agradeceu o jogador ["..getNameFriend(cid)..] por te convidar a jogar neste servidor.") return true elseif not getPlayerGUIDByName(param) then doPlayerSendCancel(cid, "Desculpe, mas o jogador [" .. param .. ] não existe.") return true elseif getPlayerLevel(cid) > _invite_friends.level_max or db.getResult("SELECT `level` FROM `players` WHERE `id` = "..getPlayerGUIDByName(param)):getDataInt("level") < _invite_friends.level_need then doPlayerSendCancel(cid, (getPlayerLevel(cid) > _invite_friends.level_max and "Desculpe, mas você precisa ter no minimo level ".._invite_friends.level_max.." para usar este comando." or "Desculpe, mas o jogador ["..param..] precisa ter no minimo level ".._invite_friends.level_need.." para ser escolhido.")) return true elseif getCreatureName(cid):lower() == param then doPlayerSendCancel(cid, "Desculpe, mas você não pode se auto invitar.") return true end doInviteFriend(cid, getPlayerGUIDByName(param)) doPlayerSendTextMessage(cid, 25, "Você indicou o jogador "..param..", este sistema é uma forma de agradecer a vocês por trazerem seus amigos para jogar.") doSendMagicEffect(getCreaturePosition(cid), math.random(28,30)) return trueend talkactions.xml <talkaction words="/invited;!invited" event="script" value="InviteFriends.lua"/> data/lib InviteFriends.lua _invite_friends = { storages = {202301, 202302, 202303, 202304}, -- points, jogador, recompensa lvl, recompensa items level_max = 20, -- até que level ele precisa falar seu friend level_need = 30, -- que lever o jogador precisa ser para ganhar pontos levels_win = { -- leveis que receberão os pontos(feito pelo onAdvance) [50] = 5, [80] = 6, [100] = 8, [150] = 10 }, rewards = { -- a cada tantos pontos, que tipo de reward ele irá receber(automático onLogin) [10] = {items = {{2160,1},{2173,1}}, p_days = 1, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}} }}function getInvitePoints(cid) return getPlayerStorageValue(cid, _invite_friends.storages[1]) < 0 and 0 or getPlayerStorageValue(cid, _invite_friends.storages[1])endfunction hasInviteFriend(cid) return getPlayerStorageValue(cid, _invite_friends.storages[2]) > 0 and true or falseendfunction doInviteFriend(cid, GUID) return setPlayerStorageValue(cid, _invite_friends.storages[2], GUID)endfunction getNameFriend(cid) return getPlayerNameByGUID(getPlayerStorageValue(cid, _invite_friends.storages[2]))endfunction addInvitePoints(name, amount) local pid, Guid = getPlayerByNameWildcard(name), getPlayerGUIDByName(name) if not pid then local getFriendPoints = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) if (getFriendPoints:getID() ~= -1) then db.executeQuery("UPDATE `player_storage` SET `value` = ".. (getFriendPoints:getDataInt("value")+amount) .." WHERE `player_id` = ".. Guid .." AND `key` = ".._invite_friends.storages[1]) end else setPlayerStorageValue(getPlayerByName(name), _invite_friends.storages[1], getInvitePoints(getPlayerByName(name))+amount) end return trueendfunction getRewardsFriend(name, pid) local acc = getAccountIdByName(name) if isPlayer(getPlayerByNameWildcard(name)) then local target = getPlayerByNameWildcard(name) local FriendPoints, CheckPoints = getInvitePoints(target), getPlayerStorageValue(target, _invite_friends.storages[4]) for vod, ka in pairs(_invite_friends.rewards) do local str = "" if FriendPoints >= vod and CheckPoints < vod then str = str.."--> Invite Players System <--\n\nVocê acaba de receber algumas recompensas:\n\nItems: \n"..getItemsFromList(ka.items)..".\n\n" if ka.p_days > 0 then doPlayerAddPremiumDays(target, ka.p_days) str = str.."Premium Days:\n"..ka.p_days.." Premium Days." end if ka.p_points > 0 then db.executeQuery('UPDATE accounts SET premium_points=premium_points+' .. p_points ..' WHERE id=' .. acc) str = str.."Premium Points:\n"..ka.p_points.." Premium Points." end if ka.out[1] > 0 then doPlayerAddOutfit(cid, getPlayerSex(cid) == 0 and ka.out[1] or ka.out[2], 3) str = str.."[New Outfit]\nRecebeu uma Nova Outfit." end setPlayerStorageValue(target, _invite_friends.storages[4], FriendPoints) MandarItensProDp(name, ka.items, str) doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_ORANGE,"[invite Players System] Você Recebeu algumas premiações por estar convidando jogadores para o servidor, Por favor conferir os itens no Depot.") end end end return trueendfunction MandarItensProDp(name, items, texto) local parcel = doCreateItemEx(ITEM_PARCEL) for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(parcel, item, amount) else for i = 1, amount do doAddContainerItem(parcel, item, 1) end end end local carta = doAddContainerItem(parcel, 1952) doItemSetAttribute(carta, "writer", "[+] Invite Players System [+]") doItemSetAttribute(carta, "text", texto) doPlayerSendMailByName(name, parcel) return trueend Configurando o Sistema: *Vá na LIB do sistema que você adicionou* level_max = 30, -- até que level ele precisa falar seu friend level_need = 50, -- que lever o jogador precisa ser para ganhar pontos levels_win = { -- [LEVEL QUE PRECISA ATINGIR] = QUANTIDADE DE PONTOS QUE O OUTRO JOGADOR VAI RECEBER [50] = 5, [80] = 6, [100] = 8, [150] = 10 } rewards = { [10] = {items = {{2160,1},{2173,1}}, p_days = 1, p_points = 0 , out = {0,0}}, [25] = {items = {{2160,2},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [50] = {items = {{2160,3},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [100] = {items = {{2160,4},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [200] = {items = {{2160,5},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [250] = {items = {{2160,6},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, [500] = {items = {{2160,7},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}} } rewards = { [PONTOS NECESSÁRIO PARA OBTER A PREMIAÇÃO] = exemplo: [10] = {items = {{2160,1},{2173,1}}, p_days = 0, p_points = 0 , out = {0,0}}, com 10 pontos ele irá receber aquele itens acima /\ items = {} -- Poderá adicionar itens em uma tabela dizendo {id do item, quantidade} p_days = 0 -- se o jogador vai receber Premium Days? 0 ou Quantidade que vc deseja dar p_points = 0 -- se o jogador vai receber Premium Points? 0 ou Quantidade que vc deseja dar out = {0,0} -- se vai receber outfit? {FEMALE, MALE} OU {0 , 0} para nenhuma. obs:(lembrando que o id das outfits ficam em outfits.xml)
  • Quem Está Navegando   0 membros estão online

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