Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''Action%252FTalkaction''.

O índice de pesquisa está sendo processado. Os resultados atuais podem não estar completos.
  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • Portal Tibiaking
    • Portal
    • Sobre o Fórum
    • Projetos Open Source
    • Regras
  • OTServer Tibia & Derivados
    • Suporte & Pedidos
    • OTServer Downloads
    • OTServer Scripts
    • Ferramentas OpenTibia
    • Linguagens de Programação
    • Mapas
    • Websites
    • Show Off
    • Gráficos e Design
    • Divulgações
  • Tibia e Bots
    • Tibia
    • Bots & Macro
  • Diversos
    • Playground (Off-topic)

Calendários

  • Calendário Oficial
  • Calendário de OTServs
  • Calendários Diversos

Blogs

Não há resultados


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


Localização


Meu personagem


OTServ favorito


Bot preferido


Interesses

  1. O jogador puxa a alavanca e tem x% de summonar x monstro (a ideia é do RadBR: http://i.imgur.com/pp1l0Vz.gif). OBS.: Coloque uniqueid 4597 na alavanca. actions.xml TFS 0.4/0.3.6: TFS 1.2/1.1: actions/scripts/maquina.lua TFS 0.4/0.3.6: TFS 1.2/1.1:
  2. Olá galera do TK, de boa na lagoa? este é meu segundo Tópico, e hoje venho trazer uma script que não é de minha autoria.. Pois bem.. é um script de (command) ​para os players comprarem addons com o comando !addon Autoria do script= **** ( Não estava informando o autor do script) é um script muito simples.. vamos lá vá em data\talkactions\talkactions.xml e adicione a seguinte tag: feche e salve apos ter feito isso vá em data\talkactions\script Copie e cole algum arquivo.lua ​e renomeia para addons.lua e dentro adicione o seguinte: traduzindo: vermelho: Id do item que sera removido no caso (crystal coin) azul: quantidade que sera removida , exemplo: 90, então sera 90 crystal coin Meu primeiro script aqui no TK vlw , tomara que tenha ajudado alguem.. Qualquer duvida comenta, E se eu ajudei Da REP+ AIII !!
  3. Instalando Crie um arquivo chamado ExpScroll.lua na pasta actions e coloque: local config = { funnyEffect = "YES", minimumLevel = 7, maximumLevel = 500, -- for infinite type math.huge } local addExp = { [{config.minimumLevel, 100}] = 2500000, [{100, 200}] = 15000000, [{200, 300}] = 22500000, [{300, 400}] = 30000000, [{400, 500}] = 100000000, [{500, 600}] = 20000000, [{600, 1000}] = 30000000, [{1000, 2000}] = 45000000, [{2000, 2500}] = 125000000, [{2500, 7500}] = 150000000, [{7500, 10000}] = 200000000, [{10000, 20000}] = 250000000, [{20000, config.maximumLevel}] = 300000000 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local level = player:getLevel() local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) if(level < config.minimumLevel) then player:sendCancelMessage("You need to be at least "..config.minimumLevel.." to use a scroll.") return false end if(level >= config.maximumLevel) then player:sendCancelMessage("Your level is too high for using a scroll.") return true end for k, v in pairs(addExp) do if level >= k[1] and level < k[2] then player:addExperience(v) player:sendTextMessage(22, "Experience Scroll Gave You " .. v .." experience!") item:remove(item.uid, 1) break end end if config.funnyEffect == "YES" then local playerexp = addExp local pos = player:getPosition() local positions = { {x=pos.x+1,y=pos.y-1,z=pos.z}, {x=pos.x-1,y=pos.y-1,z=pos.z}, {x=pos.x+1,y=pos.y+1,z=pos.z}, {x=pos.x-1,y=pos.y+1,z=pos.z}, {x=pos.x+1,y=pos.y,z=pos.z}, {x=pos.x-1,y=pos.y,z=pos.z}, {x=pos.x,y=pos.y+1,z=pos.z}, {x=pos.x,y=pos.y-1,z=pos.z} } for i = 1, table.getn(positions) do Position(i):sendMagicEffect(effect) end end end actions.xml <action itemid="1948" script="ExpScroll.lua" /> Créditos Yogiikke
  4. Em talkactions/scripts crie um arquivo changename.lua e dentro coloque: --Player rename by Mock the bear (MTB) function sugested() --GName generator local cons = {'b','c','d','f','g','h','i','j','k','l','m','n',' p','q','r','s','t','v','x','y','z'} local vog = {"a",'e','i','o','u'} local sibalas = {} for i=1,#cons do for e=1,#vog do table.insert(sibalas,1,cons[i]..vog[e]) end end local total = "" for i=1,math.random(1,2) do local nam = "" for i=1,math.random(2,4) do nam = nam..sibalas[math.random(1,#sibalas)] end if math.random(1,2) == 1 then nam = nam..vog[math.random(1,#vog)] elseif math.random(1,2) == 2 then nam = nam..cons[math.random(1,#vog)] end total = total..(i == 2 and ' ' or '')..nam:sub(1,1):upper()..nam:sub(2,-1) end return total end function onSay(cid, words, param, channel) if param == 'gen' then doCreatureSay(cid,'Suggested name: '..sugested(),1) return true end local param1,param2 = param:match('(.-)[;:,.]%s*(.+)') param = param1 or param param2 = param2 or sugested() if not param then doPlayerSendTextMessage(cid,25,'Use like this: /rename Old name, New name') return true end if param2:len() <= 2 or param2:len() > 20 then doPlayerSendTextMessage(cid,25,'Please 3-20 characters.') return true end if param2:match('[%a%d%s%u%l]+') ~= param2 then doPlayerSendTextMessage(cid,25,'Please only A-Z 0-9') return true end param2 = param2:sub(1,1):upper()..param2:sub(2,-1) local p2 = getPlayerByName(param) if p2 and isPlayer(p2) then local id = getPlayerGUID(p2) doPlayerPopupFYI(p2,'Changing your name. Please login again on your character list.') addEvent(doRemoveCreature,2000,p2) addEvent(function(id,param2) db.executeQuery("UPDATE `players` SET `name` = '"..param2.."' WHERE `id` ="..id) end,2100,id,param2) else doPlayerSendTextMessage(cid,25,'Player '..param..' not found.') return true end return TRUE end Em talkactions/talkactions.xml adicione: <talkaction log="yes" words="/name" access="5" event="script" value="changename.lua"/> Créditos: Mock The Bear
  5. Um comando para GOD, que permiti trocar o seu looktype, para o de um monstro ou de um player em questão. /looktype id /looktype monstername /looktype id, playername /looktype monstername, playername Exemplo: /looktype 262 /looktype Silver Rabbit /looktype 262, Limos /looktype Silver Rabbit, Limos looktype.lua function onSay(cid, words, param) local player = Player(cid) if not player:getGroup():getAccess() then return true end local t = param:split(",") local lookType = tonumber(t[1]) if not lookType then lookType = MonsterType(t[1]) and MonsterType(t[1]):getOutfit().lookType if not lookType then player:sendCancelMessage("A monster with that name does not exist.") return false end end if t[2] then playerx, player = player, Player(t[2]:gsub("^%s*(.-)%s*$", "%1")) if not player then playerx:sendCancelMessage("A player with that name does not exist or is not online.") return false end end if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then local playerOutfit = player:getOutfit() playerOutfit.lookType = lookType player:setOutfit(playerOutfit) else player = playerx or player player:sendCancelMessage("A look type with that id does not exist.") end return false end Créditos : Flavio S.
  6. function onSay(cid, words, param, channel) local letter_id = 2597 local config = { only_one = false, -- pode usar só uma vez, false se puder mais de uma, é uma defesa contra spam. one_per_time = false, -- caso only_one seja falso, você pode configurar aqui se terá exhaust, true para sim, false para não. time = 10, -- tempo em minutos para esperar. exhaust_error = "Você precisa esperar ".. math.ceil((getPlayerStorageValue(cid, "letter") - os.time())/3600) .." horas para usar o comando novamente.", msg_error = "Você só pode usar uma vez!", -- caso only_one seja true. msg_inside = "O que você acha\n do nosso sistema de double XP? \n\n use !sugest send para enviar\n~~==============~~\n Resposta: ", -- messagem dentro da carta. msg_sent = "Obrigado por opinar! , caso a opinião seja séria, você será recompensado.", letter_desc = "Opinião do player: ".. getCreatureName(cid) .." enviada às: " .. os.date("%d %B %Y %X") .. ".", letter_request = getCreatureName(cid) .. " escreva sua opinião e use !sugest send , para envia-la", letter_count_msg = "Você precisa ter 1 ".. getItemNameById(letter_id) .." no seu inventário para enviar a sugestão.", houseGod_position = {x = 91, y = 121, z = 7}, -- para onde enviará a carta } if config.only_one then if getPlayerStorageValue(cid, "letter") ~= -1 then return doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, config.msg_error) and false end end if not config.only_one and config.one_per_time and param ~= "send" then if getPlayerStorageValue(cid, "letter") - os.time() > 0 then doPlayerSendTextMessage(cid,26, config.exhaust_error) doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return true else setPlayerStorageValue(cid, "letter", os.time() + (60*config.time)) end end if param == "send" then if getPlayerItemCount(cid, letter_id) ~= 1 then return doPlayerSendTextMessage(cid,21, config.letter_count_msg) and false end if getItemAttribute(tonumber( getPlayerGUID(cid) + 1000), "text") == config.msg_inside then doPlayerSendTextMessage(cid,26, "Por favor, escreva algo.") -- caso tente enviar carta sem escrever. doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) return false end doSendMagicEffect(getThingPos(cid), CONST_ME_FIREWORK_BLUE) doPlayerSendTextMessage(cid, 21, config.msg_sent) local player_opinion = getItemAttribute(tonumber( getPlayerGUID(cid) + 1000), "text") local letter = doCreateItem( letter_id, 1, config.houseGod_position) doItemSetAttribute(letter, "text", player_opinion) doItemSetAttribute(letter, "description", config.letter_desc) doPlayerRemoveItem(cid, letter_id, 1) return true end setPlayerStorageValue(cid, "letter", getPlayerStorageValue(cid, "letter") + 1) local letter = doPlayerAddItem(cid, letter_id) doItemSetAttribute(letter, "text", config.msg_inside) doItemSetAttribute(letter, "uid", tonumber( getPlayerGUID(cid) + 1000)) doPlayerSendTextMessage(cid,21,config.letter_request ) return true end <talkaction words="/sugest;!sugest" event="script" value="arquivo.lua"/> Fiz o tópico na pressa, ainda está em versão beta, porém, vai melhorar assim que eu tiver um Pc para editar melhor. Possíveis erros: se tiver mais de uma carta do comando, ele talvez bugue. (Coisa que eu vou consertar)
  7. [Comando testado em TFS 0.4] Fala ai pessoal, estou trazendo hoje um comando pra vocês alterarem a storage do player sem precisar acessar a database. Esse comando já vem em algumas bases, mas percebi que algumas não tem e resolvi trazer pra vocês, vamos lá. Vá em "Data/talkactions/scripts" copie e cole um arquivo.lua e renomeie para storage.lua, apague tudo e cole isso: function onSay(cid, words, param) local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local tid = getPlayerByNameWildcard(t[1]) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end if(not t[3]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, " [" .. t[1] .. " - " .. t[2] .. "] = " .. getPlayerStorageValue(tid, t[2])) else setPlayerStorageValue(tid, t[2], t[3]) end return true end Agora em "Data/talkactions" abra o arquivo talkactions.xml e adicione a TAG: <talkaction log="yes" words="/storage" access="4" event="script" value="storage.lua"/> Você pode configurar os groups que poderão usar o comando em acess="4", na tag está definido para GM + usar, caso queira apenas GOD coloque 6. Comando: /storage Wakon, 25005, 1 Em vermelho é o nome do personagem. Em verde é a storage que será alterada. Em roxo é o valor que a storage terá. É isso, qual quer dúvida ou erro é só comentar.
  8. !exp: !mana: talkactions.xml <talkaction words="!exp" script="expmana.lua"/> <talkaction words="!mana" script="expmana.lua"/> expmana.lua function onSay(player, words, param) local p = player local s = function(p, lv) local k = Game.getExperienceStage(lv) local st = p:getStamina() if st > 2400 then return k*1.5 .. " (stamina bonus)" elseif st < 1 then return 0 .. " (out of stamina)" elseif st < 841 then return k*0.5 .. " (stamina penalty)" else return k end end if words == "!exp" then local lv = p:getLevel() p:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You need " .. ((50 * lv^3) - (150 * lv^2) + (400 * lv)) / 3 - p:getExperience() .. " experience more, for " .. lv+1 .. " level.") p:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Current rate: x" .. s(p, lv)) return false end p:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have to spend " .. math.ceil((p:getVocation():getRequiredManaSpent(p:getBaseMagicLevel() + 1) - p:getManaSpent()) / configManager.getNumber(configKeys.RATE_MAGIC)) .. " mana more, for next magic level.") return false end Créditos : zbisu.
  9. E aí galera do TK, Hoje vim trazer um script idiota simples e que é util para os tutores do meu servidor, onde eles utilizam um comando e anuncia a seguinte mensagem: 00:13 O Tutor Keilost está no Help Channel respondendo duvidas. Ele tem uma limitação de 15 minutos para usar novamente, ah e fiz uma funçãozinha que ele identifica qual group é do player, caso um GM queria usar, CM, whatever... Vamos ao código: Em talkactions/talkactions.xml coloque a seguinte tag: <talkaction log="yes" words="/anunciar" access="2" event="script" script="staffbroad.lua"/> Agora em talkactions/scripts crie um arquivo lua chamado staffbroad e coloque o seguinte conteudo: function getNameGroup(group) local groups = {"Player", "Tutor", "Senior Tutor", "Gamemaster", "Community Manager", "Administrador"} return groups[group] end function onSay(cid, words, param, channel) local gbb = 82389239 if getPlayerStorageValue(cid, gbb) - os.time() > 0 then doPlayerSendTextMessage(cid, 27, "O comando só pode ser executado de 15 em 15 minutos.") return true end doBroadcastMessage("O "..getNameGroup(getPlayerGroupId(cid)).." "..getPlayerName(cid).." está no Help Channel respondendo duvidas.") setPlayerStorageValue(cid, gbb, os.time() + 15 * 60) return true end Bom é isso, qualquer duvida podem perguntar aqui Créditos Keilost(eu)
  10. Seguinte, brothers.. Intro Essa talkaction serve para auxiliar aquele player com uma memória ruim ou que possa ter passado um longo tempo inativo, mostrando a localização da house dele no minimap. Situações !myhome Para que isso aconteça, é óbvio que o player precisa possuir uma house. Caso contrário, ele será informado desta forma: Se ele estiver a mais que 50 sqms (alterável) de distância de sua house, o player será informado sobre o nome da city onde ela se localiza: Assim que ele estiver mais próximo de sua house (já na city) e usar o comando novamente, uma marcação () descrita como "Home Sweet Home" ("Lar Doce Lar") será feita no minimap, indicando a localização da entrada dela: Script Enfim, vamos ao que interessa.. myhome.lua (data\talkactions\scripts) ENG (mensagens/legenda em inglês americano): local sqms = 50 -- minimum distance to the marking on the minimap function onSay(cid) -- Developed by Wise ~ TibiaKing.com local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if not house then return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, 'You don\'t own a home.') elseif getDistanceBetween(getCreaturePosition(cid), getHouseEntry(house)) > sqms then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are too far from your home. It is located in '..getTownName(getHouseTown(house))..', go there and use the command again.') else return doPlayerAddMapMark(cid, getHouseEntry(house), MAPMARK_CROSS, 'Home Sweet Home') and doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'The location of your home was marked on the minimap as a red X.') end end PT-BR (mensagens/legenda em português brasileiro): local sqms = 50 -- distância mínima para a marcação no mini-mapa function onSay(cid) -- Desenvolvido por Wise ~ TibiaKing.com local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if not house then return doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) and doPlayerSendCancel(cid, 'Você não possui uma casa.') elseif getDistanceBetween(getCreaturePosition(cid), getHouseEntry(house)) > sqms then return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Você está muito longe de sua casa. Ela se localiza em '..getTownName(getHouseTown(house))..', vá até lá e use o comando novamente.') else return doPlayerAddMapMark(cid, getHouseEntry(house), MAPMARK_CROSS, 'Lar Doce Lar') and doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'A localização da sua casa foi marcada no mini-mapa como um X vermelho.') end end talkactions.xml (data\talkactions) <talkaction words="!myhome" event="script" value="myhome.lua"/> Agradecimentos especiais ao @p e o p l e, por testar a talkaction e fornecer as imagens para o tópico.
  11. Screenshot Descrição Lembra quando apenas o leader e vice-leader da guild poderiam usar o comando !go e logo mudava o outfit de todos? Pois então. Instalando Crie um arquivo chamado guild_outfit.lua na pasta talkactions e coloque: function string.diff(self) local format = { {'day', self / 60 / 60 / 24}, {'hour', self / 60 / 60 % 24}, {'minute', self / 60 % 60}, {'second', self % 60} } local out = {} for k, t in ipairs(format) do local v = math.floor(t[2]) if(v > 0) then table.insert(out, (k < #format and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or '')) end end local ret = table.concat(out) if ret:len() < 16 and ret:find('second') then local a, b = ret:find(' and ') ret = ret:sub(b+1) end return ret end local config = { exhaustion = 299551, -- exhaust storage duration = 5 -- CONTADO EM SEGUNDOS, POR EXEMPLO 5*60 PARA 5 MINUTOS. } function onSay(player, words, param, channel, creature) local playerGuild = player:getGuild() local creature = player if (os.time() - player:getStorageValue(config.exhaustion)) < config.duration then player:sendTextMessage(MESSAGE_INFO_DESCR,"You have to wait ' .. string.diff(player:getStorageValue(config.exhaustion)-os.time()) .. ' before using this command again.") return false end if(not playerGuild or playerGuild:getId() == 0) then player:sendTextMessage(MESSAGE_INFO_DESCR,"Sorry, you're not in a guild.") return false end if player:getGuildLevel() < 2 then -- 3 = Leader, 2 = Vice-Leader, 1 = Regular Member player:sendTextMessage(MESSAGE_INFO_DESCR,"You have to be Leader or Vice-Leader of your guild to change outfits!") return false end local outfit = creature:getOutfit() local count = 0 local message = "*Guild* Your outfit has been changed by leader. (" ..player:getName() .. ")" for _, members in ipairs(Game.getPlayers()) do if(members:getGuild() == playerGuild and player ~= members) then local newOutfit = outfit if(not members:hasOutfit(outfit.lookType, outfit.lookAddons)) then local tmpOutfit = members:getOutfit() newOutfit.lookAddons = 0 --tmpOutfit.lookAddons if(not members:hasOutfit(outfit.lookType, 0)) then newOutfit.lookType = tmpOutfit.lookType end end members:getPosition():sendMagicEffect(66) members:setOutfit(newOutfit) members:sendTextMessage(MESSAGE_INFO_DESCR, message) count = count + 1 end end player:sendTextMessage(MESSAGE_INFO_DESCR,"Guild members outfit has been changed. (Total: " .. count .. ")") player:setStorageValue(config.exhaustion, os.time() + config.duration) return false end talkactions.xml <talkaction words="!go" event="script" value="guild_outfit.lua"/> Créditos Slawkens, narko.
  12. Olá pessoal, eu estou devendo conteúdos, essa não é minha melhor ideia, mas eu acho que é boa, pelo menos o propósito... Testado em: TFS 0.4 Em breve disponibilizarei para 1.+ -O que seria esse comando? Simplesmente, é uma broadcast ,que ao você editar pelo jogo, seja exibida automaticamente a última edição. ela não pode ser editada por script, ou pode, mas você tirará totalmente o propósito dela, que é facilitar a edição sem abrir arquivos além do seu tibia... Ao executar a talkaction: Comando sendo executado: Para deletar a mensagem: TALKACTION (COMANDO): Primeiramente, Crie dentro do arquivo: (data/talkactions/scripts/broadcastsave.lua) function onSay(cid, words, param) local stor = "pos_broad" if tostring(param) == "delete" then return doPlayerSendTextMessage(cid, 27, "Mensagem: [ "..getGlobalStorageValue(stor).." ] deletada") and setGlobalStorageValue(stor, -1) end setGlobalStorageValue(stor, tostring(param)) doPlayerSendTextMessage(cid, 27, "Voce definiu a broadcast como: [ "..param.." ]") return true end <TAG/> Talkactions.xml <talkaction words="/setbroadcast" acess="5" event="script" value="broadcastsave.lua"/> Salve-os e feche. GLOBALEVENTS: Agora coloque em: (data/globalevents/scripts/reloadbroadcast.lua) function onThink(interval) local stor = getGlobalStorageValue("pos_broad") if type(stor) == "string" or stor ~= -1 then return broadcastMessage(stor) and true end return print("BroadCast Pos-definida ainda nao foi definida ou foi deletada, \n use o comando /broadcastset (mensagem) , para defini-la") and true end <TAG/> Globalevents.xml <globalevent name="reloadbroad" interval="10000" event="script" value="reloadbroadcast.lua"/> os 10000 acima é 10 segundos, tempo que usei para testar o script, então, por favor, mude de acordo com o seu gosto... 1000 é 1 segundo, então abra a calculadora e faça os cálculos para o tempo que quiser, não pode colocar certas operações no XML. Uma demonstração das possibilidades de mensagem e broadcast: Default: Serverlog: Advance: Ignorem a hora: 00:57 quaisquer erros, por favor, reportar no tópico ou postar o link da dúvida. Obrigado desde já.
  13. Bom, eu estava cá fazendo uma talkaction para praticar, mas aí fui aprimorando e resolvi compartilhar, para ver se é útil para alguém... Como funciona: Bom, basicamente, é um comando sem parâmetros, que marca um lugar na zona de proteção e volta para esse lugar depois que usa o comando pela segunda vez, Em caso de local parceiro = true deixando um portal que some em aproximadamente 3 segundos, para que possam seguir ele... Caso não queira isso, coloque false. Ao usar o comando para fixar o checkpoint: Ao usar o mesmo comando para voltar ao checkpoint no mesmo lugar: Escolhendo uma nova posição: Usando o comando na nova posição: Bom, o script é esse: depois irei adicionar mais coisas (talkactions/scripts/checkpoint.lua) local parceiro = true -- false vai tirar o teleporte que o player deixa de rastro function onSay(cid, words, param) if param == "" then local cidpos = getThingPos(cid) if not getTileInfo(cidpos).protection then return doPlayerSendCancel(cid,"You need stay in a protect zone ( PZ ). ") end if(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then setPlayerStorageValue(cid,"Checkpoint", "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}") doPlayerSendTextMessage(cid, 27, "You put a checkpoint here.") doSendMagicEffect(cidpos, 9) else local str = "return "..getPlayerStorageValue(cid, "Checkpoint") local pos = loadstring(str)() doTeleportThing(cid, pos, TRUE) if "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}" == "{x = "..pos.x..", y = "..pos.y..", z = "..pos.z..", stackpos = "..pos.stackpos.."}" then return doPlayerSendCancel(cid,"You can't do this, please choose another position to come back") and doSendMagicEffect(cidpos, 2) end if parceiro then doCreateTeleport(1387, pos, cidpos) doSendAnimatedText(cidpos, "Removing", 221) local t = { [500] = "in", [1000] = "3", [1500] = "2", [2000] = "1", } for q, w in pairs(t) do addEvent(doSendAnimatedText,q,cidpos, w, 221) end addEvent(function() doRemoveItem(getTileItemById(cidpos, 1387).uid) doSendMagicEffect(cidpos, 2) end,2700) end doCreatureSay(cid, "You reached your destiny.", MESSAGE_EVENT_ORANGE) doPlayerSendTextMessage(cid, 27, "You reached your destiny.") setPlayerStorageValue(cid,"Checkpoint", 0) doSendMagicEffect(cidpos, 67) end end return true end Em (talkactions.xml) <talkaction log="yes" words="/checkpoint" event="script" value="Xcriptis/checkpoint.lua"/> CASO QUEIRAM COM EXHAUST EM SEGUNDOS, CONFIGURÁVEL !!!, AQUI ESTÁ: local parceiro = true -- false vai tirar o teleporte que o player deixa de rastro local tempo = 24*60*60 -- 24 h em segundos function onSay(cid, words, param) if param == "" then local cidpos = getThingPos(cid) if not getTileInfo(cidpos).protection then return doPlayerSendCancel(cid,"You need stay in a protect zone ( PZ ). ") end if(tonumber(getPlayerStorageValue(cid,"Checkpoint"))) then setPlayerStorageValue(cid,"Checkpoint", "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}") doPlayerSendTextMessage(cid, 27, "You put a checkpoint here.") doSendMagicEffect(cidpos, 9) else local str = "return "..getPlayerStorageValue(cid, "Checkpoint") local pos = loadstring(str)() if not (tonumber(getPlayerStorageValue(cid,"Checkpoint"))) and getCreatureStorage(cid, 10001) - os.time() < 0 then setPlayerStorageValue(cid,10001, os.time() + tempo) else return doPlayerSendCancel(cid,"You can't do this, please wait " .. getCreatureStorage(cid, 10001) - os.time() .." seconds.") end doTeleportThing(cid, pos, TRUE) if "{x = "..cidpos.x..", y = "..cidpos.y..", z = "..cidpos.z..", stackpos = "..cidpos.stackpos.."}" == "{x = "..pos.x..", y = "..pos.y..", z = "..pos.z..", stackpos = "..pos.stackpos.."}" then return doPlayerSendCancel(cid,"You can't do this, please choose another position to come back") and doSendMagicEffect(cidpos, 2) end if parceiro then doCreateTeleport(1387, pos, cidpos) doSendAnimatedText(cidpos, "Removing", 221) local t = { [500] = "in", [1000] = "3", [1500] = "2", [2000] = "1", } for q, w in pairs(t) do addEvent(doSendAnimatedText,q,cidpos, w, 221) end addEvent(function() doRemoveItem(getTileItemById(cidpos, 1387).uid) doSendMagicEffect(cidpos, 2) end,2700) end doCreatureSay(cid, "You reached your destiny.", MESSAGE_EVENT_ORANGE) doPlayerSendTextMessage(cid, 27, "You reached your destiny.") setPlayerStorageValue(cid,"Checkpoint", 0) doSendMagicEffect(cidpos, 67) end end return true end Qualquer problema, resolver no tópico. por favor, gostaria de feedbacks com sugestões ou qualquer coisa.
  14. Video Demonstração https://www.youtube.com/watch?v=U26l7CZtwGk Instalando Crie um arquivo chamado rob.lua na pasta actions e coloque: local money = {} local player = {} local position = {} local config = { corpseId = 3058, -- Item Id timee = 6000 -- Seconds } local function allowMovement(cid) if not isPlayer(cid) then return end doCreatureSetNoMove(cid, false) end local function stealMoney(cid) position = getDistanceBetween(getPlayerPosition(player), getPlayerPosition(cid)) if position < 2 then doPlayerRemoveMoney(cid, money) doPlayerAddMoney(player, money) doPlayerSendTextMessage(player,MESSAGE_INFO_DESCR,"Você roubou "..money.." gold!") doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'VOCÊ ACABA DE SER ROUBADO!') else doPlayerSendTextMessage(player,MESSAGE_INFO_DESCR,"Roubo cancelado.") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then doSetItemOutfit(itemEx.uid, config.corpseId, config.timee) doCreatureSetNoMove(itemEx.uid, true) addEvent(allowMovement, config.timee, itemEx.uid) money = getPlayerMoney(itemEx.uid) player = cid doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Roubando...') doPlayerSendTextMessage(itemEx.uid,MESSAGE_INFO_DESCR,'Você foi nocauteado!') addEvent(stealMoney, config.timee-3000, itemEx.uid) end return true end actions.xml <action itemid="2411" event="script" value="rob.lua"/> Créditos CandleJack
  15. Instalando Crie um arquivo chamado staminaDoll.lua na pasta actions e coloque: function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) local s = player:getStamina() / 60 local cfg = {} cfg.refuel = 42 ------ item will refill stamina to 42 hours cfg.full = 40 -------- when you have 40 h or more stamina item will send cancel message if s >= cfg.full then player:sendCancelMessage("Your stamina is already full.") player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina now is "..s.." h.") else player:setStamina(cfg.refuel*60) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.") item:remove(1) end return true end actions.xml <action itemid="7377" script="staminaDoll.lua" /> Créditos Shadow Dan
  16. Descrição Em 0.x há o comando !q, porém, esse script que trago à vocês, mostra diferente a quantidade de money. Em vez de aparecer assim; You have 100000000 gold. Aparecerá dessa forma: You have 1 KK Instalando Vá em money.lua na pasta talkactions e substitua tudo por: function onSay(cid, words, param, channel) local money = getPlayerMoney(cid) local kk = 100000000 local hd = 10000000 if (money > 0 and money < 1000) then money = money.." gp." elseif (money >= 1000 and money < hd) then money = money / 1000 .." K." elseif (money >= hd and money < kk) then money = money / 100000 .." K." elseif (money >= kk) then money = money / kk .. " KK." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. money ) return true end Créditos Joe Rod
  17. 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 Ajudei? serviu para você? de um rep ae não arranca um pedaço e mostra que esta valendo a pena trazer conteúdo para cá
  18. Em data/talkactions/scripts crie um arquivo muteplayer.lua e coloque dentro: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, 21, "Digite o comando correto.") return true end local t = string.explode(param, ",") player = getPlayerByName(t[1]) local condition = createConditionObject(CONDITION_MUTED) if(not t[2] or t[2] == '') then doPlayerSendTextMessage(cid, 21, "Digite o comando correto.") end if t[2] then time = tonumber(t[2]*60000) -- 10*1000 is 10 seconds. if(isPlayer(player) == TRUE and getPlayerGroupId(cid) > getPlayerGroupId(player) and getPlayerFlagValue(player, PLAYERFLAG_CANNOTBEMUTED) == false) then setConditionParam(condition, CONDITION_PARAM_TICKS, time) setConditionParam(condition, CONDITION_PARAM_SUBID, 4) doAddCondition(player, condition) doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "Voce foi silenciado no Help-Channel por " .. getPlayerName(cid) .. " por " .. t[2] .. " minuto(s).") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(player) .. " foi silenciado no Help-Channel por " .. t[2] .. " minuto(s).") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador " .. t[1] .. " não existe ou não está online.") end end return true end Salve e vá em talkactions/talkactions.xml e adicione: <talkaction log="yes" words="/mute;/desmute" access="1" event="script" value="muteplayer.lua"/> Salve e de /reload talkactions! Pronto é só usar o /mute, nome, minutos
  19. É um script bem simples, mas talvez ajude alguém. Testei no TFS 1.1! Imagem Script 1. Em creaturescripts/scripts crie um arquivo chamado fly.lua e adicione isso nele: function onModalWindow(player, modalWindowId, buttonId, choiceId) if(modalWindowId ~= 4597 or buttonId == 2) then return false end if(not getTileInfo(player:getPosition()).protection) then player:sendTextMessage(MESSAGE_STATUS_SMALL, "You can only fly in protection zone.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return false end local positions = { [1] = {x = 95, y = 117, z = 7}, -- Trekolt [2] = {x = 159, y = 387, z = 6} -- Rhyves } player:teleportTo(positions[choiceId]) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end 2. No arquivo creaturescripts/scripts/login.lua adicione isso antes do último return true: player:registerEvent("fly") 3. No Arquivo creaturescripts/creaturescripts.xml adicione isso antes de </creaturescripts>: <event type="modalwindow" name="fly" script="fly.lua"/> 4. Em talkactions/scripts crie um arquivo chamado fly.lua e adicione isso nele: function onSay(player, words, param) local places, options = {"Rhyves", "Trekolt"}, -- places {"Fly", "Cancel"} -- options local modalWindow = ModalWindow(4597, "List of places", "Select your destiny:") for w = 1, #places do modalWindow:addChoice(w, places[w]) end -- Select modalWindow:addButton(1, options[1]) modalWindow:setDefaultEnterButton(1) -- Cancel modalWindow:addButton(2, options[2]) modalWindow:setDefaultEscapeButton(2) -- Send window modalWindow:sendToPlayer(player) return false end 5. No arquivo talkactions/talkactions.xml adicione isso antes de </talkactions>: <talkaction words="!fly" script="fly.lua"/>
  20. Como o título do tópico já diz, o script a seguir serve como uma ferramenta para auxiliar o player a fazer uma busca por outro player. A partir de uma letra, é gerada uma lista dos players online cujo o nome começa com a inicial escolhida. searchplayers.lua (data\talkactions\scripts): function onSay(cid, words, param) -- Developed by Wise ~ TibiaKing.com local pnames, list = {}, '' for _, pid in ipairs(getPlayersOnline()) do table.insert(pnames, getCreatureName(pid)) end if not tostring(param) or param:len() > 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Type the first letter of the name of online players you want to view on the list.\nEx: !searchplayers K') end for _, n in pairs(pnames) do if n:sub(1, 1):lower() == param:lower() then if list ~= '' then list = list..', '..n else list = n end end end return list ~= '' and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Players whose first name begins with '..param..': '..list) or doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'There are no players whose first name begins with '..param) end talkactions.xml (data\talkactions): <talkaction words="!searchplayers" event="script" value="searchplayers.lua"/> Uso da talkaction: !searchplayers letra ~ !searchplayers k > Players whose first name begins with k: Kharsek, Krohm, Kawaka Espero que gostem (;
  21. Olá pessoal, hoje venho vos trazer um "sistema" que se resume em 1 script, nele você pode semear e de acordo com o tempo, cresce a planta! melhor explicar com imagens: No script já vêm pré-configurado para 2 tipos possíveis de semente/broto : - Id: 8582 - Id: 7732 para plantar é necessária uma base: O monte de terra no meio. Ao dar use em cima do monte, com a semente ou o galho, haverá estágios... 1º Estágio: (padrão) 2º / 3º / 4º / Para instalar, siga as instruções: Crie um arquivo, com o nome de seed.lua em (data/actions/scripts) function onUse(cid, item, toPos, itemEx, fromPos) -- Exemplo para criar: [ID da semente] = {etapa1, etapa2, ..., etapa1000}, local c = { trees = { [8582] = {2768, 2712, 2700}, [7732] = {2784, 2767, 2702}, [2401] = {2344, 4404, 2711}, }, ----------- need_aid = false, -- PRECISA DE ACTION_ID NA SEMENTE OU ITEMEX PARA PLANTAR ? ( NAO FUNCIONA COM A SEMENTE ) floor_aid = 20390, -- SE SIM, ESSE SERÁ O ACTION_ID textcant = "You can't plant here.", -- textcancel = "You canceled the plantation.", -- CANCELAMENTO DA ETAPA 1 target = getTileItemById(fromPos, 8167), ----------- grow_up_interval = 2, -- TEMPO EM SEGUNDOS ENTRE OS CRESCIMENTOS } if not(item.actionid == c.floor_aid or itemEx.actionid == c.floor_aid) and c.need_aid then return doPlayerSendCancel(cid, c.textcant) and doSendMagicEffect(fromPos, CONST_ME_POFF) end if item.itemid == 8166 then doTransformItem(getTileItemById(fromPos, 8166).uid, 8167) doPlayerSendCancel(cid, c.textcancel) doSendMagicEffect(fromPos, CONST_ME_INSECTS) stopEvent(gr) stopEvent(up) return true end if c.trees[item.itemid] and c.target.uid > 0 then doTransformItem(c.target.uid, 8166) doRemoveItem(item.uid, 1) gr = addEvent(function() doTransformItem(getTileItemById(fromPos,8166).uid, c.trees[item.itemid][1]) end, 1000*c.grow_up_interval) for w = 2, #c.trees[item.itemid] do up = addEvent(function() doTransformItem(getTileItemById(fromPos,c.trees[item.itemid][w-1]).uid, c.trees[item.itemid][w]) end, (1000 * (c.grow_up_interval * w) ) ) end else doPlayerSendCancel(cid, c.textcant) doSendMagicEffect(fromPos, CONST_ME_POFF) end return true end Em seguinda, adicione a <TAG/> em (data/actions/actions.xml) <action itemid="7732;8582;8166" event="script" value="seed.lua"/>
  22. Boa noite galera do TK, venho aqui compartilhar a minha idéia, muitos sofrem com as direções "west" e "east" e não sabem pra que lado ir ao usar a magia "exiva" ou qualquer outra questão de direção. Então fiz esse micro script e coloquei uma action no item compass (loot de pirates). Ao dar use no compass voce recebe a mensagem na tela mostrando pra que lado ficam as direções. Simples assim! No meu server o ID do compass é esse. Dentro de actions.xml adicione essa linha: <action itemid="11213" event="script" value="compass.lua"/> e dentro da pasta actions crie um arquivo "compass.lua e cole isso: -- created by Onix -- function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerSendTextMessage(cid,22," North West + East South") return TRUE end * Não mudem o espaço entre as palavras porque não vai dar o efeito correto na tela! Sei que é um script bem simples mas muito útil. E não atrapalha em nada o item, da pra vender como loot normalmente. Então usem sem moderação!
  23. Os items para receber o addon é configurável. talkactions.XML <talkaction words="!buyaddon" separator=" " script="buyaddon.lua"/> buyaddon.lua local text = '--Addon List--\n!buyaddon "citizen\n!buyaddon "hunter\n!buyaddon "mage\n!buyaddon "knight\n!buyaddon "summoner\n!buyaddon "warrior\n!buyaddon "barbarian\n!buyaddon "druid\n!buyaddon "wizard\n!buyaddon "oriental\n!buyaddon "pirate\n!buyaddon "assassin\n!buyaddon "beggar\n!buyaddon "beggar\n!buyaddon "shaman\n!buyaddon "norseman\n!buyaddon "nightmare\n!buyaddon "jester\n!buyaddon "brotherhood\n!buyaddon "warmaster\n--Addon List End--' function onSay(cid, words, param) local player = Player(cid) local cfg = { ["citizen"] = { outfit = { male = 128, female = 136, addon = 3, storage = 10031 }, items = { {5878,100} } }, ["hunter"] = { outfit = { male = 129, female = 137, addon = 3, storage = 10032 }, items = { {5876, 100},{5948, 100} } }, ["mage"] = { outfit = { male = 130, female = 138, addon = 3, storage = 10033 }, items = { {2160,10} } }, ["knight"] = { outfit = { male = 131, female = 139, addon = 3, storage = 10034 }, items = { {5880,100},{5893, 100} } }, ["summoner"] = { outfit = { male = 133, female = 141, addon = 3, storage = 10035 }, items = { {2160,10} } }, ["warrior"] = { outfit = { male = 134, female = 142, addon = 3, storage = 10036 }, items = { {5925, 100},{5899, 100},{5919, 1},{5880, 100} } }, ["barbarian"] = { outfit = { male = 147, female = 143, addon = 3, storage = 10037 }, items = { {5911, 50},{5910, 50},{5879, 100} } }, ["druid"] = { outfit = { male = 148, female = 144, addon = 3, storage = 10038 }, items = { {5896, 50},{5897, 50} } }, ["wizard"] = { outfit = { male = 149, female = 145, addon = 3, storage = 10039 }, items = { {2536, 1},{2492, 1},{2488, 1},{2123, 1},{5922, 50} } }, ["oriental"] = { outfit = { male = 150, female = 146, addon = 3, storage = 10040 }, items = { {5883, 100},{5895, 100},{5912, 100} } }, ["pirate"] = { outfit = { male = 151, female = 155, addon = 3, storage = 10041 }, items = { {6098, 100},{6126, 100},{6097, 100} } }, ["assassin"] = { outfit = { male = 152, female = 156, addon = 3, storage = 10042 }, items = { {5898, 30},{5882, 10},{5881, 30},{5895, 20},{5905, 10} } }, ["beggar"] = { outfit = { male = 153, female = 157, addon = 3, storage = 10043 }, items = { {5878, 50},{2743, 30},{5913, 20},{5894, 10} } }, ["shaman"] = { outfit = { male = 154, female = 158, addon = 3, storage = 10044 }, items = { {3955,5},{5810, 5},{3966, 5},{3967, 5} } }, ["norseman"] = { outfit = { male = 251, female = 252, addon = 3, storage = 10045 }, items = { {7290,15} } }, ["nightmare"] = { outfit = { male = 268, female = 269, addon = 3, storage = 10046 }, items = { {6500,200} } }, ["jester"] = { outfit = { male = 273, female = 270, addon = 3, storage = 10047 }, items = { {2160, 25} } }, ["brotherhood"] = { outfit = { male = 278, female = 279, addon = 3, storage = 10048 }, items = { {6500,200} } } } local v, removeItems = cfg[param], 0, 0 if(param == "") then player:sendTextMessage(MESSAGE_INFO_DESCR, 'Please type !addon "outfit') player:showTextDialog( 5914, text) return false end if (v == nil) then player:sendTextMessage(MESSAGE_INFO_DESCR, "There is no such as outfit named "..param..", here is the list of available outfit.") player:showTextDialog(5914, text) return false end if(player:getStorageValue(v.outfit.storage) < 1) then for i = 1, #v.items do if(player:getItemCount(v.items[i][1]) >= v.items[i][2]) then removeItems = removeItems+1 end end if(removeItems == #v.items) then if(player:getSex(cid) == 1) then player:addOutfitAddon(v.outfit.male, v.outfit.addon) elseif(player:getSex(cid) == 0) then player:addOutfitAddon( v.outfit.female, v.outfit.addon) end for i = 1, #v.items do player:removeItem( v.items[i][1], v.items[i][2]) end player:sendTextMessage(MESSAGE_INFO_DESCR, "Enjoy your new addons to your "..param.." outfit!") player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW) player:setStorageValue( v.outfit.storage, 1) else for i = 1, #v.items do player:sendTextMessage(MESSAGE_INFO_DESCR, "Tu necesitas " .. v.items[i][2] .. "x " .. ItemType(v.items[i][1]):getName() .. " para obtener el "..param.." addon.") end end else player:sendTextMessage(MESSAGE_INFO_DESCR, "Usted ya obtuvo el "..param..".") end return false end Créditos : david.
  24. Olá pessoal! Vi o tutorial sobre addEvent do Killua e decidi colocar em prática.. Então fiz esse sistema de campaínha para treino e decidi compartilhar com vocês que tanto me ajudam com sistemas e dívidas! É um sistema bem simples e fácil de configurar, mesmo assim gostaria de criticas(construtivas) e sugestões uehue Numa noite sombria e fora do normal, Jubileu decide visitar seu amigo Alfredo para conversar sobre recentes acontecimentos estranhos na cidade. Ao chegar na casa de seu amigo ele toca a campaínha e.. Não pode ser, o que é aquilo que se aproxima?! um zumbi?! SOCORRO ALFREEEDOOO! - grita Jubileu,desesperado. AEHUEAHEAUH V2- TOCAR CAMPAÍNHA COM CHANCE DE APARECER MONSTRO/MENSAGEM/GANHAR ITEM V1- Tocar campaínha Aqui é a função do exaust.. (cid, 23000000) - cid é para o exaust se aplicar ao player que apertou a campaínha, e 23000000 é a storage que salva o exaust exhaustion.set(cid, 23000000, 4) cid e 23000000 identico ao de cima.. 4 é o tempo em segundos de exaust return doPlayerSendCancel(cid, "Campaínha já foi tocada, espere: " ..exhaustion.get(cid, 23000000). - se o player ainda estive com exaust, aparecerá a mensagem"Campaínha já foi tocada, espere: " e os segundos que falta para poder usar novamente Se checar a storage 23000000 que equivale a 4 segundos e ela estiver vazia, o sistema acontece e adiciona o tempo de 4 segundos na storage. Se a storage 23000000 não estiver vazia, aparece aquela mensagem para o player. ps: as três storages são 23000000, se mudar uma, mude as três! local time = 1 doSendMagicEffect(frompos,18) doSendAnimatedText(frompos,"Tindon",107) addEvent(doSendAnimatedText, time*1000, frompos,"Tindon", 107) É isso pessoal, meu primeiro script postado e é bem simples ueheu Se possível, indiquem-me algo para treinar pois tenho grande interesse na área de scripts! Um grande mega salve ao @Caronte, pq além da ajuda no script, ainda salvou esse meu lindo primeiro tópico uaehaeuh falar o que desse manin que mal conheço e já considero pakas? *aplausos Caronte, Salvando tópicos desde 1997
  25. Olá pessoal! Tinha um script de redbull aqui mas estava dando uns problemas, então refiz outro com ajuda do food.lua e do tutorial de addEvent do Killua, então como necessidade e como treino fiz e assim como meu treino da campaínha(link no final do tópico) eu decidi compartilhar com vcs para receber sugestões e quem sabe ajudar alguém (: O script é o seguinte: O player usa um item consumível(em meu caso, ID 2672) e então diminui sua fome e heala o player(aparece em quanto satisfez/healou), aumenta sua velocidade em X por Y tempo.. apelidei de redbull pq sacomé, redbull te dá asaas aehau 1°- Vá em data/actions e abra seu actions.xml, adicione essa linha antes do final do arquivo: <action itemid="2672" event="script" value="redbull.lua"/> ps: final do arquivo é o </actions> 2°- Vá em data/actions/scripts e crie um novo arquivo com a extensão lua chamado redbull.lua, cole o código dentro e salve: --REDBULL SYSTEM by: Gabriel Stocco-- local limite = 2500 -- Limite para o player ficar de estômago cheio(deixe igual seu food.lua encontrado em data/actions/scripts) local food = {[2672] = {120}} -- [ID] do item usável(igual na tag acrescentada no actions.xml) = {Quantia que vai satisfazer o player} local speedup = 550 -- Valor que aumentará a speed do player(se sua speed base for 300, ao usar o item ficará 850) local time = 4 -- Tempo que vai ficar com a velocidade alterada, após o tempo volta ao normal function onUse(cid, item, fromPosition, itemEx, toPosition) if exhaustion.check(cid, 23007) == false then exhaustion.set(cid, 23007, 10) else return doPlayerSendCancel(cid, "Beba outro em: " ..exhaustion.get(cid, 23007).."segundos.") end if(food[item.itemid] ~= nil) then if(getPlayerFood(cid) + food[item.itemid][1]) >= limite then doPlayerSendCancel(cid, "Você está cheio.") else doPlayerFeed(cid, food[item.itemid][1] /2.7) doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), 25) doSendAnimatedText(getCreaturePosition(cid), "REDBUUUULL", TEXTCOLOR_BLUE) doCreatureAddHealth(cid, 0+ food[item.itemid][1]) doChangeSpeed(cid, speedup) addEvent(doChangeSpeed, time*1000,cid, -speedup) end end end Pronto, sistema instalado! 3°- Configurando o script: local limite = 2500 -- Limite para o player ficar de estômago cheio(deixe igual seu food.lua encontrado em data/actions/scripts) local food = {[2672] = {120}} -- [ID] do item usável(igual na tag acrescentada no actions.xml) = {Quantia que vai satisfazer e healar o player} local speedup = 550 -- Valor que aumentará a speed do player(se sua speed base for 300, ao usar o item ficará 850) local time = 4 -- Tempo que vai ficar com a velocidade alterada, após o tempo volta ao normal doSendAnimatedText(getCreaturePosition(cid), "REDBUUUULL", TEXTCOLOR_BLUE) Entre aspas " ... " , pode mudar o texto que deseja aparecer ao usar o item, e em TEXTCOLOR_BLUE muda a cor do texto(pode usar de números entre 0 a 215) É isso pessoal, tudo explicadinho.. grato pela atenção e esperando sugestões! Desde já, agradeço ao @Caronte que irá avaliar (:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo