Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''talkaction''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. Olá galera do xtibia , venho trazer para vocês um sistema que muito simples mais também pode ser muito útil para pessoas que tem seu servidor sem site é gostaria de por um sistema desse no seu servidor ! Bom vamos lá este script e o seguinte através do script você poderá configurar a quantidade de dias de premium ou vip será necessário para a mudança de nome , quando o player usar o comando exempo : !mudarnome Xtibia , o player será kikado ao relogar já não irar ta mais os dias de vip que ele usou para trocar o nome ! Testado em TFS 0.3.6 , TFS 0.4 , Versões 8.54 , 8.6 Bom vamos ao script : vá em talkactions/script crie um arquivo lua chamado "mudarnome" é cole isso dentro : Lembrando Este e para premium Account : Este é para servidores que possui o sistema de vip normal, não através de premium account : Agora Vá em talkactions.xml é adicione essa tag : <talkaction words="!mudarnome;/mudarnome" event="script" value="mudarnome.lua"/> Local Onde você configura os dias de vip que vai custar para mudar ! elseif(getPlayerVipDays(cid) < 6) then Creditos : 80% Desconhecido 20% AdilsonHacker ( eu por editar algumas coisas ) Espero Ter Ajudado ! Abraços @up
  2. Bom, o Script, foi eu que fabriquei, e vocês podem edita-los, e postarem novamente, mais lembrando que fique com meus créditos. O comando /mute "nome do player é simples, de faze-lo e usa-lo! Como usar: /mute "Nick do Player No script abaixo, está para dar muted de 10,000 Segundos! Seuot/data/talkactions/scripts/Mute.lua Ai em talkactions.xml adicione Se gostaram comentem! Pra quem nao gosto me da um Motivo!
  3. Laziness Shop Tive uma ideia bem legal, após eu me aprofundar em Looping. Este sistema você pode comprar runas e potions e outros items que quiser adicionar por comando, tornando seu character sedentário, não precisa ir ao NPC, rsrs. Instalação Vá em data/talkactions/scripts, copie algum arquivo da pasta e cole, renomeie para laziness_shop.lua e adicione dentro: Abra com o bloco de notas o arquivo talkactions.xml e adicione essa tag: <talkaction words="!comprar;/comprar;!shop;/!shop" event="script" value="laziness_shop.lua"/> Configuração ["blank"] = {eachPrice = 10, id = 2260}, Entre chaves ([ e ]), coloque oque fala para comprar o item, "eachPrice" o preço de cada unidade dele e "id" é o Item ID do mesmo. Para adicionar novos items, é só colocar uma linha igual debaixo desse e editá-la: ["hp"] = {eachPrice = 10, id = 7620}, Demonstração Ensinamentos Looping: MaXwEllDeN
  4. Gift System Saudações galerinha linda, vim trazer para vocês um comando bem legal e útil, no qual você pode presentear sua namorada, seu amigo ou seu parceiro ¬¬ Instalação Vá em data/talkactions/scripts, copie algum arquivo da pasta e cole, renomeie para gift_system.lua e adicione dentro: Em talkactions.xml adicione essa tag: <talkaction words="!gift;/gift" event="script" value="gift_system.lua" /> Configuração Siga nesta parte do código logo abaixo, e edite conforme citado: local gifts = { ["magic sword"] = {price = 500000, id = 2400}, ["dsm"] = {price = 500000, id = 2492}, ["mpa"] = {price = 500000, id = 2472}, ["mms"] = {price = 500000, id = 2514}, ["dsl"] = {price = 500000, id = 2469}, } Cada linha representa um GIFT, entre chaves ([ e ]) você coloca entre aspas o nome do item que ele vai presentear, price você coloca o preço a pagar e id o Item ID deste presente. Demonstração Print by: Overxin
  5. Olá. Tomara que eu tenha postado em area correta porque sinceramente não sei. Mas vamos lá. Minha talkaction online.lua informa: Quantidade de players online, nome de players online, level de players online. Obs: Na (s) ultima (s) linha (s), estão escalados os jogadores que acabaram de entrar. Oque eu quero pedir? Vejamos: Por enquanto, informar o numero de jogadores online, e só. Já tentei retirar algumas strings, mas o que aconteceu foi que quando o jogador usa !online, aparece um monte de linha se tiver muitos jogadores, linhas em branco e se estiver acima de 150 jogadores, a pessoa que quizer saber quantos online tem, deve então tem que subir muito na aba. Para facilitar quero apenas o numero de jogadores online e na(s) linha(s) de baixo, os 10 ultimos jogadores que acabaram de entrar. Não sei nem cmo funciona meu script, mas eh padrão. N sei como ele consegue informar quem acabou de fazer login. Segue scripts: local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player(s) online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end return true end
  6. Bom, eu vou explicar o sistema... A maior parte do sistema vip usar o globalevent para remover um dia de vip a cada 24 horas, mas, e se o seu serv tem 23 horas de uptime é um problema. O dia não poderia ser removido, até eu fixar ele, agora o dia de vip será removido em uma hora específica, se você configurá-lo para duas horas, o dia vip será removido em duas horas por isso, se o serv cair para ele como 3 minutos ainda irá remover os dias vip em duas horas. Ele funciona para toda a conta, assim como uma conta premium. Testado em TheForgottenServer 0.3.6 / 0.4 Este sistema VIP contém: Próprias funções Lua Automática removedor dia. OnLogin script para verificar vip. Remover Comando Dias Vip. Adicionar comando Dias Vip. Auto teleporter templo quando vipdays mais!. Agora vamos da incio ao nosso Tutorial. 1° Execute isso no seu phpmyadmin. ALTER TABLE `accounts` ADD `vipdays` int(11) NOT NULL DEFAULT 0; 2° Vai até data/lib/function.lua e adicione isto na primeira linha: --- Vip functions by Kekox function getPlayerVipDays(cid) local Info = db.getResult("SELECT `vipdays` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. " LIMIT 1") if Info:getID() ~= LUA_ERROR then local days= Info:getDataInt("vipdays") Info:free() return days end return LUA_ERROR end function doAddVipDays(cid, days) db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` + " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") end function doRemoveVipDays(cid, days) db.executeQuery("UPDATE `accounts` SET `vipdays` = `vipdays` - " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") end 3° Vai até data/creaturescript/scripts/login.lua e registrar esse coder: registerCreatureEvent(cid, "VipCheck") E logo após crie um arquivo com o nome vipcheck.lua dentro de data/creaturescript/scripts/ e adicione dentro do arquivo criado este coder: --- Script by Kekox function onLogin(cid) if getPlayerVipDays(cid) >= 1 then doPlayerSendTextMessage(cid, 19, "You have ".. getPlayerVipDays(cid) .." vip days left.") end return true end E em data/creaturescript/creaturescripts.xml: <event type="login" name="VipCheck" event="script" value="vipcheck.lua"/> 4° Agora vei até data/globalevents/scripts/ crie um arquivo.lua com o nome daysremover.lua e adicione este coder ao arquivo criado: --- Script by Kekox function onTimer() db.executeQuery("UPDATE accounts SET vipdays = vipdays - 1 WHERE vipdays > 0;") return true end E logo após em data/globalevents/globalevents.xml adicione: <globalevent name="VipDaysRemover" time="00:01" event="script" value="daysremover.lua"/> Você pode alterar o tempo quando: (hora = "00:01"). Se você tem um dia a mais ou a menos de vip, quando você fizer login vai receber uma mensagem: VIP Tile 5º Agora vamos até data/movements/scripts/viptile.lua Adicione este coder: --- Script by Kekox function onStepIn(cid, item, position, fromPosition) if getPlayerVipDays(cid) == 0 then doTeleportThing(cid, fromPosition, FALSE) end return true end E logo após em data/movements/movements.xml <movevent type="StepIn" actionid="13500" event="script" value="viptile.lua"/> VIP days command 6° Vai até data/talkactions/scripts/adddays.lua Adicone este coder: --- Script by Kekox. function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") t[1] = tonumber(t[1]) if(not t[1]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.") return true end local pid = cid if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end if(t[1] > 365) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.") return true end sender = getPlayerByNameWildcard(cid) doAddVipDays(pid, t[1]) doPlayerSendTextMessage(cid, "You have added ".. t[1] .." vip days to ".. t[2]) doPlayerSendTextMessage(pid, sender .." just added you ".. t[1] .." vip days.") return true end Em data/talkactions/talkactions.xml/ adicione: <talkaction log="yes" words="/adddays" access="5" event="script" value="adddays.lua"/> Remove VIP days command 7° Em data/talkactions/scripts/removedays.lua adicione: --- Script by Kekox fixed by Shawak. function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local t = string.explode(param, ",") t[1] = tonumber(t[1]) if(not t[1]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.") return true end local pid = cid if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end if(t[1] > 365) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can only add max 365 vip days.") return true end sender = getPlayerByNameWildcard(cid) doRemoveVipDays(pid, t[1]) doPlayerSendTextMessage(cid, "You have removed ".. t[1] .." vip days to ".. t[2]) doPlayerSendTextMessage(pid, sender .." just removed you ".. t[1] .." vip days.") return true end E em data/talkactions/scripts/talkactions.xml/ adicione: <talkaction log="yes" words="/removedays" access="5" event="script" value="removedays.lua"/> VIP Door 8° Em data/actions/scripts/vipdoor.lua adicione: function onUse(cid, item, frompos, item2, topos) if getPlayerVipDays(cid) >= 1 then pos = getPlayerPosition(cid) if pos.x == topos.x then if pos.y < topos.y then pos.y = topos.y + 1 else pos.y = topos.y - 1 end elseif pos.y == topos.y then if pos.x < topos.x then pos.x = topos.x + 1 else pos.x = topos.x - 1 end else doPlayerSendTextMessage(cid,22,"Stand in front of the door.") return true end doTeleportThing(cid,pos) doSendMagicEffect(topos,12) else doPlayerSendTextMessage(cid,22,'Only VIP Account can go there.') end return true end Em data/actions/actions.xml adicione: <action actionid="2112" event="script" value="vipdoor.lua"/> Effect only for VIP players 9° Em globalevents/scripts/vipEffect.lua adicione: function onThink(interval, lastExecution) for _, name in ipairs(getOnlinePlayers()) do local cid = getPlayerByName(name) if getPlayerVipDays(cid) >= 1 then doSendMagicEffect(getPlayerPosition(cid), 27) doSendAnimatedText(getPlayerPosition(cid), "VIP!", TEXTCOLOR_RED) end end return true end Em data/globalevents/globalevents.xml adicione: <globalevent name="vipEffect" interval="2" script="vipEffect.lua"/> Auto temple teleporter quando VIP days acabar! 10° Em data/creaturescripts/scripts/templeteleport.lua adicione: function onLogin(cid) if getPlayerVipDays(cid) > 0 then setPlayerStorageValue(cid, 20500, 1) elseif getPlayerVipDays(cid) == 0 and getPlayerStorageValue(cid, 20500) == 1 then doTeleportThing(cid, getPlayerMasterPos(cid)) setPlayerStorageValue(cid, 20500, -1) end return true end Em data/creaturescripts/scripts/login.lua register: registerCreatureEvent(cid, "TempleTeleporter") E em data/creaturescripts/creaturescripts.xml adicione: <event type="login" name="TempleTeleporter" event="script" value="templeteleport.lua"/> Functions usadas: getPlayerVipDays(cid) --- Usá-lo para verificar quantos dias vip o jogador tem. doAddVipDays(cid, days) --- Use-o para adicionar dias vip para alguém. doRemoveVipDays(cid, days) --- Use-a para remover dias vip para alguém. Creditos: Kekox
  7. Alguém me ajuda esse script de reset quando da look nao mostra a quantidade de reset alguem poderia ajudar aew? function onSay(cid, words, param, channel) config = { RemainingLvl=8, exper=4200, pid=getPlayerGUID(cid), batle="yes" } function getPlayerResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if (config.batle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.") return TRUE end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return TRUE end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 85 then if getPlayerLevel(cid) >= 780 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 780 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 80 then if getPlayerLevel(cid) >= 730 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 730 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 75 then if getPlayerLevel(cid) >= 680 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 680 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 70 then if getPlayerLevel(cid) >= 630 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 630 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 65 then if getPlayerLevel(cid) >= 590 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 590 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 60 then if getPlayerLevel(cid) >= 550 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 550 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 55 then if getPlayerLevel(cid) >= 510 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 510.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 50 then if getPlayerLevel(cid) >= 480 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 480 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 45 then if getPlayerLevel(cid) >= 450 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 450 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 40 then if getPlayerLevel(cid) >= 430 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 430 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 35 then if getPlayerLevel(cid) >= 410 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 410 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 30 then if getPlayerLevel(cid) >= 390 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 390") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 25 then if getPlayerLevel(cid) >= 380 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 380 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 20 then if getPlayerLevel(cid) >= 365 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 365 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 15 then if getPlayerLevel(cid) >= 360 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 360 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 10 then if getPlayerLevel(cid) >= 355 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 355 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 5 then if getPlayerLevel(cid) >= 350 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 350 .") end end -- Resets Vips -- ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 85 then if getPlayerLevel(cid) >= 770 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 770 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 80 then if getPlayerLevel(cid) >= 720 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 720 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 75 then if getPlayerLevel(cid) >= 670 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 670 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 70 then if getPlayerLevel(cid) >= 620 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 620 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 65 then if getPlayerLevel(cid) >= 580 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 580 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 60 then if getPlayerLevel(cid) >= 540 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 540 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 55 then if getPlayerLevel(cid) >= 500 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 500 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 50 then if getPlayerLevel(cid) >= 470 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 470 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 45 then if getPlayerLevel(cid) >= 440 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 440 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 40 then if getPlayerLevel(cid) >= 420 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 420 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 35 then if getPlayerLevel(cid) >= 400 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 400 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 30 then if getPlayerLevel(cid) >= 380 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 380 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 25 then if getPlayerLevel(cid) >= 370 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 370 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 20 then if getPlayerLevel(cid) >= 360 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 360 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 15 then if getPlayerLevel(cid) >= 355 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 355 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 10 then if getPlayerLevel(cid) >= 340 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 340 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 5 then if getPlayerLevel(cid) >= 330 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 330 .") end end end return true end
  8. Esse é o meu primeiro tópico, então qualquer coisa comenta abaixo. Ontem dei uma olhada no talkactions e vi que não tinha mais esses comandos básicos, á maioria está postando coisas grandes, e alguns server's já possuem. Mas se o seu não, e você gostaria de adicionar, esse tópico é para você. 1° Abra a pasta do seu server -> data -> talkactions -> scripts 2° Depois duplique qualquer arquivo que esteja no scripts (.LUA) e apague o que tem dentro e coloque isso: O que está em vermelho: O que aparece quando você não tem dinheiro para comprar a backpack. O que está em laranja: É o preço da backpack, lembrando que sempre em gold. O que está em rosa: É o ID da backpack. Nesse caso ai está a Brocade backpack. O que está em azul: É a quantidade. 3° Depois vá em Talkactions.xml e adicione isso, feche e salve:
  9. E ai galera, suave? Achei esse script aqui e resolvi postar. Vamos la! Em talkactions.xml adicione: <talkaction words="!bugreport;/bugreport" event="script" value="bugreport.lua"/> Em talkactions/scripts crie um arquivo com o nome de bugreport.lua e adicione: function onSay(cid, words, param, channel) local storage = 6707 local delaytime = 120 local a = "data/logs/bugs.txt" local f = io.open(a, "a+") if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local exhaust = exhaustion.get(cid, storage) if(not exhaust) then exhaustion.set(cid, storage, delaytime) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your report has been received successfully!") f:write(""..getPlayerName(cid).." reported a bug at " .. os.date("%d %B %Y - %X.", os.time()) .."\n"..param.." [x="..getPlayerPosition(cid).x..", y="..getPlayerPosition(cid).y..", z="..getPlayerPosition(cid).z.."].\n\n----------------------------------------------------------\n") f:close() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait " .. exhaustion.get(cid, storage) .. " seconds to report.") end return TRUE end Como usar: !bugreport, seu comentário Exemplo: Druid reported a bug at 21 December 2011 - 20:24:42 There is a bug in Carlin Wall. [x=32360, y=31782, z=7]. ---------------------------------------------------------- Sorcerer reported a bug at 21 December 2011 - 20:28:01 Help me i cant move. [x=11457, y=45789, z=5]. ---------------------------------------------------------- Créditos: Bogart
  10. Status System Como em grandes fórums ou no Facebook, nós podemos mudar nossos Status. Que tal ter isso no nosso próprio Server? Que tal poder interagir com todos por meio de um simples comando? Sem precisar configurar nada no código. Instalação Vá em data/talkactions/scripts, crie um arquivo chamado status.lua ou copie algum arquivo da pasta e cole, renomeie para status e coloque isso dentro: Abra o talkactions.xml com algum editor de texto e cole essa tag: <talkaction words="!status;/status" event="script" value="status.lua"/> Nesta parte do código: local exhausted = 10 Você configura um exhausted, ou seja, a cada quantos segundos pode mudar seu Status. Demonstração !status << Apenas isso mostra a lista de Status dos players Online. !status Blablabla << Blablabla == Coloque algum status para você !status clean << Retirar seus status
  11. Own Your Spawn! Como anda galerinha? Hoje tive uma ideia bem legal e vim trazer para vocês, é um sistema que inventei chamado Own your Spawn, mas como funciona? /buyspawn Monster, Quantidade Você paga uma certa quantia e com um comando você cria X monstros para você upar, mas não pode ter players por perto (Anti-PowersAbuse), tudo bem configurável, vamos instalar? Vá em data/lib, copie algum arquivo desta mesma pasta e cole, renomeio-o para own_spawnlib.lua, abra-o com o bloco de notas e adicione dentro: Muito bem, agora siga para a pasta data/talkactions/scripts, copie algum arquivo desta mesma pasta e cole, renomeie para own_spawn.lua e adicione dentro: Na pasta data/talkactions, abra com um editor de texto o arquivo talkactions.xml e adicione essa tag: <talkaction log="yes" words="!buyspawn;/buyspawn" event="script" value="own_spawn.lua"/> Configuração Nesta parte do código: local cfg = { max_summon = 9, price = 100000, } Em "max_summon", você coloca a quantia máxima de monstros que podem dar spawn. E em "price" você coloca o preço para dar o spawn, no caso coloquei 100k Utilização
  12. Iaae galera como vão? Hoje venho trazer para vocês um sistema de Invasão criado por mim. Ele funciona da seguinte maneira: /invasao Monster, Amount, Position Exemplo: /invasao Dragon, 3, 1000, 1000, 7 O nome do monstro e depois da vírgula a quantidade, legal né? Vamos instalar? Entre na pasta data/talkactions/scripts, crie um arquivo chamado newraid.lua e adicione dentro: Nesta parte: Muito bem, agora siga para o arquivo talkactions.xml e adicione a tag: <talkaction log="yes" words="/invasao" event="script" value="newraid.lua"/> Façam um bom proveito e uso
  13. Bom Estava , Vendo area de Talkactions e Procurando a Talkaction Bless e nao achei , porem nao sei se tem , nao sei quem fez , Fui Fazendo Olhando Tutoriais ! , Porque Talkaction de Bless Easy Fazer '-' Quem Souber o Nome do Autor , Poste para eu Botar os Creditos! , Enquanto Isso eu Vou Colocar meu Creditos , Porque Editei Totalmente , Ja vi Varios Tipos de Bless , que o Player Falava !bless , Comprava , ou quando falava !bless e nao tinha dinheiro e dizia , voce nao tem dinheiro!! nao dava efeitos nada .. ( nos ots que eu jogava ) , Adicionei Outra Mensagem e Efeitos!! Nao Estou Rippando , Pesso que Postem o Nome do Autor!! Vá em Data>Talkactions>Scripts , Crie uma Pasta chamada bless.lua e coloque os seguintes scripts dentro! -------By: DevilMoon-------- function onSay(cid, words, param) local cost = 500000 for b = 1,5 do if getPlayerBlessing(cid, b) then doPlayerSendCancel(cid,'Voce ja Tem Bless e nao Precisa de Outro!') doSendMagicEffect(getPlayerPosition(cid), 17) else if doPlayerRemoveMoney(cid, cost) == TRUE then for i = 1,5 do doPlayerAddBlessing(cid, i) end doSendMagicEffect(getPlayerPosition(cid), 37) doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Voce Ativou Seu Bless!') else doPlayerSendCancel(cid, "Voce Precisa de 50 Crystal Coins para Fazer Bless!") doSendMagicEffect(getPlayerPosition(cid), 41) end end return true end end Agora em Talkactions.xml adicione isso! <talkaction words="!bless" script="bless.lua"/> Espero Ter Ajudado Abraços
  14. [EVENT] Free For All Como vão galerinha do Éks? Hoje tive uma ideia bem maluquinha e vim trazer para vocês, é o Evento Free For All! Mas oque ele faz? O Free For All é um evento aonde o GOD/GM/ADM o reproduz, ele usa o comando: /free quant E assim em X segundos começa a aparecer itens sorteados em posições sorteadas, tudo configurável, vamos instalar? ~~ Vá em data/talkactions/scripts, copie algum arquivo da pasta e cole, renomeie para event_FFL.lua, abra-o com o bloco de notas e cole isso dentro: Em talkactions.xml adicione essa tag: <talkaction words="!freeitems;!free;/freeitems;/free" acess="5" event="script" value="event_FFL.lua"/> Prontinho, basta usar o comando citado no começo do tópico, exemplo: /free 3 Começa o evento e cria 3 itens sorteados Configurando o código: local event_cfg = { items = {2148, 2494, 2152}, pos = {{x = 1000, y = 1000, z = 7}, {x = 995, y = 995, z = 7}, {x = 1005, y = 995, z = 7}}, timeto_start = 1 } Em items, separados por vírgulas, coloque o ID dos itens que podem ser sorteados no Evento. Já em pos você coloca separadas por vírgulas e entre {} as coordenadas aonde podem cair itens, use sua criatividade, coloque coordenadas dos cantos do templo, de uma rua, etc. Aonde está timeto_start é os minutos em que começa o Evento após você usar o comando! ~~ Boa sorte galerinha, beijo grande Críticas, dúvidas e sugestões tô ae!
  15. Este script faz com que ao digitar o comando !guildpoints, a guild receba um tanto de pontos configuraveis com a condição de que não tenha IP's repetidos, que tenha o Level requisitado e a quantidade de jogadores necessários. Tudo configurável. Execute essa query em seu mysql Configuração: local ipsNeeded = QUANTIDADE DE PLAYERS NA GUILD local minimumLevel = LEVEL NECESSÁRIO local pointsForPlayer = PONTOS PRA CADA PLAYER local pointsForLeader = PONTO PRO LIDER O resto NÃO mexa. Em talkactions.xml Em talkactions/scripts crie um arquivo guildpoints.lua Seja feliz Testado em 0.4 Creditos: Wake e Eu
  16. Bem, acho que é bem simples de entender, então nem vou explicar muito em data/talkactions/scripts crie uma pasta chamada drakylucas nessa pasta, crie o arquivo stats.lua no arquivo stats.lua coloque isso: --[[ Stats System by Draky Lucas V: 1.0 Contact: XTibia Don't remove credits. --]] function getSetArmor(cid) -- by Draky Lucas local arm = 0 for i = 1,9 do if getPlayerSlotItem(cid, i).itemid ~= 0 then arm = arm + getItemInfo(getPlayerSlotItem(cid, i).itemid).armor end end return arm end function getDefense(cid) -- by Draky Lucas local def,extradef = 0,0 for i = 1,9 do if getPlayerSlotItem(cid, i).itemid ~= 0 then def = def + getItemInfo(getPlayerSlotItem(cid, i).itemid).defense extradef = extradef + getItemInfo(getPlayerSlotItem(cid, i).itemid).extraDefense end end local str = def .. " (+ " .. extradef ..")" return str end function returnMoney(cid) local money = getPlayerMoney(cid) if money > 1000000 then return money/1000000 .. " kk" elseif money > 1000 then return money/1000 .. " k" else return money .. " gps" end end function getAtk(cid) if getPlayerWeapon(cid).itemid <= 0 or getPlayerWeapon(cid).itemid == nil or getPlayerWeapon(cid).itemid == false then return "0 (+ 0)" end return getItemInfo(getPlayerWeapon(cid).itemid).attack .. " (+ ".. getItemInfo(getPlayerWeapon(cid).itemid).extraAttack .. ")" end function onSay(cid,words,param) local worlds = { [WORLDTYPE_OPTIONAL] = "Optional PvP", [WORLDTYPE_OPEN] = "Open PvP", [WORLDTYPE_HARDCORE] = "Hardcore PvP" } local msg = "Name: " .. getCreatureName(cid) .. "\nLevel: " .. getPlayerLevel(cid) .. "\n" .. "Vocation: " .. getVocationInfo(getPlayerVocation(cid)).name .. "\n\nStatus:" .. "\nHealth - " .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. ", Mana - " .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "\nMagic Level - " .. getPlayerMagLevel(cid) .. ", Speed - " .. getCreatureSpeed(cid) .. "\n\nSkills:" .. "\nFist - " .. getPlayerSkillLevel(cid, SKILL_FIST) .. ", Club - " .. getPlayerSkillLevel(cid, SKILL_CLUB) .. ", Sword - " .. getPlayerSkillLevel(cid, SKILL_SWORD) .. ", Axe - " .. getPlayerSkillLevel(cid, SKILL_AXE) .. "\nDistance - " .. getPlayerSkillLevel(cid, SKILL_DISTANCE) .. ", Shielding - " .. getPlayerSkillLevel(cid, SKILL_SHIELD) .. ", Fishing - " .. getPlayerSkillLevel(cid, SKILL_FISHING) .. "\n\nSet: \n" .. "Protecao (Arm): " .. getSetArmor(cid) .. "\n" .. "Defense (Def): " .. getDefense(cid) .. "\n" .. "Weapon Attack: " .. getAtk(cid) .."\n\n" .. "Bank Money: " .. getPlayerBalance(cid) .. "\n" .. "Player Money: " .. returnMoney(cid) .. "\n" .. "World Type: " .. worlds[getWorldType()] doPlayerPopupFYI(cid, msg) return true end agora em data/talkactions abra o talkactions.xml e coloque isso: <talkaction log="no" words="/stats" event="script" value="drakylucas/stats.lua"/> Dê /reload talkactions digite /stats edit2: Erro concertado
  17. Então galera to aqui mais uma vez para passar um script bobo, porém bom! Traduzindo o título [TALKACTION] Bloqueando aquele ótario [TALKACTION] Bloqueando aquele babaca Enfim, o script faz que com que o engraçadinho que querer crashar(lagar) o seu OTserver, vai ser banido na hora ! Mas como assim? Não Entendi !?! Tipo assim tem um progama chamado MAGEBOMB que pode fazer com que logue vários account manager! Num mesmo momento fazendo assim crashando(lagando,travando) seu OTserver por alguns segundos. Tem vários scripts ,que bloqueia isso Mas esse meu é diferente após o cara falar o comando que faz logar os account manager . Ele irá tomar um ban ip e se automaticamente irar toma um kick! Chega de papo e vamos ao script! Vá em talkactions/script e crie um arquivo chamado restrite.lua e cole isso lá dentro do arquivo ! function onSay(cid, words, param) if isPlayer(cid) then doAddIpBanishment(getPlayerIp(cid)) doPlayerSendTextMessage(cid,27,"Você foi banido!") addEvent(doRemoveCreature,2*1000,cid,true) end return true end Agora vá em talkactions.xml e adicione isso. <talkaction words="/login" event="script" value="restrite.lua"/> Por Favor Leia Tudo Aquilo Ali Emcima Para Depois Comentar,Obrigado!
  18. Fala galera vim lhe apresentar 2 comando para seu servidor. talkactions\script guildlist.lua function onSay(cid, words, param, channel) local str = "" if param == '' then local lista = db.getResult("SELECT `name` FROM `guilds`;") if(lista:getID() ~= -1) then repeat str = str .. lista:getDataString("name") .. "\n" until not lista:next() lista:free() doShowTextDialog(cid, 2529, str == "" and "Não existem guilds no servidor." or str) return true end end local id = getGuildId(param) if id then local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");") if(lista:getID() ~= -1) then repeat local rank = db.getResult("SELECT `name`, `level` FROM `guild_ranks` WHERE `id` = " .. lista:getDataInt("rank_id") .. " ORDER BY `level` DESC, `name` ASC;") str = str .. lista:getDataString("name") .. " [" .. rank:getDataString("name") .. "]\n" rank:free() until not lista:next() lista:free() doShowTextDialog(cid, 2529, str) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Não há jogadores nesta guild.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Está Guild não existe.") end return true end talkactions.xml adicione a tag: <talkaction words="!glist" script="guildlist.lua"/> --- Deletar guilds do server que não tem mais players(foram deletadas): Data/globalevents/script deleteguild.lua function onThink(interval, lastExecution) local guilds = db.getResult("SELECT `name` FROM `guilds`;") if(guilds:getID() ~= -1) then repeat local delete = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. getGuildId(guilds:getDataString("name")) .. ");") if(delete:getID() < 1) then db.executeQuery("DELETE FROM guilds WHERE id = "..getGuildId(guilds:getDataString("name"))) end until not guilds:next() guilds:free() end return true end globalevents.xml <globalevent name="Guild Delete" interval="36000" event="script" value="deleteguild.lua"/>
  19. Trocar Items E ai galera, beleza? É um script simples, que troca ou um helmet por outro, ou uma boots por outra. ( Configurável ) O player precisará de dinheiro para fazer as trocas. Em data/talkactions/scripts crie um arquivo com o nome de trocaritems.lua e adicione: function onSay(cid, words, param) local money = 500 local table = { ["helmet"] = {id = 2457, toid = 2491}, ["boots"] = {id = 2643, toid = 2645}, } if param == "helmet" then if getPlayerItemCount(cid, table["helmet"].id) >= 1 then if getPlayerMoney(cid) >= money then doPlayerSendTextMessage(cid, 22, "Você fez uma troca de items!") doPlayerRemoveMoney(cid, money) doPlayerRemoveItem(cid, table["helmet"].id, 1) doPlayerAddItem(cid, table["helmet"].toid, 1) else doPlayerSendCancel(cid, " Você não tem dinheiro suficiente!") end else doPlayerSendCancel(cid, " Você não tem o item necessário!") end return true end if param == "boots" then if getPlayerItemCount(cid, table["boots"].id) >= 1 then if getPlayerMoney(cid) >= 500 then doPlayerSendTextMessage(cid, 22, "Você fez uma troca de items!") doPlayerRemoveMoney(cid, 500) doPlayerRemoveItem(cid, table["boots"].id, 1) doPlayerAddItem(cid, table["boots"].toid, 1) else doPlayerSendCancel(cid, " Você não tem dinheiro suficiente!") end else doPlayerSendCancel(cid, " Você não tem o item necessário!") end end return true end Em talkactions.xml adicione a tag: <talkaction words="!trocar" event="script" value="trocaritems.lua"/> Configuração Aqui você irá editar os items: ID será o item que o player tem e toid será o item que ele irá ganhar. E aqui o dinheiro: Para executar, é só usar !trocar helmet ou !trocar boots É isso galera, espero que sirva pra algo. Abraços!
  20. Tipo: Talkaction. Testado: Foi feito a pedido de um usuário ele falou que funcionou então sim. @Oque Faz?. Ele retorna o nome de todos jogadores que tem promotion no servidor. @Instalando!. Primeiro abra a pasta do seu servidor depois vá em data agora entre na pasta talkactions e agora na pasta scripts duplique um arquivo da extensão .lua renomeie para promotedplayers e adicione o seguinte conteúdo nele: agora volte as pastas e entre em talkactions.xml e adicione essa linha lá: <talkaction words="!promoplayers" script="promotedplayers.lua"/> ele vai aparece só o nome exêmplo: Fulano Vodkartviado PretoJorge. Se vocês saberem alguma função que retorne nome da vocação pelo id favor avisar que aí o script irá ficar melhor. ~~ Créditos ~~ Criador do sistema de rank level. Eu por editar.
  21. Função: Tem a função de quando for utilizado o comando /checkitem id, aparece todos os players que possuem este item. Vamos lá! 1. Acesse: \data\talkactions\scripts e crie um arquivo vcheckitem.lua. Após criar, coloque isto: function onSay(cid, words, param) if not(param and isNumber(param)) then return doPlayerSendCancel(cid, "Você precisa informar o ID do item.") end local query, msg = db.getResult("SELECT name FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = ".. param ..");"), "" if (query:getID() ~= -1) then while (true) do local name = query:getDataString("name") msg = msg..name.."\n" if not(query:next()) then break end end else return doShowTextDialog(cid, param, "Ninguém possui esse item.") end return doShowTextDialog(cid, param, msg) and true end 2. Em seguida, vá em \data\talkactions e abra o arquivo talkactions.xml. Coloque o código abaixo: <talkaction words="/checkitem" event="script" value="vcheckitem.lua"/>
  22. Bom dia, boa tarde ou boa noite. Caros amigos, estou com uma dificuldade, e não consigo resolver um problema. este comando !rank mostra os 100 melhores... Eu queria que mostrasse no maximo 10, se fosse 5, melhor ainda... Como posso fazer? Meu script está assim: function onSay(cid, words, param) local ranks = { ['fist'] = {0}, ['club'] = {1}, ['sword'] = {2}, ['axe'] = {3}, ['distance'] = {4}, ['shield'] = {5}, ['fish'] = {6}, ['magic'] = {7}, ['level'] = {8}, } local msg = string.lower(param) if ranks[msg] ~= nil then str = getHighscoreString((ranks[msg][1])) else str = getHighscoreString((8)) end doShowTextDialog(cid,6500, str) return TRUE end Rep+ pra quem me ajudar. Desde já, grato pela atenção!
  23. Uma talkaction que vai incrementar um pouco mais seu servidor. !staff (se tiver alguém online) (se não tiver alguém online) Em data/talkactions/talkactions.xml: <talkaction words="!staff" event="script" value="staff.lua"/> Agora em data/talkactions/scripts: crie um arquivo chamado staff.lua e cole dentro: function onSay(cid, words, param, channel) local Info = db.getResult("SELECT * FROM `players` WHERE `online` = '1' AND `group_id` > 1") local PlayerString = "Online Staff Members:\n" if Info:getID() ~= -1 then local count, i = Info:getRows(false), 0 repeat PlayerString = PlayerString .. Info:getDataString("name") .. " - " if Info:getDataInt("group_id") == 2 then PlayerString = PlayerString .. "Tutor" elseif Info:getDataInt("group_id") == 3 then PlayerString = PlayerString .. "Senior Tutor" elseif Info:getDataInt("group_id") == 4 then PlayerString = PlayerString .. "Game Master" elseif Info:getDataInt("group_id") == 5 then PlayerString = PlayerString .. "Community Manager" elseif Info:getDataInt("group_id") == 6 then PlayerString = PlayerString .. "God" end PlayerString = PlayerString .. "\n" until not(Info:next()) Info:free() else PlayerString = PlayerString .. "No staff online, try again later" end doPlayerPopupFYI(cid, PlayerString); return true end Bom uso! (Créditos: Hiromath)
  24. Oi Pessoal,Ultimamente eu tive recebendo Reps negativos - Agora quero melhorar pra vcs ai então! E o seguinte o systema funciona quando o player Utiliza o Comando !bugreport Simples né ai então marca o Local do bug e é enviado automaticamente ao 1 god ou gm. \data\talkactions\scripts Crie Um arquivo com nome bugreport.lua adicione isso: E agora adicione a segunda linha no arquivo talkactions: É Isso pessoal gostariam que todos vocês avaliam meu post.Tambem foi dedicado ao amigo que estava querendo essa action. Creditos ~ManelksCouto~ Por editar e botar em português. Corrigido Bug na Player Position
  25. Tipo: Talkaction. Autor:Eu e o Maxwelden(não sei escreve nome dele heuheeuhe). Vá em /data/talkactions/scripts, crie um arquivo .lua e renomeie para spellinfo, e adicione isso dentro: em talkactions.xml adicione essa linha: <talkaction log="yes" words="/spell" script="spellinfo.lua"/> Qualquer erro comente e eu arrumarei.
×
×
  • Criar Novo...