-
Total de itens
25 -
Registro em
-
Última visita
Tudo que warotserv postou
-
Nome: FCTF (Ou o que você escolher Versão: 8.60 Banco de Dados: MySQL Créditos: À quem fez o Warots (por ter sido apenas a base). - não quero créditos pelo o que eu fiz. _______________________________________________________________________________________ Qual a diferença do FCTF para o CTF? O FCTF, ao contrário do CTF, é flexível em relação à quantidade de times. Posso configurar alguma coisa nesse ot? Sim. Onde posso configurar? Em "mods/ctf.xml". O que posso configurar? Segue abaixo, comentado. -- initial level INITIAL_LEVEL = 450 __________________________________________________________________ -- initial items sorcereritems = { 2520, -- demon shield 2187, -- wand of inferno 8871, -- blue robe 7730, -- blue legs 2323, -- magician hat 2195 -- boots of haste } druiditems = { 2520, -- demon shield 2183, -- hailstorm rod 8871, -- blue robe 7730, -- blue legs 2323, -- magician hat 2195 -- boots of haste } paladinitems = { 2520, -- demon shield 7368, -- assassin star 2492, -- golden armor 7730, -- golden legs 2498, -- golden helme 2195 -- boots of haste } knightitems = { 2520, -- demon shield 2421, -- thunder hammer 2492, -- golden armor 7730, -- golden legs 2498, -- golden helmet 2195 -- boots of haste } __________________________________________________________________ SCORE_BY_DELIVER = 5 -- when a team delivers an opponent flag SCORE_LOSS_BY_HAVE_FLAG_DELIVERED = 2 -- when a team has it flags delivered by an opponent team __________________________________________________________________ -- by default, the map will change after 900 SECONDS TIME_TO_CHANGE_MAP = 900 -- 15 minutes __________________________________________________________________ -- at each map, which teams will participate? teamsPerMap = { [MAP_1] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_2] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_3] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_4] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4}, [MAP_5] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4}, [MAP_6] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4} } __________________________________________________________________ -- name of teams teamName = { [TEAM_1] = "A", [TEAM_2] = "B", [TEAM_3] = "C", [TEAM_4] = "D" } __________________________________________________________________ -- id of flags flagItem = { [TEAM_1] = 1860, -- green [TEAM_2] = 1863, -- yellow [TEAM_3] = 1872, -- blue [TEAM_4] = 1880 -- white } __________________________________________________________________ -- DO NOT CHANGE IF YOU DON'T KNOW WHAT ARE YOU DOING! flagUID = { [TEAM_1] = 50000, [TEAM_2] = 50001, [TEAM_3] = 50002, [TEAM_4] = 50003 } __________________________________________________________________ -- DO NOT CHANGE IF YOU DON'T KNOW WHAT ARE YOU DOING! flagCoverUID = { [TEAM_1] = 50020, [TEAM_2] = 50021, [TEAM_3] = 50022, [TEAM_4] = 50023 } __________________________________________________________________ -- flag positions per MAP flagPosition = { [MAP_1] = { [TEAM_1] = {x = 289, y = 514, z = 4}, [TEAM_2] = {x = 404, y = 513, z = 4} }, [MAP_2] = { [TEAM_1] = {x = 267, y = 329, z = 4}, [TEAM_2] = {x = 333, y = 329, z = 4} }, [MAP_3] = { [TEAM_1] = {x = 241, y = 100, z = 6}, [TEAM_2] = {x = 307, y = 101, z = 6} }, [MAP_4] = { [TEAM_1] = {x = 88, y = 134, z = 5}, [TEAM_2] = {x = 125, y = 174, z = 6}, [TEAM_3] = {x = 151, y = 139, z = 5}, [TEAM_4] = {x = 123, y = 115, z = 5} }, [MAP_5] = { [TEAM_1] = {x = 106, y = 315, z = 6}, [TEAM_2] = {x = 162, y = 382, z = 6}, [TEAM_3] = {x = 215, y = 325, z = 6}, [TEAM_4] = {x = 163, y = 287, z = 6} }, [MAP_6] = { [TEAM_1] = {x = 102, y = 538, z = 7}, [TEAM_2] = {x = 182, y = 534, z = 7}, [TEAM_3] = {x = 181, y = 467, z = 7}, [TEAM_4] = {x = 99, y = 465, z = 7} } } __________________________________________________________________ -- outfit of teams teamLook = { [TEAM_1] = { [V_S] = {lookType = 130, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3} }, [TEAM_2] = { [V_S] = {lookType = 130, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3} }, [TEAM_3] = { [V_S] = {lookType = 130, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3} }, [TEAM_4] = { [V_S] = {lookType = 130, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} } } __________________________________________________________________ -- teams spawns points per map spawnPoints = { [MAP_1] = { [TEAM_1] = {x = 288, y = 521, z = 6}, [TEAM_2] = {x = 400, y = 515, z = 6} }, [MAP_2] = { [TEAM_1] = {x = 267, y = 329, z = 3}, [TEAM_2] = {x = 333, y = 329, z = 3} }, [MAP_3] = { [TEAM_1] = {x = 242, y = 100, z = 7}, [TEAM_2] = {x = 306, y = 101, z = 7} }, [MAP_4] = { [TEAM_1] = {x = 82, y = 137, z = 6}, [TEAM_2] = {x = 125, y = 170, z = 5}, [TEAM_3] = {x = 138, y = 137, z = 4}, [TEAM_4] = {x = 117, y = 118, z = 6} }, [MAP_5] = { [TEAM_1] = {x = 103, y = 322, z = 7}, [TEAM_2] = {x = 155, y = 384, z = 7}, [TEAM_3] = {x = 217, y = 332, z = 7}, [TEAM_4] = {x = 170, y = 285, z = 7} }, [MAP_6] = { [TEAM_1] = {x = 141, y = 505, z = 7}, [TEAM_2] = {x = 147, y = 505, z = 7}, [TEAM_3] = {x = 147, y = 499, z = 7}, [TEAM_4] = {x = 141, y = 499, z = 7} } } __________________________________________________________________ -- sorcerer initial skills V_S_SKILLS = { ML = '118', SHIELDING = '50' } __________________________________________________________________ -- druid initial skills V_D_SKILLS = { ML = '118', SHIELDING = '50' } __________________________________________________________________ -- paladin initial skills V_P_SKILLS = { ML = '30', DISTANCE = '136', SHIELDING = '125' } __________________________________________________________________ -- knight initial skills V_K_SKILLS = { ML = '10', CLUB = '125', SWORD = '125', AXE = '125', SHIELDING = '125' } Imagens, conforme pedido nas regras: http://imageshack.us...ing/94/4cz6.png http://imageshack.us...ng/138/wmme.png http://imageshack.us...ding/32/78y.bmp http://imageshack.us...ng/822/0pnh.png http://imageshack.us...ing/710/m6n.png http://imageshack.us...ng/703/45w1.png Onde posso fazer o download do servidor? Em: http://www.4shared.c...TbrSUj/CTF.html Onde posso visualizar o scan do arquivo? Em: https://www.virustot...sis/1380406216/ Até.
-
Se ninguém responder, fale o objetivo do script. Obrigado.
-
Realmente, não ensina, mas os fundamentos estão lá.
-
Veja se lhe ajuda: http://www.xtibia.com/forum/topic/109036-pasta-data-movements/
-
Ah... isso eu não sei, mas se fosse o player passando em cima do SQM eu saberia =/
-
Explique melhor a sua dúvida, Obrigado.
-
Nosifero, caso ainda não tenha conseguido por favor, me fale.
-
function onLogout(params) if(getPlayerStorageValue(cid, config.storage) > 0) then setPlayerStorageValue(cid, config.storage, -1) end end function onDeath(params) if(getPlayerStorageValue(cid, config.storage) > 0) then setPlayerStorageValue(cid, config.storage, -1) end end editado, leia de novo.
-
action Sistema anti-pega-e-corre (quest)
tópico respondeu ao warotserv de warotserv em Actions e Talkactions
Ache o que quiser, quem ver o script e gostar, que bom que ajudei. Obrigado. -
creatureevent Anti Fast-attack Elf Bot
tópico respondeu ao warotserv de warotserv em Globalevents e Spells
Ache o que quiser, quem ver o script e gostar, que bom que ajudei. Obrigado. -
Tem que checar se o player está offline e tratar essa "excessão" na função "endExpRate()", não? Vamos supor que na hora de chamar essa função ele esteja offline, ele continuará tendo a exp dobrada. Tentarei ajudar mais: crie mais duas funções nesse script, onLogout e onLogin. Em onLogout você salvará o tempo restante e em onLogin você irá checar, pela storage, se o player ainda possui a experiência dobrada e adicionará um novo evento. Espero ter ajudado.
-
action Sistema anti-pega-e-corre (quest)
tópico respondeu ao warotserv de warotserv em Actions e Talkactions
Acredite em mim, sou programador. Faça um código, um programa, fique sem mexer nele por uma semana e depois tente dar manutenção. -
LuckOake, Deixei apenas um .lua tendo controle sobre a lib
-
Obrigado LuckOake, resolvi o problema usando POG. hehehe.
-
Boa tarde galera. Estou desenvolvendo um CTF 8.6 de 4 times e preciso de alguns mapas para ele. No caso, o mapa que você for me disponibilizar, poste na área de mapas e me mande o link (quero que qualquer um possa ter acesso à ele). Atributos de cada mapa: * mapas do tamanho médio * 4 bases (uma para cada time) ; * 1 spawn point para cada time (com saída por teleporte). Obrigado. P.S.: Caso queiram ver uma prévia do server, ctf4teams.servegame.com (1/1)
-
creatureevent Anti Fast-attack Elf Bot
tópico respondeu ao warotserv de warotserv em Globalevents e Spells
lordbug99, realmente, eu havia colocado e esquecido de tirar a função tablelength(), de colocar STATSCHANGE_MANATHLOSS e avisar ao leitor de contar os dots. Em relação ao #T, prefiro evitar o seu uso. Por favor, se informe em http://www.lua.org/manual/5.1/manual.html -
action Sistema anti-pega-e-corre (quest)
tópico respondeu ao warotserv de warotserv em Actions e Talkactions
Discordo com você lordbug99. O script ficou gigante? ficou. Mas caso você saiba fazer um gerenciador de quests, esse não será o problema. Caso queira aprender, por favor, só me falar. -
moveevent Tile Teleporter (random)
tópico respondeu ao warotserv de warotserv em Actions e Talkactions
omega blueheaven, Realmente, essa é a maneira correta, falha minha,hehehe. Oneshot É sempre bom evitar recursividades, dependendo do local, muitas posições estarão incorretas e poderá gerar um stackOverFlow. Obrigado gente! -
Boa noite, pessoal! Estou tendo um problema de atualização de valores. Vou explicar. Eu tenho uma arquivo "a.lua" na pasta \lib que contém a variável var_x = 10 (percebam, uma vez que ela não tem o local, ela é global). Porém, quando um outro arquivo, exemplo "b.lua", modifica essa variável, modifica apenas para ele, continuando para "a.lua" com o valor 10. Como faço para arrumar isso? Muito obrigado.
-
Olá Alisson, Não precisa editar nada além das posições de spawn.
-
Bom dia. Como muitos devem saber a prática de se completar uma quest de baú e depois sair correndo (sem matar os monstros por perto) é muito comum. Com isso, decidi implementar um sistema simples de impedir que isso aconteça. Primeiramente, darei uma visão geral do que é verificado para que o player tenha sucesso na quest. O player não poderá estar a X SQM de distância do baú de quest. O player não poderá estar em uma andar diferente do baú de quest. Agora explicando o que deve ser feito. No arquivo de sua quest, cole o seguinte código -- this table will store the players who are on delay to have their quest completed (successfully or not) playersCompletingQuests = {} local checkingEventDelay = 250 local checkingEventTimes = 60 local maxDistanceToBeCompleted = 7 -- SQM function getDistance (pos1, pos2) -- get distance between two positions (using tibia formula) local difX = pos1.x - pos2.x local difY = pos1.y - pos2.y local difZ = pos1.z - pos2.z -- math.abs() of difs if difX < 0 then difX = -difX end if difY < 0 then difY = -difY end if difZ < 0 then difZ = -difZ end -- using tibia formula local maxDif = difX if maxDif < difY then maxDif = difY end if maxDif < difZ then maxDif = difZ end -- return the result return maxDif end -- To be completed, it's essential that player stays nearby the chest AND at the same floor. function canBeCompleted(cid, item, topos) -- checks if player respected the delay and distance -- check if player is on-line or if it died during the delay time if not isPlayer(cid) then return false end -- store player position in a variable local playerPos = getCreaturePosition(cid) -- check if the distance between player and chest is below the maximum allowed if getDistance(playerPos, topos) > maxDistanceToBeCompleted then return false end -- check same floor condition if playerPos.z ~= topos.z then return false end -- reach here means the player can receive its awards return true end function completeQuest(cid, item, topos) --Event will call this -- remove the player from playersCompletingQuests playersCompletingQuests[cid] = nil -- give player it's awards!!! --double checking if the player hasn't done the quest yet if not questAlreadyCompleted(cid, item) then doCreatureSay(cid, "COMPLETEI UMA QUEST!!", TALKTYPE_ORANGE_1) doPlayerSendTextMessage(cid,22,"Voce completou a quest, parabens!") -- AQUI VOCÊ IMPLEMENTARÁ A PARTE DE ENTREGAR O PRÊMIO AO PLAYER -- AQUI VOCÊ IMPLEMENTARÁ A PARTE DE ACRESCENTAR A STORAGE AO PLAYER else doPlayerSendTextMessage(cid,22,"Voce ja completou essa quest.") end end function checkingEvent(cid, item, topos, checkingsLeft) if checkingsLeft <= 0 then completeQuest(cid, item, topos) else if canBeCompleted(cid, item, topos) then doCreatureSay(cid, checkingsLeft, TALKTYPE_ORANGE_1) addEvent(checkingEvent, checkingEventDelay, cid, item, topos, checkingsLeft-1) else -- cannot be completed if isPlayer(cid) then -- is player online? doCreatureSay(cid, "fail", TALKTYPE_ORANGE_1) doPlayerSendTextMessage(cid,22,"Voce falhou em completar a quest. tente novamente!") end -- remove the player from playersCompletingQuests playersCompletingQuests[cid] = nil end end end function questAlreadyCompleted(cid, item) local queststatus = getPlayerStorageValue(cid,STORAGE_NUMBER) -- COLOQUE O STORAGE NUMBER DA QUEST AQUI!!!!!! if queststatus == -1 then return false else return true end end function isOnAnotherQuest(cid) if playersCompletingQuests[cid] == true then return true else return false end end function onUse(cid, item, frompos, item2, topos) if questAlreadyCompleted(cid, item) then doPlayerSendTextMessage(cid,22,"Voce ja completou essa quest.") elseif isOnAnotherQuest(cid) then doPlayerSendTextMessage(cid,22,"Voce ja esta tentando completar uma outra quest. Aguarde!") else playersCompletingQuests[cid] = true -- player is now trying to achieve success in a quest addEvent(checkingEvent, 0, cid, item, topos, checkingEventTimes) end return true end Agora, faça as devidas mudanças, para se adaptar à sua quest, em: faça o que se pede. Agora, explicando o que pode ser configurado: checkingEventDelay representa de quanto em quanto tempo (em milissegundos) a função "checkingEvent" será chamada. checkingEventTimes representa quantas vezes a função "checkingEvent" será chamada. maxDistanceToBeCompleted representa qual é a distancia máxima que o player pode se distanciar do baú, para que a quest não falhe. Bom, é isso. Espero ter ajudado. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.
-
Este sistema faz com que o server seja divido em 2 times, o time vermelho e o time azul. em "data\creaturescripts\scripts" crie um arquivo chamado "pvpTeam.lua" e cole o seguinte código redTeamSpawn = { x = 218, y = 172, z = 7} -- red team spawn position blueTeamSpawn = { x = 218, y = 170, z = 7} -- blue team spawn position redTeamParticipants = {} blueTeamParticipants = {} function teamLength(team) -- return the number of players in team local count = 0 for _ in pairs(team) do count = count + 1 end return count end function playerJoin(cid) -- try to join player in event if ableToJoin(cid) then redTeamParticipantsLength = teamLength(redTeamParticipants) blueTeamParticipantsLength = teamLength(blueTeamParticipants) if redTeamParticipantsLength <= blueTeamParticipantsLength then redTeamParticipants[cid] = true doPlayerSendTextMessage(cid,22,"Voce foi escolhido para ser do time vermelho.") doTeleportThing(cid, redTeamSpawn) else blueTeamParticipants[cid] = true doPlayerSendTextMessage(cid,22,"Voce foi escolhido para ser do time azul.") doTeleportThing(cid, blueTeamSpawn) end return TRUE else return FALSE end end function playerRemove(cid) -- remove player from event (if its participating) if isParticipating(cid) then if redTeamParticipants[cid] == true then redTeamParticipants[cid] = nil else blueTeamParticipants[cid] = nil end return TRUE else return FALSE end end function isParticipating (cid) -- verify if player is participating of the event if blueTeamParticipants[cid] == true or redTeamParticipants[cid] == true then return TRUE else return FALSE end end function ableToJoin (cid) -- checks if players are able to join if isPlayer(cid) and not isParticipating(cid) then return TRUE else return FALSE end end function arePlayersOfSameTeam (cid1, cid2) -- checks if the players are of the same team if ((blueTeamParticipants[cid1] == true and blueTeamParticipants[cid2] == true) or (redTeamParticipants[cid1] and redTeamParticipants[cid2])) then return TRUE else return FALSE end end function onLogin(cid) -- checks if it's really a player and if it's only if isPlayer(cid) then if isParticipating(cid) == true then return FALSE -- Ooops! If the script reachs here, we gotta verify what's going wrong else if playerJoin(cid) == true then return TRUE -- everything gone as expected else return FALSE -- Ooops! If the script reachs here, we gotta verify what's going wrong end end else return TRUE end end function onLogout(cid) -- this function is essential to not unbalance the teams if isParticipating (cid) then return playerRemove(cid) end return TRUE end function onAttack(cid, attacker) -- verify if both are players if not isPlayer(cid) or not isPlayer(attacker) then return TRUE end -- are those players participating of the event? if not isParticipating(cid) or not isParticipating (attacker) then return TRUE end if arePlayersOfSameTeam(cid, attacker) then -- a player of the same team cannot attack the other!! return FALSE else return TRUE end end function onStatsChange(cid, attacker, t, combat, value) -- verify if both are players if not isPlayer(cid) or not isPlayer(attacker) then return TRUE end -- verify if both are participating of PVP if isParticipating(cid) and isParticipating(attacker) then -- both are participating of event -- verify if both are of the same team if arePlayersOfSameTeam(cid, attacker) then -- they're of the same team. Only heals are acceptable if t == STATSCHANGE_HEALTHGAIN or t == STATSCHANGE_MANAGAIN then return TRUE else return FALSE end else -- they're not of the same team. Only damages are acceptable if t == STATSCHANGE_HEALTHGAIN or t == STATSCHANGE_MANAGAIN then return FALSE else return TRUE end end else -- one or both are not participating of event return TRUE end -- getting local player1Team = monstersTeam[getCreatureName(cid)] -- return if it has no team if player1Team == nil then return TRUE end -- getting monster that is attacking team local monster2Team = monstersTeam[getCreatureName(attacker)] -- return if it has no team if monster2Team == nil then return TRUE end -- check if they're of the same team if monster1Team == monster2Team then -- if they're of the same team, returning false will not allow the damage to be done to its partner return FALSE else return TRUE end return TRUE end agora, em "creaturescripts.xml" adicione o seguinte <event type="attack" name="PvpTeam1" event="script" value="pvpTeam.lua"/> <event type="statschange" name="PvpTeam2" event="script" value="pvpTeam.lua"/> <event type="login" name="PvpTeam3" event="script" value="pvpTeam.lua"/> <event type="logout" name="PvpTeam4" event="script" value="pvpTeam.lua"/> depois, no arquivo "login.lua" que se encontra em "data\creaturescripts\scripts" adicione registerCreatureEvent(cid, "PvpTeam1") registerCreatureEvent(cid, "PvpTeam2") registerCreatureEvent(cid, "PvpTeam3") registerCreatureEvent(cid, "PvpTeam4") Bom, é isso. Espero ter ajudado. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.
-
Bom dia novamente, agora vou postar outro script que fiz que faz com que, quando um player pisar em um tile com determinada action ID, seja teletransportado para uma lugar randômico. Primeiramente, crie um arquivo em "data\movements\scripts" chamado "tileTeleporter.lua" e copie o seguinte conteúdo para dentro dele local teleportPoints = { [ 0] = {x = 210, y = 190, z = 7}, [ 1] = {x = 233, y = 196, z = 7}, [ 2] = {x = 243, y = 188, z = 7}, [ 3] = {x = 254, y = 180, z = 7}, [ 4] = {x = 231, y = 160, z = 7}, [ 5] = {x = 212, y = 158, z = 7}, [ 6] = {x = 212, y = 170, z = 7}, [ 7] = {x = 227, y = 171, z = 7}, [ 8] = {x = 266, y = 149, z = 7}, [ 9] = {x = 234, y = 140, z = 7}, [10] = {x = 205, y = 143, z = 7}, [11] = {x = 177, y = 126, z = 7}, [12] = {x = 290, y = 177, z = 6}, [13] = {x = 219, y = 185, z = 6}, [14] = {x = 261, y = 167, z = 6}, [15] = {x = 270, y = 167, z = 8} } function onStepIn(cid, item, position) if isPlayer(cid) then local position = teleportPoints[math.random(0,15)] doTeleportThing(cid, position) end return true end agora, em "movements.xml" cole a seguinte linha de código <movevent type="StepIn" actionid="8586" script="tileTeleporter.lua"/> Bom, é isso. Acho que não precisa explicar, está bem fácil de entender e alterar o código. Espero ter ajudado. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.
-
Outro script que fiz e estou disponibilizando: Tile Trainer O que ele faz? Enquanto o player estiver em um tile que possui determinada action id, ele vai ficar treinando suas habilidades. Primeiro, em "movements\scripts" crie um arquivo chamado "skill.lua". Feito isso, coloque em seu conteúdo o seguinte texto: local delay = 200 local FIST = 0 local CLUB = 1 local SWORD = 2 local AXE = 3 local DISTANCE = 4 local SHIELDING = 5 local FISHING = 6 function samePos(pos1, pos2) if pos1.x == pos2.x and pos1.y == pos2.y and pos1.z == pos2.z then return true else return false end end function addSkillFunction(cid, item, position) if not isPlayer(cid) == TRUE then return FALSE end local playerPos = getCreaturePosition(cid) if not samePos(position,playerPos) then return FALSE end if (isKnight(cid) == TRUE) then doPlayerAddSkillTry(cid, FIST, 1) doPlayerAddSkillTry(cid, CLUB, 1) doPlayerAddSkillTry(cid, SWORD, 1) doPlayerAddSkillTry(cid, AXE, 1) doPlayerAddSkillTry(cid, SHIELDING, 1) doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) doSendMagicEffect(position, 2) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end if (isPaladin(cid) == TRUE) then doPlayerAddSkillTry(cid, DISTANCE, 1) doPlayerAddSkillTry(cid, SHIELDING, 1) doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) doSendMagicEffect(position, 5) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end if (isSorcerer(cid) == TRUE or isDruid(cid)) then doPlayerAddMana(cid,80) doPlayerAddSpentMana(cid, 80) addEvent(addSkillFunction,delay,cid, item, position) return TRUE end return FALSE end function onStepIn(cid, item, position) if isPlayer(cid) then local playerPos = getCreaturePosition(cid) addEvent(addSkillFunction,delay,cid, item, position) doPlayerSendTextMessage(cid, 25, "TREINANDO") end return true end depois, em "movements.xml" adicione a seguinte linha: <movevent type="StepIn" actionid="8585" script="skill.lua"/> Bom, é isso. Acho que não precisa explicar, está bem fácil de entender e alterar o código. Espero ter ajudado. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.
-
Bom... decidi postar agora o script que eu fiz para barrar os botters de fast attack. Primeiro, crie um arquivo chamado "antiBot.lua" em "data\creaturescripts\scripts" e nele adicione o seguinte conteúdo: -- counts physicals, casts .... [player name : creature cid] playerAttacksMade = {} playerActivateTime = {} playerBlocked = {} function tablelength(T) local count = 0 for _ in pairs(T) do count = count + 1 end return count end function onLogin(cid) if isPlayer(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Loading Anti Bot... done.' ) playerAttacksMade[cid] = {} playerActivateTime[cid] = {} playerBlocked[cid] = false end return true end function onLogout(cid) if isPlayer(cid) then playerAttacksMade[cid] = nil playerActivateTime[cid] = nil playerBlocked[cid] = nil end return true end function onStatsChange(cid, attacker, type, combat, value) local maxAttacks = { 6, --pos 1 6, --pos 2 6, --pos 3 6, --pos 4 7, --pos 5 7, --pos 6 7, --pos 7 7, --pos 8 } if not type == STATSCHANGE_HEALTHLOSS or not type == STATSCHANGE_MANALOSS or not isPlayer(attacker) then return true end if value <= 0 then return true end if playerAttacksMade[attacker][cid] == nil then playerAttacksMade[attacker][cid] = 0 playerActivateTime[attacker][cid] = os.time() end local currentTime = os.time() --TESTE --doPlayerSendTextMessage(attacker, MESSAGE_STATUS_CONSOLE_ORANGE, playerAttacksMade[attacker][cid] .. '________' .. attacker .. '_____' .. cid .. '______' .. currentTime .. '_______' .. playerActivateTime[attacker][cid] ) if currentTime >= playerActivateTime[attacker][cid] then playerActivateTime[attacker][cid] = currentTime + 1 playerAttacksMade[attacker][cid] = 0 else playerAttacksMade[attacker][cid] = playerAttacksMade[attacker][cid] + 1 end if playerAttacksMade[attacker][cid] > maxAttacks[getPlayerVocation(attacker)] then playerBlocked[attacker] = true doBroadcastMessage('O player ' .. getPlayerName(attacker) .. ' esta usando bot de fast attack. O seu ataque foi travado ate que ele relogue.', 21) doShowTextDialog(attacker,1952,"PARE DE USAR ELFBOT! Seu ataque foi bloqueado. Para destravar basta relogar. Obrigado. (Sistema exclusivo do ot)") return FALSE end return TRUE end function onCombat(cid, target) if isPlayer(cid) then if not playerBlocked[cid] then registerCreatureEvent(target, "AntiBot2") else return false end end return true end function onCast(cid, target) if isPlayer(cid) then if playerBlocked[cid] then return false end end return true end e em "creaturescripts.xml", encontrado em "data\creaturescripts" adicione: <event type="combat" name="AntiBot1" event="script" value="antiBot.lua"/> <event type="statschange" name="AntiBot2" event="script" value="antiBot.lua"/> <event type="login" name="AntiBot3" event="script" value="antiBot.lua"/> <event type="logout" name="AntiBot4" event="script" value="antiBot.lua"/> <event type="cast" name="AntiBot5" event="script" value="antiBot.lua"/> Agora vou explicar a parte configurável: Aqui você vai modificar qual o número máximo de ações de combate (que dão dano) que certa vocação poderá dar. Posição 1 é Sorcerer, 2 é Druid, 3 é Paladin, 4 é Knight e assim por diante.... Escolha bem esses números! Caso você erre, ele irá ficar detectando erradamente. Por exemplo,vamos supor que o knight tenha o fastAttack em 500ms (logo ele executará 2 ataques por segundo) e que sua magia de dano de menor exhaust tenha um exhaust de apenas 600ms, logo o numero maximo de ataques dele por segundo será 4 (cuidado quando spells de dano diferentes puderem ser usadas ao mesmo tempo, daí você terá de acrescentar mais 1 ao número de ataques por segundo. Não se esqueça dos dots Por favor, testem e me falem o que acharam. Espero que ajude a tirar os botters de seu server. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums. É bom espalhar esse script uma vez que botters nos servers 8.6 é muito comum.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.