Ir para conteúdo

AndreyLost

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    AndreyLost deu reputação a L3K0T em Removendo Block Spawn   
    Olá pessoal hoje estava mexendo na minha source, muitos me falavam, "porque você não coloca pro player ficar no respawn do pokemon" então hoje estou para a ajudar vocês, como minha source não tem a opção de blockspawn na config.lua, achei outra forma, vamos lá!
     
     
    Vá em spawn.cpp
     
    Procure:
     
    if(findPlayer(sb.pos)) { sb.lastSpawn = OTSYS_TIME(); continue; } Deixa assim abaixo:
     
    /*if(findPlayer(sb.pos)) { sb.lastSpawn = OTSYS_TIME(); continue; }*/ Agora salva, e recompila sua source.
     
    O que eu fiz fazendo isso ? removi definitivo o blockspawn se caso o player tiver no respawn do pokemon vai nascer do mesmo jeito. espero ter ajudado  rep+ (acharam que era coisa difícil, sqn)
     
    Créditos a mim.
  2. Curtir
    AndreyLost recebeu reputação de Kateze em TELEPORT SOULPOINTS   
    Olá pessoal, esse é meu primeiro script, estou até com vergonha de postar kkkk.
    O script é bem simples, ele teleporta o jogador para uma certa position se o jogador tiver uma certa quantia de soulpoints, caso alguém queira modificar fazendo que o jogador que for teleportado também perca uma quantia de soulpoints.
     
     
    Você vai colocar a tag na pasta movements em movements.xml
    <movevent type="StepIn" actionid="7003" event="script" value="teleportsoul.lua" /> Você vai criar um arquivo .lua e renomear para teleportsoul e vai colocar dentro dele e jogar dentro da pasta movements/scripts
    function onStepIn(cid, item, toPosition, fromPosition) if getPlayerSoul(cid) >= 50 then doTeleportThing(cid, {x=1001, y=923, z=7}) else doPlayerSendCancel(cid, "MENSAGEM AQUI") return true end return true end Para editar é muito simples.
    QUANTIA DO SOUL POINTS - 50 VOCÊ COLOCA O VALOR DESEJADO {x=1001, y=923, z=7} MODIFICA PARA A POSITION QUE VOCÊ QUER QUE O JOGADOR SEJA TELEPROTADO MENSAGEM AQUI - A MENSAGEM QUE VAI APARECER PARA O JOGADOR CASO ELE NÃO TENHA OS SOULPOINTS NECESSÁRIO. Espero ter ajudado alguém pois o script é bem simples. Obrigado!!
  3. Curtir
    AndreyLost recebeu reputação de thelifeofpbion em TELEPORT SOULPOINTS   
    Olá pessoal, esse é meu primeiro script, estou até com vergonha de postar kkkk.
    O script é bem simples, ele teleporta o jogador para uma certa position se o jogador tiver uma certa quantia de soulpoints, caso alguém queira modificar fazendo que o jogador que for teleportado também perca uma quantia de soulpoints.
     
     
    Você vai colocar a tag na pasta movements em movements.xml
    <movevent type="StepIn" actionid="7003" event="script" value="teleportsoul.lua" /> Você vai criar um arquivo .lua e renomear para teleportsoul e vai colocar dentro dele e jogar dentro da pasta movements/scripts
    function onStepIn(cid, item, toPosition, fromPosition) if getPlayerSoul(cid) >= 50 then doTeleportThing(cid, {x=1001, y=923, z=7}) else doPlayerSendCancel(cid, "MENSAGEM AQUI") return true end return true end Para editar é muito simples.
    QUANTIA DO SOUL POINTS - 50 VOCÊ COLOCA O VALOR DESEJADO {x=1001, y=923, z=7} MODIFICA PARA A POSITION QUE VOCÊ QUER QUE O JOGADOR SEJA TELEPROTADO MENSAGEM AQUI - A MENSAGEM QUE VAI APARECER PARA O JOGADOR CASO ELE NÃO TENHA OS SOULPOINTS NECESSÁRIO. Espero ter ajudado alguém pois o script é bem simples. Obrigado!!
  4. Gostei
    AndreyLost recebeu reputação de Lexir em TELEPORT SOULPOINTS   
    Olá pessoal, esse é meu primeiro script, estou até com vergonha de postar kkkk.
    O script é bem simples, ele teleporta o jogador para uma certa position se o jogador tiver uma certa quantia de soulpoints, caso alguém queira modificar fazendo que o jogador que for teleportado também perca uma quantia de soulpoints.
     
     
    Você vai colocar a tag na pasta movements em movements.xml
    <movevent type="StepIn" actionid="7003" event="script" value="teleportsoul.lua" /> Você vai criar um arquivo .lua e renomear para teleportsoul e vai colocar dentro dele e jogar dentro da pasta movements/scripts
    function onStepIn(cid, item, toPosition, fromPosition) if getPlayerSoul(cid) >= 50 then doTeleportThing(cid, {x=1001, y=923, z=7}) else doPlayerSendCancel(cid, "MENSAGEM AQUI") return true end return true end Para editar é muito simples.
    QUANTIA DO SOUL POINTS - 50 VOCÊ COLOCA O VALOR DESEJADO {x=1001, y=923, z=7} MODIFICA PARA A POSITION QUE VOCÊ QUER QUE O JOGADOR SEJA TELEPROTADO MENSAGEM AQUI - A MENSAGEM QUE VAI APARECER PARA O JOGADOR CASO ELE NÃO TENHA OS SOULPOINTS NECESSÁRIO. Espero ter ajudado alguém pois o script é bem simples. Obrigado!!
  5. Gostei
    AndreyLost recebeu reputação de Silveira em (Resolvido)Ajuda   
    Tenta apertar a letra A dentro do remere.
  6. Gostei
    AndreyLost recebeu reputação de simahamed em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  7. Gostei
    AndreyLost deu reputação a Dyego em Corrigindo Erro Unsupported Version Oject Builder.   
    Bom Galera fiz um tutorialzinho de como arrumar esse erro chato do Object Builder
     
    Erro: Unsupported Version
     
    OBS: Sem mais delongas, irei postar Tutorias em videos do Object Builder, se te ajudar clique em Gostei ai.
     
    Video Tutorial: 
     
    Obrigado a todos, creio que está na área correta pois é relacionado a Sprites.
  8. Gostei
    AndreyLost recebeu reputação de ReD NigThMaRe em Mensagem no Primeiro Login!   
    Eaii Galerinha, hj estou trazendo pra vcs um script bem comum mais bem útil para servidores que querem explicar tudo para o jogador quando ele entra pela primeira vez, esse script foi feito por um amigo de outro forum ele é iniciante ainda.
    Muitos vão falar que da para fazer pelo Login.Lua
     
    creaturescripts/scripts/firstmessage.lua
    function onLogin(cid) local storage = 2522 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!") setPlayerStorageValue(cid, storage, 1) else doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!") end return true end creaturescripts.xml 
    <event type="login" name="firstmessage" script="firstmessage.lua"/> creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "firstmessage") Configuração
     
    Editar  this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!
    YOURSERVNAME : NOME DO SERVIDOR
     
    Creditos
    ghettobird 100% Script
    AndreyLost 100% Topico e Tutorial
     
    Eu Queria mandar um grande abraço para o ghettobird.
    Comente Pf
    Espero que isso ajude , testado em tfs 0.4
  9. Gostei
    AndreyLost recebeu reputação de r0bert0lol em Mensagem no Primeiro Login!   
    Eaii Galerinha, hj estou trazendo pra vcs um script bem comum mais bem útil para servidores que querem explicar tudo para o jogador quando ele entra pela primeira vez, esse script foi feito por um amigo de outro forum ele é iniciante ainda.
    Muitos vão falar que da para fazer pelo Login.Lua
     
    creaturescripts/scripts/firstmessage.lua
    function onLogin(cid) local storage = 2522 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!") setPlayerStorageValue(cid, storage, 1) else doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!") end return true end creaturescripts.xml 
    <event type="login" name="firstmessage" script="firstmessage.lua"/> creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "firstmessage") Configuração
     
    Editar  this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!
    YOURSERVNAME : NOME DO SERVIDOR
     
    Creditos
    ghettobird 100% Script
    AndreyLost 100% Topico e Tutorial
     
    Eu Queria mandar um grande abraço para o ghettobird.
    Comente Pf
    Espero que isso ajude , testado em tfs 0.4
  10. Gostei
    AndreyLost recebeu reputação de Drazyn1291 em Mensagem no Primeiro Login!   
    Eaii Galerinha, hj estou trazendo pra vcs um script bem comum mais bem útil para servidores que querem explicar tudo para o jogador quando ele entra pela primeira vez, esse script foi feito por um amigo de outro forum ele é iniciante ainda.
    Muitos vão falar que da para fazer pelo Login.Lua
     
    creaturescripts/scripts/firstmessage.lua
    function onLogin(cid) local storage = 2522 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!") setPlayerStorageValue(cid, storage, 1) else doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!") end return true end creaturescripts.xml 
    <event type="login" name="firstmessage" script="firstmessage.lua"/> creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "firstmessage") Configuração
     
    Editar  this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!
    YOURSERVNAME : NOME DO SERVIDOR
     
    Creditos
    ghettobird 100% Script
    AndreyLost 100% Topico e Tutorial
     
    Eu Queria mandar um grande abraço para o ghettobird.
    Comente Pf
    Espero que isso ajude , testado em tfs 0.4
  11. Gostei
    AndreyLost recebeu reputação de leozincorsair em Frag Recompensa: Troféu? Coração? Ambos? Você escolhe!   
    Eaii Galerinha, hj estou trazendo pra vcs um script bem antigo mais atualizado pelo J.Dre
    Este script permite que você ative ou desative, troféus ou coração como recompensa.
    Espero que você aprecie a conveniência dentro deste script.
     
    Testado em The Forgotten Server 0.3.7 (aka. 0.4)
     
    Level: 8 - 99 
    Level: 100 - 199 
    Level: 200 - ??? 
    Ou o coração opcional!
     
     
     
    data/creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "Frag Reward") data/creaturescripts/creaturescripts.xml
    <event type="death" name="Frag Reward" event="script" value="frag_reward.lua"/> data/creaturescripts/scripts/frag_reward.lua
    local config = { useTrophy = "yes", -- "yes" or "no" useHeart = "yes", -- "yes" or "no" killers = 1 -- only the actual killer gets rewarded. } local BRONZE, SILVER, GOLD = 10129, 10128, 10127 function onDeath(cid, corpse, deathList) local reward = 0 if(config.useTrophy) then config.useTrophy = getBooleanFromString(config.useTrophy) end if(config.useHeart) then config.useHeart = getBooleanFromString(config.useHeart) end local worldType = getConfigValue("worldType") if(worldType == "open") then for i = 1, config.killers do if(isPlayer(cid) and isPlayer(deathList)) then if(getPlayerIp(cid) ~= getPlayerIp(deathList)) then local var = { KILLER_NAME = getCreatureName(deathList), TARGET_NAME = getCreatureName(cid), KILLER_LEVEL = getPlayerLevel(deathList), TARGET_LEVEL = getPlayerLevel(cid) } if(var.TARGET_LEVEL > 8 and var.TARGET_LEVEL < 100) then reward = BRONZE elseif(var.TARGET_LEVEL > 99 and var.TARGET_LEVEL < 200) then reward = SILVER elseif(var.TARGET_LEVEL > 199) then reward = GOLD end local trophy, heart = 0, 0 if(config.useHeart) then heart = doAddContainerItem(corpse.uid, 5943, 1) end if(config.useTrophy) then trophy = doPlayerAddItem(deathList, reward, 1) end local killers = "" for i = 1, math.min(getConfigInfo('deathAssistCount') + 1, #deathList) do killers = killers .. (i == 1 and "" or ", ") .. (isMonster(deathList) and "a " or "") .. getCreatureName(deathList) end if(config.useHeart) then doItemSetAttribute(heart, "name", "Heart of " .. var.TARGET_NAME) doItemSetAttribute(heart, "description", "It was taken from " .. var.TARGET_NAME .. "'s body. " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed at level " .. var.TARGET_LEVEL .. " by " .. var.KILLER_NAME .. ". " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) end if(config.useTrophy) then doItemSetAttribute(trophy, "description", "It was awarded to " .. var.KILLER_NAME .. " for killing " .. var.TARGET_NAME .. ". " .. (getPlayerSex(cid) == 0 and "She" or "He") .. " was killed at level " .. var.TARGET_LEVEL .. " by " .. var.KILLER_NAME .. " who was level " .. var.KILLER_LEVEL .. " at the time. " .. (getCreatureSkullType(cid) <= SKULL_GREEN and "(Unjustified)" or "(Justified)")) end doSendMagicEffect(getThingPosition(cid), CONST_ME_MAGIC_RED) end end end end return true end J.Dre 100% script
    AndreyLost 100% Topico
    Não Custa Nada Reputa+
     
     
  12. Gostei
    AndreyLost recebeu reputação de sidneivascao em Clean em uma Certa Área   
    Eaii Galerinha, hj estou aqui trazendo mais um script feito por um amigo de outro forum o Printer
    Bom o script vai da clean em um certa área que vc configurar
     
    globalevent/globalevent.xml
    <globalevent name="cleanarea" interval="1200" event="script" value="cleanarea.lua"/> globalevent/scripts/cleanarea
    local created_by_otswe = true -- Do not edit, if you touch this line the script will not work propely local otswe = { Clean_Time = 20, -- When the warning text has been broadcast, for how many seconds should it take to execute the clean Warning_Text_Before_Clean = "A area will be cleaned in 20 seconds, so pick up your trash or see it vanish", -- Here can you edit the warning text Done_Text = "Next area clean will be excuted in 20min" -- Here you can edit the done text } local OtsweCleaningAreaPositions = { from = {x=994,y=1008,z=7}, -- From top left -- Top left of the cleaning area to = {x=999,y=1012,z=7} -- to bottom right -- Bottom left of the cleaning area } function isCleanAbleArea(pos) pos.stackpos = 0 local tile = getThingfromPos(pos, false) if tile ~= 0 and not hasProperty(tile.uid, CONST_PROP_BLOCKSOLID) and not isCreature(getTopCreature(pos).uid) then return true end end function executeOtsweAreaClean() doBroadcastMessage(otswe.Done_Text) for x = OtsweCleaningAreaPositions.from.x, OtsweCleaningAreaPositions.to.x do for y = OtsweCleaningAreaPositions.from.y, OtsweCleaningAreaPositions.to.y do local p = {x=x,y=y,z=OtsweCleaningAreaPositions.from.z} if isCleanAbleArea(p) or created_by_otswe == true then doCleanTile(p,false) end end end end function onThink(cid, interval, lastExecution) addEvent(executeOtsweAreaClean, otswe.Clean_Time*1000) doBroadcastMessage(otswe.Warning_Text_Before_Clean) return true end Printer 100% Script 
    AndreyLost 100% Topico 
     
  13. Gostei
    AndreyLost deu reputação a Absolute em [Proibir Palavras] Anti Divulgação   
    Fala galerinha do TK, hoje trago a vocês um sistema de bloquear algumas palavras no servidor!
     
     
    Sabe aqueles players chatos que entram em seu otserver divulgando o servidor dele dias e dias, leva ban, volta e tudo mais? Poisé, chega disso né.
     
    Primeiro vai o script depois explicação/config:
     

     
     
    Em data/talkactions/scripts crie um arquivo com o nome de tibiakingproibiu.lua
    function getFixedText(cid, text, replace) local wrongWords = {"#####", "ots-list.pl", "google.br", ".ddns.net", "hopto.org", "no-ip.org", "servegame.com"} local lowerText = string.lower(text) local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "") for w = 1, #wrongWords do wordLen = string.len(wrongWords[w]) for p = 1, string.len(text) do if(string.sub(lowerText, p, p+wordLen-1) == wrongWords[w]) then text = string.sub(text, 1, p-1) .. string.rep(replace, wordLen) .. string.sub(text, p+wordLen) end end end if(string.lower(text) == lowerText) then for c = 1, #wrongWords do if(string.find(noSpaceText, string.gsub(string.gsub(wrongWords[c], "%p", ""),"-", "")) ~= nil) then return "I want to post forbidden links.." end end end return text end --[[Channels which are not added to block: 1 - Party Channel 2 - Channel for Staff members 3 - Rule Violation Channel 4 - Channel for Counselors/Tutors 65536 - Private Chat Channel <-- Private Chat cannot be blocked with this script ]]-- local blocked_channels = {5,8,9} --Game-Chat, Real Chat, Help Channel local trade_channels = {6,7} --All trade channels <- These are also blocked local replace = "°" --Symbols which are shown instead of forbidden links -> ° local delay = {16246,10} -- {empty_storage, lenght of muted} function onSay(cid, words, param, channel) local fixedWords = getFixedText(cid, words, replace) if words ~= fixedWords and getPlayerAccess(cid) == 0 then if getPlayerStorageValue(cid,delay[1]) > os.time() then return doPlayerSendCancel(cid,"Voce foi mutado por ".. getPlayerStorageValue(cid,delay[1])-os.time() .." segundos, aqui e proibido divulgar.") end setPlayerStorageValue(cid,delay[1],os.time()+delay[2]) if channel == CHANNEL_DEFAULT then doCreatureSay(cid, fixedWords, TALKTYPE_SAY) doPlayerPopupFYI(cid, "Link: "..words.." e proibido, mal educado!.") return true elseif isInArray(trade_channels, channel) then doPlayerPopupFYI(cid, "Link: "..words.." e proibido neste canal.") return true elseif isInArray(blocked_channels, channel) then doPlayerPopupFYI(cid, "Link: "..words.." e proibido, mal educado!.") doPlayerSendChannelMessage(cid, getCreatureName(cid), fixedWords, TALKTYPE_CHANNEL_Y, channel) return true end end return false end Logo em seguida em em talkactions.xml adicione a seguinte linha:
    <talkaction words="illegalWords" event="script" value="tibiakingproibiu.lua"/> Fim da instalação.

     
    Explicação/Config:
     
    local wrongWords = {"#####", "ots-list.pl", "google.br", ".ddns.net", "hopto.org", "no-ip.org", "servegame.com"} = Nas aspas ".." você colocará as palavras que deseja proibir, palavrões, divulgações e companhia...
     
    local noSpaceText = string.gsub(string.gsub(string.gsub(lowerText, "%s", ""), "%p", ""),"-", "") = Aqui aconselho não mexer. É para evitar divulgações acompanhadas das Words (palavras) ou seja lá está proibido .servegame.com, então quando o player falar baiakfulunao.servegame.com irá proibir.
    local delay = {16246,10} -- {empty_storage, lenght of muted} = no 16246 é a storage que irá salvar, não mexa. em 10 é o tempo em segundos que o player será mutado ao falar as palavras proibidas.
    doPlayerPopupFYI(cid, "Link: "..words.." e proibido, mal educado!.") = Este doPlayerPopup é que vai aparecer naquelas janelas que aparece para clicar em ok (caixa de mensagens) caso queira alterar para mensagem de console substitua: 
    doPlayerPopupFYI(cid, "Link: "..words.." e proibido, mal educado!.")
    por  
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Link: "..words.." e proibido, mal educado!.") 
     
     

     
     
    É isso ae lindões do TK, caso haja alguma dúvida peço que perguntem!
     
     
    Créditos:
    Absolute
    OTLAND
     
     
    Até o próximo!
     
     
    Absolute
     
  14. Gostei
    AndreyLost recebeu reputação de Vodkart em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  15. Gostei
    AndreyLost deu reputação a rodrigodias12 em BOSS INQ + TP ABERTO + PROXIMA SALA   
    Eai turma tudo beleza? sou novato na area de script mais esse eu consegui resolver e testei no TFS 1.0 10.37, acredito que alguém esteja precisando pois ele estava dando alguns erros no console e o tp nao aparecia apos a morte do boss, então ai vai:

    O script funciona da seguinte maneira -

    Você mata o boss da inq e o tp aparece levando para a proxima sala
    segue o script:
    local config = { timeToRemove = 160, message = "You now have 2 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", teleportId = 9773, bosses = { ["Ushuriel"] = { pos={ x=33157, y=31725, z=11, stackpos=1 }, aid=1001 }, ["Zugurosh"] = { pos={ x=33123, y=31689, z=11, stackpos=1 }, aid=1002}, ["Madareth"] = { pos={ x=33194, y=31768, z=11, stackpos=1 }, aid=1003}, ["Annihilon"] = { pos={ x=33200, y=31704, z=11, stackpos=1 }, aid=1005}, ["Hellgorak"] = { pos={ x=33107, y=31735, z=11, stackpos=1 }, aid=1006} }, brothers ={ ["Golgordan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Latrivan"}, ["Latrivan"] = {pos={ x=33235, y=31734, z=11, stackpos=1 },aid=1004, brother = "Golgordan"}, brothersArea ={ fromPos = {x = 33224, y = 31722, z = 11}, toPos = {x = 33240, y = 31734, z = 11} } } } local function removal(position) doRemoveItem(getTileItemById(position, config.teleportId).uid, 1) return TRUE end function onKill(cid, target, lastHit) if(config.bosses[getCreatureName(target)]) then local t = config.bosses[getCreatureName(target)] local teleport = doCreateItem(config.teleportId, t.pos) local position = t.pos doSetItemActionId(teleport, t.aid) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) elseif(config.brothers[getCreatureName(target)]) then local t = config.brothers[getCreatureName(target)] local brother = getCreatureByName(t.brother) if(isMonster(brother) == true) then if(isInRange(getCreaturePosition(brother), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) == true) then return TRUE end else local teleport = doCreateItem(config.teleportId, t.pos) local position = t.pos doSetItemActionId(teleport, t.aid) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) end end return TRUE end Faça a copia de algum arquivo.lua da pasta creaturescript e cole isso dentro salve/feche renomeie para Inquisition.
     
     
     
    em creaturescript.xml
    adicione:
     
    <event type="kill" name="inquisitionPortals" script="Inquisition.lua"/> Adicione também em cada um dos bosses da inq a seguinte tag
    <script> <event name="inquisitionPortals"/> </script> Favor adicionar os possíveis créditos caso houver! Agradeço
  16. Gostei
    AndreyLost recebeu reputação de Pay My Pass em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  17. Gostei
    AndreyLost recebeu reputação de luanluciano93 em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  18. Gostei
    AndreyLost deu reputação a Absolute em Mensagem no Primeiro Login!   
    Conforme o pedido do ViitinG lindo e do absoftfgn:
    function onLogin(cid) local storage = 2522 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!") setPlayerStorageValue(cid, storage, 1) else doPlayerPopupFYI(cid, "Welcome back "..getPlayerName(cid).."!") end return true end Irá abrir como mensagem pop-up na tela, clicando para fechar =P
  19. Gostei
    AndreyLost recebeu reputação de ViitinG em Mensagem no Primeiro Login!   
    Eaii Galerinha, hj estou trazendo pra vcs um script bem comum mais bem útil para servidores que querem explicar tudo para o jogador quando ele entra pela primeira vez, esse script foi feito por um amigo de outro forum ele é iniciante ainda.
    Muitos vão falar que da para fazer pelo Login.Lua
     
    creaturescripts/scripts/firstmessage.lua
    function onLogin(cid) local storage = 2522 if getPlayerStorageValue(cid, storage) == -1 then doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!") setPlayerStorageValue(cid, storage, 1) else doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!") end return true end creaturescripts.xml 
    <event type="login" name="firstmessage" script="firstmessage.lua"/> creaturescripts/scripts/login.lua
    registerCreatureEvent(cid, "firstmessage") Configuração
     
    Editar  this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!
    YOURSERVNAME : NOME DO SERVIDOR
     
    Creditos
    ghettobird 100% Script
    AndreyLost 100% Topico e Tutorial
     
    Eu Queria mandar um grande abraço para o ghettobird.
    Comente Pf
    Espero que isso ajude , testado em tfs 0.4
  20. Gostei
    AndreyLost deu reputação a Absolute em [Clean House] Remover casas de quem não loga   
    Olá Galera do TK, venho hoje rapidamente trazer um sistema muito útil e pedido em meu tópico do !eject system: http://www.tibiaking.com/forum/topic/35060-eject-system-expulsar-player-inativo-da-house/

     
    Explicação:
    Sabe aqueles players chatos que compram as melhores casas e não logam no servidor e enche a desgrama da casa de item só para os novos players não comprar? Pois é, isto não existirá mais! =D
    Este script é apenas um arquivo que você colocará em sua pasta mods e ele executará toda vez que o servidor for reiniciado, ou seja: Quando o servidor ligar ele irá verificar os players que não logam a X dias (configurável) e então expulsa-los da casa movendo seus items para o depot deixando a casa sem dono.
     
     
     
     
    Vamos ao que interessa;   Na pasta principal do servidor, onde fica a distro que roda o servidor e tudo mais, entre na pasta MODS e crie um arquivo com o nome de cleanhouses.xml e dentro coloque o seguinte: <?xml version="1.0" encoding="UTF-8"?> <mod name="Cleanhouses" version="1.03" author="nsanee" contact="tibiaking.com" enabled="yes"> <description> v.1.03 - Added 'onlyNonPremium' configurable. Removed modlib, since the script is run once anyway we don't need it loaded at all times. It shouldn't now stop execution when a house is nameless. v.1.02 - now uses only one sql query, removed multiworld configurable since it's not needed anymore v.1.01 - small fixes, optimized query + multiworld support. This mod will clean houses of inactive players and move their items to the depot. config explained: days - If the player hasn't logged in for this number of days his house will be freed. log - true/false, whether to enable logging of which houses have been cleaned. file - path to the log file, where logs will be stored. Ignored if 'log' set to false onlyNonPremium - if set to 'true', the script will clean only the houses of players who don't have any pacc days left. other notes: DO NOT remove doSaveServer() at the end, otherwise if your server happens to crash before the nearest server save you will regret it =) </description> <globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[ local config = { days = 3, log = true, file = getDataDir() .. "/logs/cleanhouses.txt", onlyNonPremium = true } local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses LEFT JOIN players ON players.id=houses.owner LEFT JOIN accounts ON players.account_id=accounts.id WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60) ]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[ AND players.world_id =]] .. getConfigValue("worldId") local house = db.getResult(ns_query) local logs = " :: Houses cleaned:\n\n" if house:getID() ~= -1 then repeat logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n" setHouseOwner(house:getDataInt('hid'), 0) until not house:next() house:free() else logs = logs .. "There were no houses to clean." end if config.log then doWriteLogFile(config.file, logs) end addEvent(doSaveServer, 1000) ]]></globalevent> </mod> Pronto, salve e feche.
     
    Toda vez que o servidor iniciar irá expulsar os players que não logam aos dias configuráveis.
     
     

     
     
     
    Como configurar:
     days = 3 * É o número em DIAS que o player terá que ficar sem logar para perder a casa.
     
     
     
    Configure apenas isto, o resto aconselho não mexer, caso queira aprimorar o sistema aconselho ser avançado na área para não causar erros no mesmo.
     
     
     

    O Mesmo foi testado hoje por mim e está em funcionalidade a todas as versões de TFS.
     
     
     
    Créditos:
    Absolute
    nsanee (otland)




    Demais dúvidas deixe-me saber!
     
     
     
    Até o próximo
  21. Gostei
    AndreyLost recebeu reputação de Absolute em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  22. Gostei
    AndreyLost recebeu reputação de dezon em Extra Area Experience   
    Eaii Galerinha, Hj Estou trazendo um código que pegei de outro furom, você pode colocar em uma área, e área vai dar mais exp se o jogador matar um monstro ... pode ser usado para a área VIP.

    data/creaturescripts/scripts

    area_exp.lua
    function onKill(cid, target) local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } if isPlayer(cid) and isMonster(target) == true then for _, var in ipairs(exp_area) do if isInRange(getCreaturePosition(cid), var.from, var.to) then local percent = var.exp local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = math.floor(((getMonsterInfo(string.lower(getCreatureName(target))).experience*exp)*percent)) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end end end return true end login.lua
    registerCreatureEvent(cid, "area_exp") creaturescript.xml
    <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração
    local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} }[/lua] from = {x=1014,y=1016,z=7} -- beginning of the area(pos) to = {x=1017,y=1019,z=7} -- final area (pos) exp = 0.5 -- extra exp percent 0.5 = 50% 0.3 = 30% 0.25 = 25% etc... Créditos:
    Critico 100% Script
    AndreyLost 100% Topico e Tutorial
     
  23. Gostei
    AndreyLost recebeu reputação de luanluciano93 em AndreyLost Depot [8.60]   
    Eaii Galerinha, esse é meu primeiro post e mapper do TibiaKing
     

     

     

     
    Download:
    http://www.mediafire.com/download/s09o4c2uhnw1t2p/AndreyLost.otbm
     
    Scan:
    http://virusscan.jotti.org/pt-br/scanresult/721312f6a9f272cb10965065224ed996214b5d3a


  24. Gostei
    AndreyLost recebeu reputação de Absolute em AndreyLost Depot [8.60]   
    Eaii Galerinha, esse é meu primeiro post e mapper do TibiaKing
     

     

     

     
    Download:
    http://www.mediafire.com/download/s09o4c2uhnw1t2p/AndreyLost.otbm
     
    Scan:
    http://virusscan.jotti.org/pt-br/scanresult/721312f6a9f272cb10965065224ed996214b5d3a


  25. Gostei
    AndreyLost deu reputação a Absolute em [UP-LEVEL] Recompensa ao subir de level   
    Fala TKZIANOS de plantão WTF? AUEHAUHEA Mas ok...
     
    Venho hoje trazer a vocês um sistema de ganhar uma recompensa ao conquistar determinado nível (Configurável)
     
     
    Como funciona?

    Quando o jogador conquistar determinado level ele recebe como recompensa X item ou GOLD!
    Mais Absolute, o cara vai ficar se matando e upando de novo para ficar pegando a recompensa... NÃO! Quando o player conquista o level ele recebe uma STORAGE, essa storage faz com que salve isto, ou seja faz com que marque que o jogador já recebeu, se ele tentar burlar o sistema ele não vai receber pelo fato da tal STORAGE já estar gravada nele =p
     
     
     
    Em data/creaturescripts/scripts crie um arquivo chamado uplevelabsolute.lua e coloque o seguinte dentro:
     
    function onAdvance(cid, skill, oldLevel, newLevel) local config = { [50] = {item = 2160, count = 5}, [100] = {item = 2160, count = 15}, [150] = {item = 2160, count = 20}, [200] = {item = 2160, count = 25}, [250] = {item = 2160, count = 30}, [300] = {item = 2160, count = 50}, [350] = {item = 4891, count = 1}, [400] = {item = 4892, count = 1}, } if skill == 8 then for level, info in pairs(config) do if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then doPlayerAddItem(cid, info.item, info.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Parabéns, você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".") local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'" setPlayerStorageValue(cid, 30700, sat) end end end return TRUE end Em data/creaturescripts/creaturescripts.xml adicione a seguinte linha:
    <event type="advance" name="UpAbsolute" event="script" value="uplevelabsolute.lua"/> Em data/creaturescripts/scripts/login.lua abaixo de registerCreatureEvent(cid, "Mail") adicione a seguinte linha:
    registerCreatureEvent(cid, "UpAbsolute") Pronto, você implantou o sistema em seu servidor.

     

    Como configurar:
    [50] = {item = 2160, count = 5}, [50] = level que o player vai receber a tal recompensa
    2160 = item que o player vai receber, no caso 2160 é o Crystal Coin
    count = 5 = quantidade do item, no caso 5 Crystal Coins
     
     
     
    Observação: Ao atingir o level o player receberá uma mensagem e o prêmio estará diretamente em sua backpack.

     
     
     
    Qualquer dúvida peço que poste =D
     
     
     
    Até o próximo sisteminha bb's.

Informação Importante

Confirmação de Termo