Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''tfs 1.1''.

  • 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

Encontrado 17 registros

  1. Olá, gostaria de ajuda em uma spell, o Amaterasu. Ao castar aparece um efeito passageiro em min(109) e aparece o fogo do target (effect80), após esse hit o target fica com a condition dazzled, cada dazzled (effect 79) o player vai receber 5( de dano com um intervalo de 2 segundos durando 10 hits. E teria outra magia (stop Amaterasu) que so poderia castar se o target estiver com condition dazzled, ao castar apareceria um effect em min (109) retiraria 1k de dano em min e removeria a condition dazzled do target.. Uffa,complicada kk. Eu peguei o spell maker e tentei fazer a spell, ela até funciona só que fica dando erro na distro (condition not found. Amaterasu
  2. E aí galera, beleza? Venho trazer esse script aqui que eu encontrei num server que eu baxei (não sei quem é o autor), e achei muito interessante. O que ele faz? Se você for GOD, ele cria um TP com as coordenadas digitadas no param da talkaction na sua frente, desde que a posição na sua frente não seja um player ou um item não~tile. function onSay(player, words, param) if player:getAccountType() < ACCOUNT_TYPE_GOD then return true end local split = param:split(",") if tonumber(split[3]) == nil then player:sendCancelMessage("Insufficient parameters.") return false end local msg = nil for i = 1, #split do split[i] = tonumber(split[i]) end local direction = { [0] = function(ps) ps.y = ps.y - 1 return ps end, [1] = function(ps) ps.x = ps.x + 1 return ps end, [2] = function(ps) ps.y = ps.y + 1 return ps end, [3] = function(ps) ps.x = ps.x - 1 return ps end } local teleporter = direction[player:getDirection()](player:getPosition()) if isCreature(Tile(teleporter):getTopCreature()) then msg = "You cannot create a teleport on top of a player." end if Tile(teleporter):getTopDownItem() then msg = "You cannot create a teleport on top of an item." end if not msg then msg = "Teleport created to cordinates: {X: "..split[1].." Y: "..split[2].." Z: "..split[3].."}." doCreateTeleport(1387, {x = split[1], y = split[2], z = split[3]}, teleporter) end player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, msg) return falseend Créditos: ???, se alguém souber favor dizer
  3. Olá XTibianos, Me chamo Rodrigo, sou novo nisso tudo e estou entrando de cabeça para estudar em geral o processo de um OTserv. Não consigo estudar os Otservs que existem aqui no Xtibia por serem muitos antigos, modificados, com erros ou sem sources. Por isso eu estou tentando compilar um TFS 100% limpo (consegui), também compilar o Server (vou fazer isso agora), como sou leigo, ainda não entendi se ao compilar o server GIT do SERVER, vou receber apenas as pastas e configs, caso seja isso, onde eu posso conseguir as DLLs para rodar o servidor? Estou trabalhando com arquitetura x64 Como falei no início, o meu objetivo é estudar, tenho uma noção básica de programação e quero fazer modificações de todos os níveis em um OTServ gradualmente. Então quem entende do assunto, se puder me resumir uma explicação de como gerar um "OT limpo", como conseguir as DLLs sem ter que pegar de outro server, assim como peguei o TFS e SERVER original. Aproveitando, como posso descobrir a versão do Tibia do TFS? GIT do TFS??? Consigo trabalhar com esse TFS em qualquer versão do Tibia sem bugs no cliente? Por último, qual a melhor versão de Tibia para se trabalhar, considerando a versão do cliente, sources etc... Em termos de possibilidades, customizações. Obrigado, peço desculpas se estiver na área errada. Sim, já li alguns bons tutoriais, já sei como rodar um OT, mudar mapa, sprites, criar sistemas.
  4. Olá amigos, eu preciso de sua ajuda, porque eu estou criando um servidor do TFS 1.2 e é mysql versão 10.76. Meu problema é que quando eu abri-lo e colocar o ip eu recebo: erro de conexão falhou e amigos se eles podem obter. Menos eu. Iria me ajudar por favor? Para este problema deveria? e como resolvido?
  5. Olá gostaria de pedir uma força pra alguem ai. Eu gostaria que este script me envie uma BAG por cada boss do reward chest que o jogador matar, atualmente ele esta enviando os items normal so que se eu mato 2 bosses iguais ou diferentes os items fica um em cima do outro, gostaria de separar. Ex: matou um boss os items vai ser enviado dentro de uma bag ou backpack dependendo do id que colocar, quando eu matar o outro boss vou receber outra bag ou backpack e quando eu ir na ilha pegar os items do reward, lá vai esta 2 bag ou backpack e nao os items tudo juntos Eu tentei mais consegui apenas enviar 1 item por cada bag ou backpack, ou seja, se eu matar um boss e ganhar 10 item, vai ser enviado 10 bags :\ Por fim o scritp é este: function sort_descending(t) local tmp = {} for k, v in pairs(t) do table.insert(tmp, {k, v}) end table.sort(tmp, function(a, b) return a[2] > b[2] end) return tmpendfunction table.find(t, v) for i,x in pairs(t) do if x == v then return true end endendfunction Player:addItemRewardBag(itemid, count)local rewardbag = self:getDepotChest(99, true) return rewardbag:addItem(itemid, count)endfunction MonsterType:getBossReward(chance, unique) local ret = {} local function randomItem(lootBlock, chance) local randvalue = math.random(0, 100000) / (getConfigInfo("rateLoot") * chance) if randvalue < lootBlock.chance then if (ItemType(lootBlock.itemId):isStackable()) then return (randvalue%lootBlock.maxCount) + 0 else return 1 end end end local lootBlockList = self:getLoot() for _, loot in pairs(lootBlockList) do local rd = randomItem(loot, chance) if rd then if loot.uniquedrop then if unique then table.insert(ret, {loot, rd}) end else table.insert(ret, {loot, rd}) end end end return retendBossLoot = {}BossUids = {}function BossLoot:new(boss) if not table.find(BossUids, boss:getId()) then table.insert(BossUids, boss:getId()) return setmetatable({creature=boss}, {__index = BossLoot}) endendfunction BossLoot:updateDamage() if self.creature then local tmp = {} local totaldmg = 0 for killer, damage in pairs(self.creature:getDamageMap()) do totaldmg = totaldmg+damage.total tmp[killer] = damage.total end self.players = sort_descending(tmp) self.totaldmg = totaldmg else error("Creature not found.") endendfunction BossLoot:setRewards() if self.totaldmg and self.creature then if getConfigInfo("rateLoot") > 0 then local mt = MonsterType(self.creature:getName()) for i, playertab in ipairs(self.players) do local loot if i == 1 then loot = mt:getBossReward(playertab[2] / self.totaldmg, true) else loot = mt:getBossReward(playertab[2] / self.totaldmg, false) end table.insert(self.players[i], loot) end end else error("Error") endendfunction BossLoot:addRewards() if self.players and self.players[1] and self.players[1][3] then for i, playertab in ipairs(self.players) do local player = Player(playertab[1]) if player then local str = "The following items are available in your reward chest: " for i, lootTable in ipairs(playertab[3]) do local item = player:addItemRewardBag(lootTable[1].itemId, math.ceil(lootTable[2])) if item then str = str .. item:getNameDescription() .. ", " end end str = str:sub(1, #str-2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, str) end end else error("Error") endendfunction onKill(cid, target)target = Monster(target) if (target ~= nil) then local mt = MonsterType(target:getName()) if mt:useRewardChest() then local loot = BossLoot:new(target) if loot then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) doDecayItem() target:setDropLoot(false) loot:updateDamage() loot:setRewards() loot:addRewards() corpse:setAttribute('aid', 21584) end end end return trueend
  6. Olá galera, estou usando aquele servidor wono 8.54 e preciso de uma ajuda quanto a uma spell, é o susanoo. Ao usar aparece um effect em você e outra que fica até a spell acabar,spell te deixa imune a qualquer dano e quando acaba tira % da sua vida. Tenho uma base dela porém não está deixando imune a dano, e não estou conseguindo isso sozinho.
  7. Oi. Vim trazer esse sistema postado por nosso amigo zbizu da comunidade otland. Se não sabe como funciona, veja o exemplo abaixo. Espero que seja útil! 07:39 You see a mastermind shield (Def:37). It weighs 57.00 oz. [shield.+5%] [mp.+10%] [melee.+2%] 07:40 You see a crossbow (Range:5). It weighs 40.00 oz. [shield.+2%] [mp.+14%] [hp.+4%] SLOT SYSTEM global.lua function getItemAttack(uid) return ItemType(getThing(uid).itemid):getAttack() end function getItemDefense(uid) return ItemType(getThing(uid).itemid):getDefense() end function getItemArmor(uid) return ItemType(getThing(uid).itemid):getArmor() end function getItemWeaponType(uid) return ItemType(getThing(uid).itemid):getWeaponType() end function isArmor(uid) if (getItemArmor(uid) ~= 0 and getItemWeaponType(uid) == 0) then return true else return false end end function isWeapon(uid) return (getItemWeaponType(uid) > 0 and getItemWeaponType(uid) ~= 4) end function isShield(uid) return getItemWeaponType(uid) == 4 end function isBow(uid) return (getItemWeaponType(uid) == 5 and (not ItemType(getThing(uid).itemid):isStackable())) end actions.xml <action itemid="8300" script="slot.lua"/> slot.lua action local conf = {maxSlotCount=3,ignoredIds={}}function choose(...) local arg = {...} return arg[math.random(1,#arg)]endfunction onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 0 or item.itemid == 0 then return false end toPosition.stackpos = 255 if isInArray(conf.ignoredIds, itemEx.itemid) or isItemStackable(itemEx.uid) or itemEx.itemid == 0 or itemEx.type > 1 or not(isArmor(itemEx.uid) or isWeapon(itemEx.uid) or isShield(itemEx.uid)) then return false end if isCreature(itemEx.uid) then return false end local nam = Item(itemEx.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION) function getper() local n = 1 for i=1,10 do n = n+math.random(0,10) if n < 8*i then break end end return n end function getSlotCount(nam) local c = 0 for _ in nam:gmatch('%[(.-)%]') do c = c+1 end return c end if getSlotCount(nam) < conf.maxSlotCount then local l = choose('hp','mp','ml','melee','shield','dist') local p = getper() doSendMagicEffect(toPosition,30) nam = nam..' ['..l..'.+'..p..'%]' doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,l..'.+'..p..'%') doSetItemSpecialDescription(itemEx.uid, nam) doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"Slot limit reached.") end return trueend creaturescripts.xml <event type="login" name="SlotLogin" script="slot.lua"/> slot.lua creaturescripts local conditionMP,conditionHP,conditionML,conditionCLUB,conditionSHI,conditionDIST,conditionAMP = {},{},{},{},{},{},{}for i=1,300 do conditionHP[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionHP[i], CONDITION_PARAM_SUBID, 50) setConditionParam(conditionHP[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionHP[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionHP[i], CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 100+i) conditionMP[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionMP[i], CONDITION_PARAM_SUBID, 51) setConditionParam(conditionMP[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionMP[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionMP[i], CONDITION_PARAM_STAT_MAXMANAPOINTSPERCENT, 100+i) conditionML[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionML[i], CONDITION_PARAM_SUBID, 52) setConditionParam(conditionML[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionML[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionML[i], CONDITION_PARAM_STAT_MAGICPOINTSPERCENT, 100+i) conditionCLUB[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionCLUB[i], CONDITION_PARAM_SUBID, 53) setConditionParam(conditionCLUB[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionCLUB[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionCLUB[i], CONDITION_PARAM_SKILL_MELEEPERCENT, 100+i) conditionSHI[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionSHI[i], CONDITION_PARAM_SUBID, 54) setConditionParam(conditionSHI[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionSHI[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionSHI[i], CONDITION_PARAM_SKILL_SHIELDPERCENT, 100+i) conditionDIST[i] = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(conditionDIST[i], CONDITION_PARAM_SUBID, 55) setConditionParam(conditionDIST[i], CONDITION_PARAM_BUFF_SPELL, 1) setConditionParam(conditionDIST[i], CONDITION_PARAM_TICKS, -1) setConditionParam(conditionDIST[i], CONDITION_PARAM_SKILL_DISTANCEPERCENT, 100+i)endfunction getSlotType(n) if not n then return false end if n:match('%[(.+)%]') then n = n:match('%[(.+)%]') if n == '?' then return 0,n else return n:match('(.-)%.([+-])(%d+)%%') end else return false endendlocal function loadSet(cid)local player = Player(cid)if not player then return false end local t = {} for slot=1,9 do t[slot] = '' local s = getPlayerSlotItem(player,slot).uid if s ~= 0 then t[slot] = Item(s):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION) end end return tendfunction chk(cid,f) if not Player(cid) then return false end local t = loadSet(cid) if not t then return false end for i=1,#f do if f[i] ~= t[i] then equip(player,nil,slot) break end end addEvent(chk,2000,cid,t)endfunction check_slot(aab, i) if i == 5 or i == 6 then if isWeapon(aab) or isShield(aab) or isBow(aab) then return true end else return true endreturn falseendfunction equip(player,item,slot) local t = {} if item then local mm,sinal,qto = getSlotType(Item(item.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)) t[mm] = tonumber(qto) end for i=1,9 do if i ~= slot then if getPlayerSlotItem(player,i).itemid ~= 0 then local aab = getPlayerSlotItem(player,i).uid if aab and check_slot(aab,i) then for _ in Item(aab):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION):gmatch('(%[.-%])') do local mm,sinal,qto2 = getSlotType(_) if mm then if not t[mm] then t[mm] = 0 end t[mm] = t[mm]+tonumber(qto2) t[mm] = t[mm] > 300 and 300 or t[mm] end end end end end end local fu = 0 local ca = {} local s = '' for sl,n in pairs(t) do fu = fu+1 s = s..''..n..'% more of '..sl..'\n' if sl == 'hp' then player:addCondition(conditionHP[tonumber(n)]) ca[50] = 1 doSendTutorial(player,19) elseif sl == 'mp' then player:addCondition(conditionMP[tonumber(n)]) ca[51] = 1 doSendTutorial(player,19) elseif sl == 'ml' then player:addCondition(conditionML[tonumber(n)]) ca[52] = 1 elseif sl == 'melee' then player:addCondition(conditionCLUB[tonumber(n)]) ca[53] = 1 elseif sl == 'shield' then player:addCondition(conditionSHI[tonumber(n)]) ca[54] = 1 elseif sl == 'dist' then player:addCondition(conditionDIST[tonumber(n)]) ca[55] = 1 end end if fu > 0 then for i=50,55 do if not ca[i] then doRemoveCondition(player:getId(),CONDITION_ATTRIBUTES,i) end end else for i=50,55 do doRemoveCondition(player:getId(),CONDITION_ATTRIBUTES,i) end end return trueendfunction onLogin(player) equip(player,nil,slot)local cid = player:getId() addEvent(chk,2000,cid,loadSet(cid)) return trueend SLOT REMOVER actions.xml <action itemid="8299" script="slotremove.lua"/> slotremove.lua function getSlotType_full(n) if not n then return false end if n:match('%[(.+)%]') then n = n:match('%[(.+)%]') if n == '?' then return 0,n else return n end else return false endendfunction onUse(cid, item, fromPosition, itemEx, toPosition)item_slots_a = 0item_slots_n = ""item_slots_t = {} for _ in Item(itemEx.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION):gmatch('(%[.-%])') do item_slots_a = item_slots_a + 1 item_slots_t[item_slots_a] = getSlotType_full(_) end if item_slots_t[1] == nil then return false end for i = 1, #item_slots_t - 1 do item_slots_n = item_slots_n .. "[" .. item_slots_t[i] .. "]" end doRemoveItem(item.uid,1) doSendMagicEffect(toPosition,CONST_ME_MAGIC_RED) doSetItemSpecialDescription(itemEx.uid, item_slots_n) doPlayerSendTextMessage(cid,20,"Attribute removed.")return trueend
  8. tuca1010

    NPC

    Gostaria da ajuda de vocês para criar um NPC que ao player falar hi a ele, ele dá 3 opções de pokémons para dar ao player, daí o player seleciona um deles e é teleportado para uma coordenada e ganha alguns itens. OBS: Só pode pegar uma vez o pokémon e os itens com o NPC ! Agradeço desde já !
  9. Acesse agora mesmo: www.tibiaelectro.com MAPA GLOBAL - www.tibiaelectro.com TIBIA ELECTRO [10.90] IP: www.tibiaelectro.com Port: 7171 Versão: 10.90 Dedicado: 24horas/7dias Sobre o Mapa: - Warzone 1, 2 e 3 - War System - Bank System - Mount System - Market System - Gray Beach City - Venore Modificada - Trainer Offline - Trainer Online - Wrath of Emperor Quest 100% - Roshamull 100% - Oramond 100% - Zao 100% - POI 100% - Blood Herb Quest 100% - Chayenne Realm Quest 100% - Pythius The Rotten Quest 100% - Npc Addoner - NPCs Originais Rates do Servidor: Informações do Servidor: - Protection Level = 50 - RedSkull = 5 kills - BlackSkull = 8 kills - Infinite Weapons = "yes" - Infinite Runes = "yes" Algumas imagens do servidor Curta nossa Fanpage https://www.facebook.com/tibiaelectro Acesse agora mesmo: www.tibiaelectro.com
  10. Celestia abrirá 5 de Dezembro, 9:00 AM Hora de Brasília. Contagem regressiva em http://celestia-realm.com/ Celestia Realm é um servidor oldschool de OpenTibia, o mapa é próprio, e o antigo gameplay que os nostálgicos gostam, com algumas surpresas também. Items, spells, outfits e monstros tem sprites antigos, já o mapa tem tudo que os sprites novos podem oferecer. Todo o combate é no esquema do 7.4, com spells antigas, formulas antigas, exhaust antigo e sem hotkey. Monstros e items são os implementados até o 7.6/7.72, então Hydras estão presentes. Temos um grande número de quests escondidas e áreas secretas esperando para serem descobertos, mistérios e quebra-cabeças. Vários melhoramentos do Tibia atual estão presentes, como o novo e prático sistema de NPC, items como runas e flasks stackando, para ver todas as diferenças confira a seção what is different do nosso FAQ. Em Celestia você tem duas opções de client para utilizar, tanto com sprites 7.4 como a versão com sprites 7.1, a escolha é sua. Exp Rate Do 1 ao 20 - x6 Do 21 ao 35 - x5 Do 36 ao 90 - x4 Do 91 ao 105 - x3 Skills and Magic rates são estagiados, avançam muito mais rápido no início. Promotion, Blessings, Tasks and e outras coisas mais são obtidas através de quests dentro do jogo. Combate e spell system igual ao 7.4. Algumas Quests Épicas, onde os items só dão respaw de novo após algum tempo. Runas cargas dobradas, party exp share, knights e paladins com dano buffado, mana regen x4. Crie sua conta agora! Celestia Realm oldschool, um servidor tão bom que dá até pra sentir o gostinho.
  11. Boa tarde galera, o adm Daniel postou o LUA Parser feito pelo Codex NG (a seguir) local spells = {} local para = { 'group', 'spellid', 'name', 'words', 'lvl', 'mana', 'prem', 'range', 'needtarget', 'blockwalls', 'needweapon', 'exhaustion', 'groupcooldown', 'casterTargetOrDirection', 'aggressive', 'needlearn', 'selftarget', 'script', 'charges', 'maglv' } function parseSpells() local file = 'data/spells/spells.xml' local k = {} for line in io.lines(file) do if string.match(line, '<(%a-)%s* ') ~= nil then spellParam = string.match(line, '<(%a-)%s* ') if spellParam ~= nil then for type_ in line:gmatch(spellParam) do for i = 1, #para do if line:match(para[i]..'="(.-)"') then table.insert(k, para[i]..' = "'..line:match(para[i]..'="(.-)"')..'", ') end end local temp = '{'..table.concat(k) temp = temp:sub(1, #temp - 2)..'},' k = {} table.insert(spells, temp) end end end end for k, v in pairs(spells)do print(v) end end parseSpells() Meu pedido é reestruturá-lo para que fique dessa maneira a saída: ["exori gran ico"] = {group="attack",spellid="62",name="Annihilation",words="exori gran ico",lvl="110",mana="300",prem="1",range="1",needtarget="1",blockwalls="1",needweapon="1",exhaustion="30000",groupcooldown="4000",needlearn="0",script="attack/annihilation.lua", vocations = {"Knight","Elite Knight"}}, isso facilitará minha vida, pq estou mexendo em um spellbar para o OTClient e seria interessante ter um código que atualizasse todas as alterações no meu spells.xml de uma unica vez, pra apenas colar no script do OTClient igual Obrigado
  12. Criador: Eu Draky Lucas Sistema: distribuição de atributos e sistema de crítico (de acordo com o atributo dexterity + adicionais do set) (ainda preciso arrumar as cores das labels e etc, mas isso vou fazendo com o tempo) #update: http://www.xtibia.com/forum/topic/237948-drakys-show-off/?p=1676875 old: Sistema foi feito inteiramente nas sources do servidor TFS 1.1 (que ja peguei com algumas modificações, como cast, por isso nao quis usar a do github 1,2) e em LUA + Sources do OTClient. O char parece que está "andando" embora esteja parado porque o tibia.dat mudou recentemente, depois procurarei como resolver isso nas sources do OTClient ou usando algum dat editor.
  13. Boa noite galera do xtibia. Não sei se estou na area correta, se eu não estiver por favor mover, fico muito agradeçido. Bom gostaria de saber como faço uma arma fist fighting, tentei mudar no item.xml <attribute key="weaponType" value="fist" /> mas da o seguinte erro --------->
  14. Está dando esse erro no distro assim que vou comprar 1 skill
  15. Feito por Sir Islam e é bem simples.. Caso você nbão tenha na db execute a query db.query("INSERT INTO `player_namelocks`(`player_id`, `reason`, `namelocked_at`, `namelocked_by`) VALUES (".. PlayerGUID.."," .. db.escapeString(reason) .. ","..timeNow.."," .. player:getGuid() .. ")") NameLock Em talkactions.xml adicione <talkaction words="/namelock" separator=" " script="namelock.lua" /> <talkaction words="/unlock" separator=" " script="unlock.lua"/ Em namelock.lua adicione function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local name = param local reason = '' local separatorPos = param:find(',') if separatorPos ~= nil then name = param:sub(0, separatorPos - 1) reason = string.trim(param:sub(separatorPos + 1)) end local PlayerGUID = getPlayerGUIDByName(name) if PlayerGUID == 0 then return false end local timeNow = os.time() db.query("INSERT INTO `player_namelocks`(`player_id`, `reason`, `namelocked_at`, `namelocked_by`) VALUES (".. PlayerGUID.."," .. db.escapeString(reason) .. ","..timeNow.."," .. player:getGuid() .. ")") local target = Player(name) if target ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " has been Namelock.") target:remove() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " has been Namelock.") end end Em unlock.lua adicione function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local resultId = db.storeQuery("SELECT `id` FROM `players` WHERE `name` = " .. db.escapeString(param)) if resultId == false then return false end db.asyncQuery("DELETE FROM `player_namelocks` WHERE `player_id` = " .. result.getDataInt(resultId, "id")) result.free(resultId) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, param .. " has been unlock.") return false end .~> Como usar /namelock nome, motivo /unlock nome Curtiu? da um rep ae né fi
×
×
  • Criar Novo...