Histórico de Curtidas
-
lagoa recebeu reputação de demonnskiler em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de Edstompa em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de eguillermojr em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de gomila em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de Jaooo em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de 599663 em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de marlon00x em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa recebeu reputação de qro ot em [Resolvido] [AJUDA] "ERROR: couldn't establish connection to SQL database!"Parceiro, faz o seguinte:
1º: Abra a pasta config.lua
2º: Digite ctrl+f (localizar) e ache esta linha sqlType = "mysql"
3º: Mude para sqlType = "sqlite"
4º: Curta seu servidor, pois creio que já está ok.
Te ajudei parceiro? Me dá rep+
-
lagoa deu reputação a Vodkart em [NPC] Montarias de AluguelVersão testada: 9.1
Descrição: É um npc simples que tem como função alugar determinadas montarias por certo tempo, dias para ser exato.
Em Mods:
AluguelMount.xml
<?xml version="1.0" encoding="UTF-8"?> <mod name="Aluguel Mounts" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="aluguel_func"><![CDATA[ Aluguel_mounts = { ["war horse"] = {price = 10000, days = 2, mountid = 17, level = 10, premium = false, storage = 500561}, ["fire war horse"] = {price = 30000, days = 1, mountid = 23, level = 20, premium = false, storage = 500562}, ["sandstone scorpion"] = {price = 50000, days = 1, mountid = 21, level = 30, premium = true, storage = 500563} } function doRemovePlayerMount(cid, mountId) doPlayerRemoveMount(cid, mountId) return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end function CheckRentMount(cid) for var, ret in pairs(Aluguel_mounts) do if canPlayerRideMount(cid, ret.mountid) and getPlayerStorageValue(cid, ret.storage) ~= -1 and getPlayerStorageValue(cid, ret.storage) <= os.time() then doRemovePlayerMount(cid, ret.mountid) doPlayerSendTextMessage(cid,18,"O tempo da sua montaria "..var.." acabou, para adquirir ela novamente volte ao npc.") end end end ]]></config> <globalevent name="CheckMount" interval="60000" event="script"><![CDATA[ domodlib('aluguel_func') function onThink(interval, lastExecution) local on = getPlayersOnline() if #on > 0 then for i = 1, #on do CheckRentMount(on[i]) end end return true end]]></globalevent> </mod> obs: Checar duas coisas em mods, primeira: Se a função que checa se tem a mount é 'canPlayerRideMount' ou 'getPlayerMount', caso for 'getPlayerMount' trocar: canPlayerRideMount(cid, ret.mountid) por: getPlayerMount(cid, ret.mountid) segunda: o intervalo de tempo na tag do globalevents, no meu server era em mile segundos: interval="60000" -- caso o seu não seja em mile segundos troque 60000 por 60. Data/Npc Peach.xml <?xml version="1.0"?> <npc name="Peach" script="data/npc/scripts/aluguelmounts.lua" walkinterval="50000" floorchange="0"> <health now="1000" max="1000"/> <look type="130" head="0" body="114" legs="114" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. You want to {rent} a {mount}?"/> </parameters> </npc> Data/Npc/Script aluguelmounts.lua domodlib('aluguel_func') local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) if isInArray({'aluguel','alugar', 'rent', 'mounts', 'mount'}, msg) then npcHandler:say("Você pode comprar {war horse}, {fire war horse} e {sandstone scorpion}!", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if Aluguel_mounts[msg] then if Aluguel_mounts[msg].premium == true and not isPremium(cid) then npcHandler:say('Você precisa ser premium para alugar essa montaria.', cid) return true elseif getPlayerLevel(cid) < Aluguel_mounts[msg].level then npcHandler:say('você precisa ter level ' .. Aluguel_mounts[msg].level .. ' ou mais para alugar essa montaria.', cid) return true elseif getPlayerStorageValue(cid, Aluguel_mounts[msg].storage) >= os.time() then npcHandler:say('você já alugou essa montaria!', cid) return true end name,price,stor,days,mountid = msg,Aluguel_mounts[msg].price,Aluguel_mounts[msg].storage,Aluguel_mounts[msg].days,Aluguel_mounts[msg].mountid npcHandler:say('Você quer alugar a montaria '..name..' por '..days..' dia'..(days > 1 and 's' or '')..' no preço de '..price..' gps? {yes}', cid) talkState[talkUser] = 2 else npcHandler:say('Desculpe, eu não vendo essa montaria.', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 2) then if doPlayerRemoveMoney(cid, price) then doPlayerAddMount(cid, mountid) setPlayerStorageValue(cid, stor, os.time()+days*86400) npcHandler:say('Aqui está sua montaria '..name..', ela irá durar até '..os.date("%d %B %Y %X", getPlayerStorageValue(cid,stor))..'.', cid) else npcHandler:say('você não tem dinheiro suficiente para alugar a montaria!', cid) talkState[talkUser] = 0 end elseif msg == "no" then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Configuração:
Em mods tem uma tabela chamada 'Aluguel_mounts'
-
lagoa deu reputação a ViitinG em (Resolvido)[PEDIDO] Script dos Vagões de KazordoonTenta esse para o NPC :
"data/npc/lokur.xml"
<?xml version="1.0" encoding="UTF-8"?> <npc name="Lokur" script="Lokur.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100" /> <look type="69" head="57" body="79" legs="60" feet="114" corpse="6007" /> <voices> <voice text="If you need help with letters or parcels, just ask me. I can explain everything." interval2="100" margin="1" yell="no"/> <voice text="Also selling weekly tickets for the ore wagon service!" interval2="120" margin="1" yell="no"/> <voice text="Welcome to the post office!" interval2="90" margin="1" yell="no"/> </voices> <parameters> <parameter key="message_greet" value="How may I help you |PLAYERNAME|? Ask me for a {trade} if you want to buy something. I can also explain the {mail} system, sell {tickets} for the ore wagon service or give you access to your {bank} account."/> <parameter key="message_farewell" value="Come back if you need my services, |PLAYERNAME|."/> <parameter key="message_walkaway" value="Come back if you need my services, |PLAYERNAME|." /> <parameter key="message_sendtrade" value="Here. Don't forget that you need to buy a label too if you want to send a parcel. Always write the name of the {receiver} in the first line and the name of the {city} in the second line." /> <parameter key="module_shop" value="1" /> <parameter key="shop_buyable" value="parcel,2595,15;letter,2597,8;label,2599,1;" /> </parameters> </npc> "data/npc/scripts/lokur.lua"
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local transaction = {} local transfer = {} local transfer_name = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local function getMoneyCount(s) local b, e = s:find("%d+") return b and e and tonumber(s:sub(b, e)) or -1 end local function doPlayerAddSafeMoney(cid, money) moneyAdd = money freeCap = getPlayerFreeCap(cid) crystalCoins = money >= 10000 and money / 10000 or 0 money = money - crystalCoins * 10000 platinumCoins = money >= 100 and money / 100 or 0 money = money - platinumCoins * 100 goldCoins = money if(freeCap >= (crystalCoins * 0.1 + platinumCoins * 0.1 + goldCoins * 0.1) and doPlayerAddMoney(cid, moneyAdd)) then return true else return false end end -- Check Balance if(msgcontains(msg, "balance")) then balance = getPlayerBalance(cid) if(balance > 100000 and balance < 1000000) then msg = "You certainly have made a pretty penny. " elseif(balance > 1000000 and balance < 10000000) then msg = "Wow, you have reached the magic number of a million gp!!! " elseif(balance > 10000000) then msg = "I think you must be one of the richest inhabitants of Tibia! " elseif (balance < 100000) then msg = "" end npcHandler:say(msg .. "Your account balance is " .. balance .. " gold.", cid) -- Deposit All elseif(msg == "deposit all") then if(getPlayerMoney(cid) > 0) then npcHandler:say("Do you really want to deposit " .. getPlayerMoney(cid) .. " to your bank account?", cid) transaction[talkUser] = getPlayerMoney(cid) talkState[talkUser] = 1 else npcHandler:say("You don't have any money with you.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 end -- Withdraw Money elseif(msgcontains(msg, "withdraw")) then npcHandler:say("How much money would you like to withdraw from your bank account?", cid) talkState[talkUser] = 2 elseif(talkState[talkUser] == 2) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to withdraw.", cid) talkState[talkUser] = 2 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerBalance(cid)) then npcHandler:say("Would you like to withdraw " .. getMoneyCount(msg) .. " gold from your bank account?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 3 elseif (tonumber(msg) < 1) then npcHandler:say("Sure, you want nothing you get nothing!", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 1) then npcHandler:say("How much money would you like to withdraw from your bank account?", cid) elseif(getMoneyCount(msg) > getPlayerBalance(cid)) then npcHandler:say("You don't have enought money on your bank account.", cid) talkState[talkUser] = 0 end -- Deposit Money elseif(msgcontains(msg, "deposit")) then npcHandler:say("How much money would you like to deposit to your bank account?", cid) talkState[talkUser] = 4 elseif(talkState[talkUser] == 4) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to deposit.", cid) talkState[talkUser] = 4 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerMoney(cid)) then npcHandler:say("Would you like to deposit " .. getMoneyCount(msg) .. " gold to your bank account?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 5 elseif(tonumber(msg) < 1) then npcHandler:say("You are joking, aren't you??", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 1) then npcHandler:say("How much money would you like to deposit to your bank account?", cid) elseif(getMoneyCount(msg) > getPlayerMoney(cid)) then npcHandler:say("You don't have enought money with you.", cid) talkState[talkUser] = 0 end -- Transfer Money elseif(msgcontains(msg, "transfer")) then npcHandler:say("Who do you want transfer money to?", cid) talkState[talkUser] = 6 elseif(talkState[talkUser] == 6) then if(getPlayerGUIDByName(string.lower(msg)) > 0 and string.lower(msg) ~= string.lower(getCreatureName(cid))) then transfer[talkUser] = getPlayerGUIDByName(string.lower(msg)) transfer_name[talkUser] = string.lower(msg) npcHandler:say("How much money would you like to transfer?", cid) talkState[talkUser] = 7 else npcHandler:say("There is no such player.", cid) talkState[talkUser] = 0 end elseif(talkState[talkUser] == 7) then if tonumber(msg) == nil then npcHandler:say("Please tell me a {number} you want to transfer.", cid) talkState[talkUser] = 7 return true end if(tonumber(msg) > 0 and getMoneyCount(msg) <= getPlayerBalance(cid)) then npcHandler:say("Would you like to transfer " .. getMoneyCount(msg) .. " to " .. transfer_name[talkUser] .. "?", cid) transaction[talkUser] = getMoneyCount(msg) talkState[talkUser] = 8 elseif(tonumber(msg) < 1) then npcHandler:say("Please think about it. Okay?", cid) talkState[talkUser] = 0 elseif(getMoneyCount(msg) < 0) then npcHandler:say("How much money would you like to transfer?", cid) elseif(getMoneyCount(msg) > getPlayerMoney(cid)) then npcHandler:say("You don't have enought money on your bank account.", cid) talkState[talkUser] = 0 end -- Yes elseif(msgcontains(msg, "yes")) then if(talkState[talkUser] == 1) then if(getPlayerMoney(cid) == transaction[talkUser]) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)+ transaction[talkUser]) npcHandler:say("You deposited " .. transaction[talkUser] .. " gold coins to your bank account.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end elseif(talkState[talkUser] == 3) then if(doPlayerAddSafeMoney(cid, transaction[talkUser])) then doPlayerSetBalance(cid, getPlayerBalance(cid)- transaction[talkUser]) npcHandler:say("You withdrawed " .. transaction[talkUser] .. " gold coins from your bank account.", cid) else npcHandler:say("You don't have anought capacity or slots in backpack to withdraw " .. transaction[talkUser] .. " gold.", cid) end transaction[talkUser] = 0 talkState[talkUser] = 0 elseif(talkState[talkUser] == 5) then if(transaction[talkUser] <= getPlayerMoney(cid)) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)+ transaction[talkUser]) npcHandler:say("You deposited " .. transaction[talkUser] .. " gold coins to your bank account.", cid) transaction[talkUser] = 0 talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end elseif(talkState[talkUser] == 8) then if(transaction[talkUser] <= getPlayerMoney(cid)) then doPlayerRemoveMoney(cid, transaction[talkUser]) doPlayerSetBalance(cid, getPlayerBalance(cid)- transaction[talkUser]) npcHandler:say("You transfered " .. transaction[talkUser] .. " gold coins to " .. transfer_name[talkUser] .. "'s bank account.", cid) if(getPlayerByName(""..transfer_name[talkUser].."")) then doPlayerSetBalance(getPlayerByName(""..transfer_name[talkUser]..""), getPlayerBalance(getPlayerByName(""..transfer_name[talkUser].."")) + transaction[talkUser]) else transferGold(""..transfer_name[talkUser].."", transaction[talkUser]) end transaction[talkUser] = 0 transfer[talkUser] = 0 transfer_name[talkUser] = "" talkState[talkUser] = 0 else npcHandler:say("You don't have enought money.", cid) transaction[talkUser] = 0 talkState[talkUser] = 1 end end elseif(msgcontains(msg, "no")) then npcHandler:say("The customer is king! Come back anytime you want to if you wish to withdraw your money.", cid) talkState[talkUser] = 0 end -- WAGON TICKET if(msgcontains(msg, "ticket")) then if(getPlayerStorageValue(cid, 1131) < os.time()) then npcHandler:say("Do you want to purchase a weekly wagon ticket for 250 gold?", cid) talkState[talkUser] = 1 end elseif(msgcontains(msg, "yes")) then if(talkState[talkUser] == 1) then if(getPlayerMoney(cid) >= 250) then doPlayerRemoveMoney(cid, 250) setPlayerStorageValue(cid, 1131, os.time() + 7 * 24 * 60 * 60 * 1000) npcHandler:say("Thank you for purchasing a wagon ticket.", cid) else npcHandler:say("You don't have enought money.", cid) end talkState[talkUser] = 0 end elseif(talkState[talkUser] == 1) then if(msgcontains(msg, "no")) then npcHandler:say("No then.", cid) talkState[talkUser] = 0 end -- WAGON TICKET end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
lagoa deu reputação a kaiquegabriel em (Resolvido)[PEDIDO] Script dos Vagões de Kazordoonlocal nodes = { [8034] = {x = 32657, y = 31903, z = 8}, -- Depo [8035] = {x = 32606, y = 31905, z = 9}, -- Shops [8036] = {x = 32628, y = 31922, z = 11}, -- Temple [8037] = {x = 32576, y = 31973, z = 9}, -- Main Gate [8038] = {x = 32676, y = 31976, z = 15}, -- Steam Ship } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 1131) > os.time()) then if(getPlayerStorageValue(cid, 1132) < 100) then setPlayerStorageValue(cid, 1132) end doTeleportThing(cid, nodes[item.actionid]) doSendMagicEffect(nodes[item.actionid], CONST_ME_TELEPORT) else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "To travel by ore wagons you must purchase a wagon ticket from any kazordoon's merchant.") end return true end
Tenta assim, vê se dá algum erro.
-
lagoa deu reputação a xWhiteWolf em Darkness Pact QuestHoje vou ensinar vocês a fazer uma quest com bastante RPG (e com um pouquinho de esforço talvez o melhor sistema já visto num OTSERV!!)
É uma quest que você tem um determinado tempo pra matar um monstro e entrar num teleporte ou a passagem será bloqueada
"tá, mas oque difere essa quest de qualquer script de arena que tenha aí pelo fórum?"
na verdade nada, mas no meu server eu coloquei um tempo bem ridículo (8 segundos) e é tecnicamente impossível chegar do outro lado.
"então você fez uma quest que não dá pra fazer, é isso mesmo?"
não meu caro amigo, é uma quest que foi feita pra ser pensada. Um dos players entra na quest e termina ela, daí outro player ativa a alavanca e ele passa.. fazendo com que o pessoal só consiga passar com a ajuda de um amigo. Se você conseguir trabalhar em equipe em prol de um prêmio a sua recompensa é a oportunidade de fazer um pacto com as trevas.
"masoque??"
isso mesmo que você entendeu, você ganha a chance de abrir mão da sua vida (literalmente) pra receber uma spell nova.
~~ Hoje eu vou ensinar a reproduzirem esse sistema caralhudo no server de vocês:
Tudo começa no map editor quando você vai fazer uma área + ou - igual a essa e colocar os seguintes actions/unique ids
Agora vamos aos scripts:
actions\scripts\newquest.lua
Feito isso você vai precisar preparar uma sala aonde o player será teleportado caso ele consiga passar e coloque uma alavanca nessa sala.
Na alavanca você deve colocar o actionid 6102 e uma plaquinha explicando sobre o pacto
daí você adiciona isso no actions.xml
<action actionid="6102" script="alavanca de magia.lua"/> e crie o script 'alavanca de magia.lua' que deverá conter o seguinte:
Feito tudo isso agora só falta criar a magia Target Spell que no caso é essa daqui:
e colocar no spells.xml:
<instant name="Target Spell" words="exevo res" lvl="120" maglv="10" mana="500" exhaustion="3000" prem="0" needlearn="1" script="especiais/seguidor.lua"> <vocation id="6"/> <vocation id="7"/> <vocation id="5"/> <vocation id="8"/> </instant> FIM.
Agora você só precisa editar as actions pra rodarem de acordo com as posições do seu server então vamos às explicações:
SCRIPT1:
local tempo = 8000 ---- tempo até a porta fechar
local wall1 = {x=612, y=345, z=7, stackpos=1} -- local da primeira pedra
local pos1 = getThingfromPos(wall1)
local wall2 = {x=653, y=345, z=7, stackpos=1} --- local da segunda pedra
local pos2 = getThingfromPos(wall2)
local monster1 = {x=615, y=345, z=7, stackpos=1} --- local que cria o monstro, no caso eu uso o Juggernaut mas vc pode editar dentro do script
local posmonster1 = getThingfromPos(monster1)
local monster3 = {x=654, y=345, z=7, stackpos=1} --- Ultima posição antes do teleporte, serve pra remover o monstro
local idparede = 9788 --- id do obstáculo q será criado
local alavanca = {x=610, y=344, z=7, stackpos=1} -- POSIÇÃO DA ALAVANCA
local alavancapos = getThingfromPos(alavanca) SCRIPT2:
local topos = {x=609, y=345, z=7, stackpos=1} -- posição que vai ser teleportado caso clique na alavanca de 'FAIL QUEST'
Espero que vocês tenham curtido
Aqui tem mais duas imagens pra vocês
Alavanca:
Magia:
EXPLICANDO A MAGIA: Os morcegos seguem a direção que você tá olhando, se vc tiver um target eles seguem o target.
-
lagoa deu reputação a Jamison Collins em (Resolvido)[AJUDA] Player não usar !fly.Bem, eu fiz aqui, porém não testei...
local towns = { ["edron"] = {x= 33217, y= 31814, z= 8}, ["ankrahmun"] = {x= 33194, y= 32853, z= 8}, ["thais"] = {x= 32369, y= 32241, z= 7}, ["carlin"] = {x= 32360, y= 31782, z= 7}, ["venore"] = {x= 32957, y= 32076, z= 7}, ["ab'dendriel"] = {x= 32732, y= 31634, z= 7}, ["kazordoon"] = {x= 32649, y= 31925, z= 11}, ["darashia"] = {x= 33213, y= 32454, z= 1}, ["liberty bay"] = {x= 32317, y= 32826, z= 7}, ["port hope"] = {x= 32595, y= 32744, z= 6}, ["svargrond"] = {x= 32209, y= 31134, z= 7}, ["yalahar"] = {x= 32787, y= 31276, z= 7}, ["farmine"] = {x= 33005, y= 31491, z= 11}, ["gray island"] = {x= 33447, y= 31320, z= 9}, ["gengia"] = {x = 32886, y = 30729, z = 5}, ["ghala"] = {x = 31899, y = 32204, z = 6}, ["ghenov"] = {x = 31680, y = 32788, z = 6}, ["vikia"] = {x = 32234, y = 30703, z = 7}, ["pyre"] = {x = 33637, y = 31826, z = 6}, } local floor = {4820, 4822, 4823, 4825} function onSay(cid, words, param, channel) if not isPremium(cid) then doPlayerSendCancel(cid, "Only premium members are allowed to fly or ride.") return false end if getTilePzInfo(getPlayerPosition(cid)) then if not isInArray(floor, getThingFromPos(getPlayerPosition(cid)).itemid) then if towns[param:lower()] ~= nil then doTeleportThing(cid, towns[param:lower()]) doSendMagicEffect(towns[param:lower()], 10) else local l = "" for x,i in pairs(towns) do l = l .. "\n • "..string.sub(x,0,1):upper()..string.sub(x,2):lower() end doPlayerSendTextMessage(cid,4,"Destino inválido. Possíveis destinos:"..l) end else doPlayerSendTextMessage(cid,4,"Voce nao pode usar o comando sob a água.") end else doPlayerSendTextMessage(cid,4,"Comando para premium e so pode ser usado em area PZ.") end return true end -
lagoa deu reputação a MaXwEllDeN em (Resolvido)[AJUDA] Player não usar !fly.[paste]kKrFJMwY[/paste]
-
lagoa deu reputação a xWhiteWolf em (Resolvido)Abrir Ostra e Ganhar Giant Shimmering Pearlpronto
--[[Script made 100% by Night Wolf for lagoa at tibiaking ~~~ enjoy it]] function onUse(cid, item, frompos, item2, topos) local config = { idconcha = XXXX, -- id da concha que vai abrir storaged = 45798, -- storage que será utilizado idperola = 2143, -- id da perola que ganha tempo = 20*60*60, --definido para 20 horas (20 HORAS * 60 MINUTOS * 60 SEGUNDOS) pos = getPlayerPosition (cid), --não mexa chance = 20 -- quanto % tem de chance de abrir a ostra e ganhar pérola } time = os.time() + config.tempo if item.itemid == config.idconcha then if os.time() - getCreatureStorage(cid, config.storaged) >= config.tempo then setPlayerStorageValue(cid, config.storaged, time) doTransformItem(item.uid,7553) if config.chance > math.random(1,100) then doPlayerAddItem(cid, config.idperola) doSendMagicEffect(config.pos,math.random(28,30)) --aqui é a parte do efeito, coloquei um random entre o efeito 28~30 que são os fogos de artificio doPlayerSendTextMessage(cid, 19, "You are real lucky, a "..getItemNameById(config.idperola).."!") else doPlayerSendTextMessage(cid, 19, "The oyster was empty. Better luck next time!") end else doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You must wait "..config.tempo/3600 .." hours to open another oyster. Next available will be at: " ..os.date("%c", getPlayerStorageValue(cid, config.storaged)).. " (Mes/Dia/Ano e horario).") end end return true end -
lagoa deu reputação a xWhiteWolf em (Resolvido)Abrir Ostra e Ganhar Giant Shimmering Pearlno corpo de um water elemental você diz com ele vivo ou no corpo morto dele após ele morrer? porque se for no corpo é só colocar isso kkkk
local config = { waters = {4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}, fishable = {4608, 4609, 4610, 4611, 4612, 4613, 7236}, spawning = {4614, 4615, 4616, 4617, 4618, 4619}, holes = {7236}, corpses = { -- [corpse] = {[aid] = { {itemid, countmax, chance} }} [10499] = { {7632, 1, 8600}, --giant shimmering pearl {7633, 1, 8600}, --giant shimmering pearl [101] = { {2226, 1, 16000}, --fish bone {2238, 1, 15000}, --leather boots {2148, 1, 15000}, --gold coin {2376, 1, 14000}, --sword {2152, 1, 13000}, --platinum {7589, 1, 13000}, --strong mana potion {7588, 1, 13000}, --strong health potion {2168, 1, 11500}, --life ring {2167, 1, 15000}, --energy ring {9810, 1, 9500}, --rusty armor {9813, 1, 9500}, --rusty legs {7632, 1, 8600}, --giant shimmering pearl {7633, 1, 8600}, --giant shimmering pearl {7158, 1, 3100}, --rainbow trout {7159, 1, 3100}, --green perch {2146, 1, 11500}, --small sapphire {2149, 2, 11500}, --small emerald {10220, 1, 1500} --leviathan's amulet }, [102] = { {2226, 1, 16000}, --fish bone {2238, 1, 15000}, --leather boots {2148, 1, 15000}, --gold coin {2376, 1, 14000}, --sword {2152, 1, 14000}, --platinum {7589, 1, 14000}, --strong mana potion {7588, 1, 14000}, --strong health potion {2168, 1, 15500}, --life ring {2167, 1, 16000}, --energy ring {9810, 1, 11500}, --rusty armor {9813, 1, 11500}, --rusty legs {7632, 1, 9600}, --giant shimmering pearl {7633, 1, 9600}, --giant shimmering pearl {7158, 1, 5100}, --rainbow trout {7159, 1, 5100}, --green perch {2146, 1, 13500}, --small sapphire {2149, 2, 13500}, --small emerald {10220, 1, 2500} --leviathan's amulet } } }, checkCorpseOwner = getConfigValue("checkCorpseOwner"), rateLoot = getConfigValue("rateLoot"), summons = { -- {skill, name, chance, bossName, bossChance} }, rateSpawn = getConfigValue("rateSpawn"), baitFailRemoveChance = 10, allowFromPz = false, useBait = true, baitCount = 1, fishes = 1 } config.checkCorpseOwner = getBooleanFromString(config.checkCorpseOwner) function onUse(cid, item, fromPosition, itemEx, toPosition) if(isInArray(config.waters, itemEx.itemid)) then if(isInArray(config.spawning, itemEx.itemid)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY) return true end local corpse = config.corpses[itemEx.itemid] if(corpse ~= nil and corpse ~= 0) then corpse = corpse[itemEx.actionid] if(corpse ~= nil and corpse ~= 0) then if(config.checkCorpseOwner and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then local owner = getItemAttribute(itemEx.uid, "corpseowner") if(owner ~= 0 and owner ~= nil and owner ~= getPlayerGUID(cid)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUARENOTTHEOWNER) return true end end local chance, items, default, max = math.random(0, 100000) / config.rateLoot, {}, {}, 0 for _, data in ipairs(corpse) do if(data[3] >= chance) then local tmp = {data[1], math.random(1, data[2])} table.insert(items, tmp) end if(data[3] > max) then default = data max = data[3] end end local itemCount = table.maxn(items) if(itemCount > 0) then local loot = items[math.random(1, itemCount)] doPlayerAddItem(cid, loot[1], loot[2]) else doPlayerAddItem(cid, default[1], default[2]) end doTransformItem(itemEx.uid, getItemInfo(itemEx.itemid).decayTo) doSendMagicEffect(toPosition, CONST_ME_WATERSPLASH) doDecayItem(itemEx.uid) return true end end if(not isInArray(config.fishable, itemEx.itemid)) then return false end local position, formula, tries = getThingPosition(cid), getPlayerSkill(cid, SKILL_FISHING) / 200 + 0.85 * math.random(), 0 config.allowFromPz = config.allowFromPz or not getTileInfo(position).protection if(item.itemid ~= ITEM_MECHANICAL_FISHING_ROD) then if(config.allowFromPz and (not config.useBait or getPlayerItemCount(cid, ITEM_WORM) >= config.baitCount)) then tries = 1 if(isInArray(config.holes, itemEx.itemid)) then if(doPlayerRemoveItem(cid, ITEM_WORM, config.baitCount)) then tries = 2 if(formula > 0.83) then doPlayerAddItem(cid, ITEM_RAINBOW_TROUT, config.fishes) elseif(formula > 0.7) then doPlayerAddItem(cid, ITEM_NORTHERN_PIKE, config.fishes) elseif(formula > 0.5) then doPlayerAddItem(cid, ITEM_GREEN_PERCH, config.fishes) else doPlayerAddItem(cid, ITEM_FISH, config.fishes) end end elseif(formula > 0.7 and doPlayerRemoveItem(cid, ITEM_WORM, config.baitCount)) then tries = 2 if(table.maxn(config.summons) > 0 and getDistanceBetween(position, toPosition) < 2) then local skill, summon = getPlayerSkill(cid, SKILL_FISHING), {name = "", chance = 0, bossName = "", bossChance = 0} for _, data in pairs(config.summons) do if(skill >= data[1]) then summon.name = data[2] summon.chance = data[3] summon.bossName = data[4] summon.bossChance = data[5] end end local random = math.random(1, 100000) / config.rateSpawn if(summon.bossName ~= "" and summon.bossChance >= random) then doCreateMonster(summon.bossName, position) tries = 4 elseif(summon.name ~= "" and summon.chance >= random) then doCreateMonster(summon.name, position) tries = 3 else doPlayerAddItem(cid, ITEM_FISH, config.fishes) end else doPlayerAddItem(cid, ITEM_FISH, config.fishes) end end end elseif(config.allowFromPz and (not config.useBait or getPlayerItemCount(cid, ITEM_NAIL) >= config.baitCount)) then if(formula > 0.7 and doPlayerRemoveItem(cid, ITEM_NAIL, config.baitCount)) then doPlayerAddItem(cid, ITEM_MECHANICAL_FISH, config.fishes) tries = 2 else tries = 1 end end if(tries > 1) then doPlayerAddSkillTry(cid, SKILL_FISHING, tries) if(not isInArray(config.holes, itemEx.itemid)) then doTransformItem(itemEx.uid, itemEx.itemid + 6) else doTransformItem(itemEx.uid, itemEx.itemid + 1) end doDecayItem(itemEx.uid) elseif(tries > 0) then doPlayerAddSkillTry(cid, SKILL_FISHING, 1) if(config.baitFailRemoveChance >= math.random(1, 100)) then if(item.itemid == ITEM_MECHANICAL_FISHING_ROD) then doPlayerRemoveItem(cid, ITEM_NAIL, config.baitCount) else doPlayerRemoveItem(cid, ITEM_FISH, config.baitCount) end end end doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY) return true end se der erro muda essa parte aqui (tira a ultima virgula)
[10499] = { {7632, 1, 8600}, --giant shimmering pearl {7633, 1, 8600}, --giant shimmering pearl ficando assim
[10499] = { {7632, 1, 8600}, --giant shimmering pearl {7633, 1, 8600} --giant shimmering pearl 10499 é o corpo do water elemental, 7632 e 7633 são os Id's das giant shimmering pearls, 1 é a quantidade que ganha e 8600 é a chance. (essa chance é em 100.000)
-
lagoa recebeu reputação de Versteckt em Training Off e Trainers!Seguinte Galera... cansei de só ficar pedindo ajuda pra isso e ajuda pra aquilo e nunca ajudar ninguém.
Trouxe uns mapas meus para ajudar a incentivar alguns. Espero que gostem e me reputem positivamente. Caso haja muito interesse, posso colocá-los para download.
Abraços.
Este trainer foi inspirado na nova venore.
Esta foto é uma visão pelo Remere's dos Trainers.
Esta foto é onde o player será teleportado nos trainers.
Nesta foto, vemos um npc que é responsável por levar o player de volta ao templo de Thais.
Nesta foto vemos os lugares de treinamentos, e os training monks usam spells (de enfeite) frequentemente para dar um ar de ambiente mais agradável e com constante movimento.
Esta foto se refere às escadas que dão acesso ao nível superior dos trainers.
Esta é uma visão do nível superior dos trainers.
Nesta fotos temos uma visão para o térreo.
TRAINERS OFF LINE!!!
Uma visão dos trainers off pleo Remere's.
Mostra o início dos trainers off.
Apenas um detalhe.
Mais um detalhe para incrementar o mapa.
Enfim, os trainers.
Bom, espero que tenham gostado e que também me reputem, pois estou precisando (rsrsrsrsrsrs). Valeu e abraços.
-
lagoa recebeu reputação de hakunamatata em [Pedido] Scripts ArmasAmigo, creio que quase tudo na vida exista, inclusive estes scripts... o 1º eu não conheço, mas algum scripter poderia fazer fácil (doplayercondition_paralize) ou algo assim. Já o 2º script você pode achá-lo facilmente e bem explicado aqui http://tibiaking.com/forum/topic/16187-wand-muda-de-efeito/. O 3º script também tem que ser com algum scripter... gogo galera ajudar o carinha
Te Ajudei ? +REP
-
lagoa deu reputação a Vampira em [Tutorial] Adicionando novas montarias#Adicionando mounts em server 8.7+
Tutorial:
Neste tuto vou ensinar a vocês como adicionar mais mounts em seu server 8.7+ que já tenha mount sistem, como por exemplo um War Wolf
Va em seu Mounts.xml
E adicione a tag com seu ID e nome <mount id="-" clientid="-" name="--" speed="--" /> * Mount id eh a identificaçao de sua montaria... no caso sempre ponha 1 a mais q o anterior. * O Client ID é o looktipe de sua Outfit. * Name é o nome de sua montaria. * Speed é a velocidade que a montaria oferece. * Vamos fazer com um War Wolf... que seu Outfit eh o numero 3 Logue o GOD e verá que o War Wolf já estará disponível para uso! OBS: Você só conseguira com alguns monstros, pois nem todos se encaixam na outfit. Para liberar essa montaria para outros players use esse script Mude o 13 para o ID de outras mounts caso você crie outras... doPlayerAddMount pode ser usado em actions... talkactions.. quests... varias coisas Vamos fazer um script pra mostrar como ficaria o script de onUse Adicionando esse script em data\actions\scripts com o nome de Mount13.lua ( 2346 é o ID do item a ser usado para o player adiquirir a mount que no caso é Tear of Daraman, você pode mudar para o item que presisar) E a tag em Actions.xml:
Pronto já esta tudo configurado!
Você também pode criar seus próprios sprites de mounts...
Pegue um sprite de mount jah criado e tente enquadrar o seu sprite parecido com o outro... tipo assim:
Faça a cela ficar parecida!!
Creditos: eu pelo tutorial, rodri xd pelas imagens
Ajudei? REP+
-
lagoa deu reputação a MaXwEllDeN em [Resolvido] Configurar item para subir com corda!Abra a pasta do seu servidor, depois abra esse arquivo `data\actions\scripts\tools\rope.lua`, lá você vai encontrar algo parecido com isso:
local spotId = {384, 418, 8278, 8592}
deixe assim:
local spotId = {384, 418, 8278, 8592, 13189, 12202}
Só é você ir adicionando ou removendo os ítens que queira que funcionem, ou não.
-
lagoa deu reputação a Bruno Carvalho em Alissow Ots 5.0 [17/03/2013]lissow Server 5.0
Provavelmente vocês estão pensando "mas que diabo de OTS é esse?", afinal, já faz 2 anos desde que a ultima versão foi lançada e desde lá prometemos algo que não foi cumprido - até agora -, uma versão nova. ENFIM, TEMOS AGORA A MAIS NOVA VERSÃO DE UM DOS SERVIDORES MAIS AVACALHADOS JOGADOS DOS ULTIMOS TEMPOS. Mas eu tenho uma má noticia, está incompleto.
Sim, o mapa está inacabado. Muitas coisas que eu planejei fazer nele eu não completei. Boa parte Eu ajudei a terminar, adicionando o resto dos caminhos básicos e os monstros. mas mapa inacabado não quer dizer que não está jogável, quer dizer que faltou detalhar (Ex: x:55 y: 137 z: 9, x: 104 y: 140 z: 7, etc).
A ultima versão foi baixada mais de 50 mil vezes e esperamos que essa versão faça o mesmo sucesso.
By
Alissow
Comedinha
XedeguX
Contribuidores:
Objetivo do projeto:
Criar um servidor com base na versão mais atualizada do tibia com vários sistemas onde o mapa é feito para exploração com um grande nivel de RPG.
Sobre o OT/Mapa:
Principais quests:
-Annihilator
-Inquisition Quest
-Pits of inferno
-Demon Oak
-Solar axe quest
-HOTA
-MPA quest
-The Challenger
Monstros:
-Total monstros: 10749
-Total spawn: 5000+
Cidades:
-11 Cidades
-200 Houses+-
Raids/Invasões:
-Rat
-Ghazbaran
-Giant spider/The old window
-Ferumbras
-Morgaroth
Spells:
-Magias balanceadas parecidas com a do tibia global
Changelog
Alissow OTs 3.5 [bETA] 06/08/2009
Alissow OTs 3.5 [Patch 3.5.1] 07/08/2009
Alissow OTs 3.6 10/08/2009
Alissow OTs 3.7 BETA 18/12/2009
Alissow OTs 3.7.1 18/12/2009
Alissow OTs 3.8 17/01/2010
Alissow OTs 3.8 Minor Patch 1 17/01/2010
Alissow OTs 3.9 06/02/2010
Alissow OTs 4.0 04/06/2010
Alissow OTs 4.11 11/07/2010
Alissow OTs 5.0 17/03/2013
- Atualizado para a versão 9.83 (Comedinhasss, Tfs Team)
- Sistemas novos para a nova versão, montaria, war system, etc. (Comedinhasss, Tfs Team)
- Rep System e Antbot Removido. (Comedinhasss)
- 64 Quests reformuladas. (Comedinhasss/Alissow)
- Novo sistema de dicas a cada 15 min. - (Comedinhasss)
- Novo sistema de map marks ao entrar no servidor. (Comedinhasss)
- Organização geral em Actions e Moveevents. (Comedinhasss)
- Nova organização nos monstros agora usando os que não tem no tibia original na pasta monsters em mods. (Comedinhasss)
- Npcs sem utilidade removidos (Comedinhasss)
- Alavanca de runas e potions reformuladas (Comedinhasss, Alissow)
- Bug PZ nas Hydras arrumado (Alissow)
- Cidade principal parcialmente reformulada (Alissow)
- Cidade de Flam totalmente reformulada (Alissow)
- As lojas agora não são mais areas PZ (Alissow)
- Corrigido erros em portas que não deveriam abrir, e portas que não deveriam fechar (Alissow)
- Continente de Zao removido? (Alissow)
- Arrumado bugs onde podia-se pegar items na ferumbras tower e vários outros lugares (Alissow)
- Arrumado caminho da "inquisition" (Alissow)
- Respawns recolocados em algumas áreas de yalahar, dragons, elfs Hydras, Dark magicians e apprentices (Alissow)
- Nova entrada para arena (Svargrond) na cidade principal e funcionando! (Alissow)
- Elevado nível de dificuldade da Arena (Svargrond) (Alissow)
- Nova localização da Ferumbras Tower (Alissow)
- Cidade de Mistyc removida? (Alissow)
- Novo sistema premium igual ao global. (Comedinhasss)
- Sistema de bless reformulado e agora por items. (Comedinhasss)
- Sistema de portais/teleports (Comedinhasss, Alissow)
- Sistema offline training (Comedinhasss, TFS)
- Sistema de casamento trocado (Comedinhasss, Outros)
- Spells (OTX)
Imagens
Download
Servidor: MediaFire
Tamanho: 16.09 MB
Windowns: Clique Aqui
Linux (Debain): Clique Aqui
Scan VirusTotal: Clique Aqui
Atenção
- Acc do God: admin/admin
- LEIA o tópico antes de postar qualquer coisa ou duvida
- Reportem se houver algum bug
- Favor, não use nosso distro sem o nosso consenso, obrigado.
- O changelog vai ta 9.6 mais é 9.83 (Falha minha huehue')
- Offline Train Level configurado no config.lua em levelToOfflineInBed
- As estatuas de offline que ficam no templo não funcionam por serem enfeites
- Para tirar o , previwer do nome, no config.lua em serverPreview mude para false
- Todos os addons são vendidos menos o demon que eu acabei esquecendo de coloca
- Comandos personalizados: /ta - itens pro sv inteiro, /tp - locais do mapa, /p - tem na minha assinatura ensinando, /e - abrir e fechar portal(open, close).
- Para usar os portais você primeiro deve explorar a área indo até ela
- Tem alguns segredinhos e lugares escondidos muito legais para vocês descobrirem
-
lagoa deu reputação a LucasDipic em [Resolvido] (Dúvida) NPC com Look Type de itemSe for pra ele ficar parado se eu não me engano muda isso walkinterval="1000" pra walkinterval="0"
OBS: Não sei se isso ta certo '-'
-
lagoa deu reputação a Moose em Script de teleporte para encantar pedras por vocação e levelBaixe o anexo extraia coloca a pasta na pasta data/movements/scripts
depois abre o movements.xml e adicione:
alters.rar
-
lagoa deu reputação a Gustavo Ferreira em [Evento] Defend The King - A monarquia do REIBom sem mais nem menos tá ai o Defend The King, Evento Atualmente vendido por empresas de Otserver!
Pack Contém: Todos Scripts do Evento + Mapa
Download: http://www.mediafire...7p2jkly4hv5y9om
Descrição:
É um sistema de WAR, onde 2 grupos ( atacantes e defensores ) se confrontam entre si em um castle, com os seguintes objetivos:
Atacantes: Matar o The King ( o rei ), que fica dentro do castelo defendidos pelos Defensores
Defensores: Defender o The King durante um determinado tempo pré definido.
#Extras:
- Respawn to back: Se um player morrer no evento, tera de esperar 5segundos * (vezes) o numeros de mortes naquela rodada.
- The Gate: um gate é sumonado no mapa para impedir temporariamente a entrada dos atacantes ao castelo.
- The King: Summon que pode ser paralizado ou nao, para se esconder dos atacantes. Existe somente um summon durante a rodad
.
-
lagoa deu reputação a Guilherme. em Lottery SystemLottery System 1.0
Vá em data\globalevents\scripts e crie um arquivo chamado lottery.lua, coloque isso dentro, salve e feche:
-- Lottery System local config = { lottery_hour = "2 Hours", -- Tempo ate a proxima loteria (Esse tempo vai aparecer somente como broadcast message) rewards_id = {2527, 7428, 6531, 2160}, -- ID dos Itens Sorteados na Loteria crystal_counts = 500, -- Usado somente se a rewards_id for crystal coin (ID: 2160). website = "no" -- Only if you have php scripts and table `lottery` in your database! } function onThink(interval, lastExecution) if(getWorldCreatures(0) == 0)then return true end local list = {} for i, tid in ipairs(getPlayersOnline()) do list[i] = tid end local winner = list[math.random(1, #list)] local random_item = config.rewards_id[math.random(1, #config.rewards_id)] if(random_item == 2160) then doPlayerAddItem(winner, random_item, config.crystal_counts) doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. config.crystal_counts .. " " .. getItemNameById(random_item) .. "s! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") else doBroadcastMessage("[LOTTERY SYSTEM] Winner: " .. getCreatureName(winner) .. ", Reward: " .. getItemNameById(random_item) .. "! Congratulations! (Proxima Loteria em " .. config.lottery_hour .. ")") doPlayerAddItem(winner, random_item, 1) end if(config.website == "yes") then db.executeQuery("INSERT INTO `lottery` (`name`, `item`) VALUES ('".. getCreatureName(winner) .."', '".. getItemNameById(random_item) .."');") end return true end
Agora vá em data\globalevents\globalevents.xml e adicione essa TAG:
Vermelho: Tempo em que a Loteria vai ser executada.
Pronto, seu Sistema de Loteria esta terminado!