Ir para conteúdo

Emersonssss

Membro
  • Registro em

  • Última visita

Tudo que Emersonssss postou

  1. Galerinha eu Faço modificações Baseado no meu Ot, No meu serv existe limite de ML então seria injusto deixa liberado e já que iria fazer Limit de ML ja fiz Limit de todos os Skills. local MagicLimit = 0 -- Limite Que o Player pode Trainar Acima disso é blokiado. local Sword = 10 local Axe = 10 local Distance = 10 local Club = 10 function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 9562) then -- sword if getPlayerSkillLevel(cid, SKILL_SWORD) >= Sword then return doPlayerSendTextMessage(cid, 27, "Voce ja tem Skill Limit para Trainar.") end doCreatureSetStorage(cid, 62669, SKILL_SWORD) elseif(item.itemid == 9563) then -- axe if getPlayerSkillLevel(cid, SKILL_AXE) >= Axe then return doPlayerSendTextMessage(cid, 27, "Voce ja tem Skill Limit para Trainar.") end doCreatureSetStorage(cid, 62669, SKILL_AXE) elseif(item.itemid == 9564) then -- mlvl if getPlayerMagLevel(cid) >= MagicLimit then return doPlayerSendTextMessage(cid, 27, "Voce ja tem Skill Limit para Trainar.") end doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL) elseif(item.itemid == 9565) then -- club if getPlayerSkillLevel(cid, SKILL_CLUB) >= Club then return doPlayerSendTextMessage(cid, 27, "Voce ja tem Skill Limit para Trainar.") end doCreatureSetStorage(cid, 62669, SKILL_CLUB) elseif(item.itemid == 9566) then -- distannce if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= Distance then return doPlayerSendTextMessage(cid, 27, "Voce ja tem Skill Limit para Trainar.") end doCreatureSetStorage(cid, 62669, SKILL_DISTANCE) end if item.actionid == 1000 then doRemoveCreature(cid) end return true end Eu Testei e funcionou Qualquer Bug Deixe-me Saber 04:13 Voce ja tem Skill Limit para Trainar. Desculpa mais você a pessoa que posto mal conheçe o codigo como as pessoas vai tirar duvidas, estamos dicutindo sobre o codigo e modificando não entendo o motivo de não pode postar.
  2. o rate esta na libs, só olha que mostra la sword = 100 ae vc balanceia la Acredito eu q 100 seria como se fosse o player tive-se online treinando mesmo -- config, in percent of normal training with 2 trainers and player vocation mana regeneration [by food] OfflineTraining_rates = { [SKILL_CLUB] = 100, [SKILL_SWORD] = 100, [SKILL_AXE] = 100, [SKILL_DISTANCE] = 100, [SKILL_SHIELD] = 100, [SKILL__MAGLEVEL] = 100 } se o player coloca pra treina 12hr direto ele só vai poder treina depois de 12hr
  3. Melhorando o Script function onKill(cid, target, lastHit) local morreu = {"VixiMorri", "OwNeD!", "TaEditado", "QeSoninho", "Af Travei", "Laaag", "Gezuis"} -- 10 letras no max local mato = {"Proximo?", "Cade?", "Sem Dedo", "Eu Manjo", "Esse éMeu", "Parei KKK", "Jogo D+"} quemmato = mato[math.random(1, #mato)] quemmorreu = morreu[math.random(1, #morreu)] if isCreature(cid) == TRUE and isCreature(target) == TRUE then doSendAnimatedText(getCreaturePosition(target), ""..quemmorreu.."", 210) doSendAnimatedText(getCreaturePosition(cid), ""..quemmato.."", 210) end return true end em isCreature pode muda isPlayer ou isMonster use a imaginação esse script qualquer monstro ou player que você mata sai uma msg diferente, ae fica na imaginação de vcs
  4. Lembrando qualquer ideia para o Script, poste para que adaptemos.
  5. Mais tem que ser na pasta Actions/script <action itemid="8834" event="script" value="VOCE ESCOLHE ONDE COLOCAR/offlinetraining.lua"/>
  6. ou teria que ficar assim? Quando eu copiei e colei, o emoticon transformou em um : ( no script. Galera Por Favor né function OfflineTraining_onStartTraining(cid) -- maybe someone will need -- to save your time, this: doPlayerPopupFYI(cid, "You started offline training.") -- NOT WORK end Isso é um comentario remova -- maybe someone will need -- to save your time, this: doPlayerPopupFYI(cid, "You started offline training.") -- NOT WORK function OfflineTraining_onStartTraining(cid) end
  7. em Actions: function onUse(cid, item, fromPosition, itemEx, toPosition) if not isPremium(cid) then return doPlayerSendCancel(cid, "Only Premium Account.") end if(item.itemid == 1444) then -- sword doCreatureSetStorage(cid, 62669, SKILL_SWORD) elseif(item.itemid == 10349) then -- axe doCreatureSetStorage(cid, 62669, SKILL_AXE) elseif(item.itemid == 8834) then -- mlvl doCreatureSetStorage(cid, 62669, SKILL__MAGLEVEL) elseif(item.itemid == 8626) then -- club doCreatureSetStorage(cid, 62669, SKILL_CLUB) elseif(item.itemid == 10353) then -- distannce doCreatureSetStorage(cid, 62669, SKILL_DISTANCE) end if item.actionid == 1000 then doRemoveCreature(cid) end return true end
  8. Como eu tinha Dito minha primeira modificação foi no Login, apenas informativo. -- 0.4 - offline training - login.lua function onLogin(cid) OfflineTraining_initialize(cid) if(OfflineTraining_isTraining(cid)) then OfflineTraining_turnOffTraining(cid) -- we add skill/mlvl, we select lower value: time that player was offline OR offline training time [bar in game - 9.6] OfflineTraining_addTrainedSkills(cid, math.min(OfflineTraining_getTime(cid), OfflineTraining_getOfflineTime(cid))) -- we remove offline training time [bar in game - 9.6], -- if player was offline longer then his 'offline training time' it will add him time [like on RL tibia] -- got '3 hours offline training time', stay logged off for 8 hours, you get skills for 3 hours and on login you got '5 hours offline training time' OfflineTraining_setTime(cid, math.abs(OfflineTraining_getTime(cid) - OfflineTraining_getOfflineTime(cid))) OfflineTraining_onEndTraining(cid) local left = ((OfflineTraining_getTime(cid) / 60) * 60 * 60) left = {hour = math.floor(left/3600), minutes = math.ceil((left % 3600)/60)} doPlayerPopupFYI(cid, 'Voce ainda tem '.. left.hour ..'h and '..left.minutes..'min de Treinamento.') else -- offline training time also regenerate when you are offline, but NOT train local lefts = ((OfflineTraining_getTime(cid) / 60) * 60 * 60) OfflineTraining_setTime(cid, OfflineTraining_getTime(cid) + OfflineTraining_getOfflineTime(cid)) lefts = {hour = math.floor(lefts/3600), minutes = math.ceil((lefts % 3600)/60)} doPlayerPopupFYI(cid, 'Voce tem '.. lefts.hour ..'h and '..lefts.minutes..'min de Treinamento.') end return true end Quando o Player sai do Trainer Offline informa quanto tempo ele tem em horas e min para Treinar, e quando ele logar normal informa qtas hrs ele pode treinar. em Breve +
  9. Desculpa ae TIO AJUDÂO, como eu disse somente postar e os cara que se vira para mim não é muita coisa mais sem mais demora como eu disse vou estuda algumas funções que eu vi ser inuteis nesse codigo e modifica-las para qualquer um conseguir fazer variaveis com esse script e vou postar é claro que se o senhor me permitir, não perá esse codigo não é seu, não preciso pedir permisão ! Sobre fica agradecido eu fico sim, porem tenho esse sistema para 860 em 2 maneiras, por script igual o seu é pela source q é o do martin. e não tenho contato com nenhum dos 2 donos , para pedir permisão para postar em outro forum sendo q os 2 são da otland
  10. Isso que dá pega o codigo e posta sem nenhum suporte e não faz um tutorial beem explicado affeeee. Mesmo assim Obg, hj de manha vo estuda o script e verifica onde altera o Time e depois Adc no post algumas modificações que pretendo fazer como : EX: VIP regeneração do tempo é mais rapido VIP pode treinar mais tempo.
  11. Qual limite de hr que pode fica treinando offline ?
  12. não tem nenhuma modificação no db ?
  13. Esse Script é de Minha Autoria e Não Autorizo Publicação.....UAHUAHUAHUAHUAHUahuHAuHAuHAUHAUHUHuAHuHU SQN Suave Manin, pode publicar sim, Aprendi de graça e ensino de Graça, qualquer script meu é livre para Postar, Editar. otsbrasil.com/dbo
  14. Excelente Script, ja bolei varias coisas que vou fazer, missões de descobrir seha, porta de houses que precisa de senha para entrar em caso de hacked, rapaz meu rep infinito.
  15. meu skype é : emersonaaron me adc e nois bola uma ideia
  16. poderia ajudar um pouco mais a fazer esse sistema?
  17. Se possivel passa seu Gesior que eu faço a adaptação
  18. Em GlobalEvents crie um Arquivo chamado Check.lua local function CheckPlayer_Items() query = db.getResult("SELECT *, SUBSTRING( CONVERT( attributes USING latin1 ) FROM 22) AS 'serial' FROM player_items WHERE CONVERT( attributes USING latin1 ) LIKE '%description%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 22) having count(*) > 1") if (query:getID() == -1) then textquery = "\n Check Items : Nenhum item encontrado." print(textquery) return true end if (query:getID() ~= -1) then text = "\n[!] -> Deleting item player_items: [Player ID: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. " - Sid: "..(query:getDataInt("sid")).." - Pid: "..(query:getDataInt("pid")).." - Itemtype: "..(query:getDataInt("itemtype")).." - Serial: " .. query:getDataString("serial") .."" db.query("DELETE FROM `otservs`.`player_items` WHERE `player_items`.`player_id` =" .. (query:getDataInt("player_id")) .. " AND `player_items`.`sid` ="..(query:getDataInt("sid")).." AND `player_items`.`pid` ="..(query:getDataInt("pid"))..";") db.query("DELETE FROM `otservs`.`player_depotitems` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") db.query("DELETE FROM `otservs`.`tile_items` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") f = io.open("data/logs/AntiClone.txt", "a+") f:write("Player: "..text.." - " .. os.date("%d %B %Y - %X.", os.time()) .."\n\n----------------------------------------------------------\n") f:close() print(text) if (query:getID() == -1) then textplayer_items = "\n Check Items : Todos os Items Foram Removidos." print(textplayer_items) return true end CheckPlayer_Items() end return true end local function CheckPlayer_DepotItems() query = db.getResult("SELECT *, SUBSTRING( CONVERT( attributes USING latin1 ) FROM 22) AS 'serial' FROM player_depotitems WHERE CONVERT( attributes USING latin1 ) LIKE '%description%' GROUP BY SUBSTRING( CONVERT( attributes USING latin1 ) FROM 22) having count(*) > 1") if (query:getID() == -1) then textquery = "\n Check Items : Nenhum item encontrado." print(textquery) return true end if (query:getID() ~= -1) then text = "\n[!] -> Deleting item player_depotitems: [Player ID: " .. getPlayerNameByGUID(query:getDataInt("player_id")) .. " - Sid: "..(query:getDataInt("sid")).." - Pid: "..(query:getDataInt("pid")).." - Itemtype: "..(query:getDataInt("itemtype")).." - Serial: " .. query:getDataString("serial") .."" db.query("DELETE FROM `otservs`.`player_items` WHERE `player_items`.`player_id` =" .. (query:getDataInt("player_id")) .. " AND `player_items`.`sid` ="..(query:getDataInt("sid")).." AND `player_items`.`pid` ="..(query:getDataInt("pid"))..";") db.query("DELETE FROM `otservs`.`player_depotitems` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") db.query("DELETE FROM `otservs`.`tile_items` WHERE SUBSTRING(CONVERT(attributes USING latin1) FROM 22) = " .. db.escapeString(query:getDataString("serial")) .. ";") f = io.open("data/logs/AntiClone.txt", "a+") f:write("Player: "..text.." - " .. os.date("%d %B %Y - %X.", os.time()) .."\n\n----------------------------------------------------------\n") f:close() print(text) if (query:getID() == -1) then textplayer_items = "\n Check Items : Todos os Items Foram Removidos." print(textplayer_items) return true end CheckPlayer_DepotItems() end return true end function onStartup() CheckPlayer_Items() CheckPlayer_DepotItems() return true end em globalevents.xml Adicione <globalevent name="AntiClone" type="start" event="script" value="Check.lua"/> Para Adicionar a Opção de Verificar itens Clonados Adicione um Serial em todos os Itens Vips : em shop.lua Adicione ( Modern Acc ) function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(getPlayerNameByGUID(tonumber(result:getDataInt("player")))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local um_um = {1,2,3,4,5,6,7,8,9,0} um = um_um[math.random(1, #um_um)] local dois_dois = {1,2,3,4,5,6,7,8,9,0} dois = dois_dois[math.random(1, #dois_dois)] local tres_tres = {1,2,3,4,5,6,7,8,9,0} tres = tres_tres[math.random(1, #tres_tres)] local quatro_quatro = {1,2,3,4,5,6,7,8,9,0} quatro = quatro_quatro[math.random(1, #quatro_quatro)] local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doPlayerAddItem(cid, id, count, false) if received then doItemSetAttribute(received, "description", ''.. productn ..' by ' .. getCreatureName(cid) .. ' [ID:' .. um .. '' .. dois .. '' .. tres .. '' .. quatro .. '].') doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.query("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") f = io.open("data/logs/Shop.txt", "a+") f:write("Player : '".. productn .." by ".. getCreatureName(cid) .." [ID: ".. um .."".. dois .."".. tres .."".. quatro .."] Item : "..productn.." - "..getCreatureName(cid).."- " .. os.date("%d %B %Y - %X.", os.time()) .."\n----------------------------------------------------------\n") f:close() else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.query("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end Tag : <globalevent name="shop" interval="3000" event="script" value="shop.lua"/> Creditos : Emerson Henrique < DBO INFINITY> Comandos e Codigos Adaptados de varios sistemas Ajuda : Arthur Luna (Ajudou no limite de Caracteres) PS : Meu Shop salva na db. apenas o ID do player e não o nome essa Adaptação não vou disponibilizar. http://otsbrasil.com/dbo Servidor Derivado Dragon Ball Online 8.6 + Cast System + War System entre outros sistemas. [ADM] Aaron Autorizo modificações e Postar em Qualquer Forum, esse codigo é meu e fiz de graça e forneço de Graça. PS2 : Se Possivel mudar o Titulo para Anti Clone System [GlobalEvents] Shop.lua[Modern Acc] / CheckItens.lua
  19. Boa noite estou com 1 problema, quero abrir 2 servidor em 1 maquina, ja mudei as ports e wolrd criei 1 db nova e 1 pasta do ot diferente tbm, eu abro os 2 servidores, e consigo acessar a account, porem quando vou logar no char ele da "password invalid" como faço para arrumar isso ?
  20. Emersonssss postou uma resposta no tópico em Tutoriais sobre Scripting
    Sky estou com esse problema e passei a noite olhando esse tutorial para tenta tira o meu erro e nd de arruma por favor me de 1 ajuda ( n sei se será flood pois meu problema é exatamente esse) Ele funciona perfeito troca outfit, manda o 1 efeito e ativa o addeent porem quando o player morre ou loga aparece msg de erro no console tentei de td arruma e nd Por favor me ajude
  21. Bom dia Galera, Começei essa semana a montar um Ot Server de Dragon Ball Online 8.6 só por diversão para relembrar algumas coisas e etc. Porem o Avanço dele foi muito maior do que eu tinha imaginado e consegui boa parte da conclusão do Server... Esta Faltando alguns detalhes e adicionar algumas Spells e o Server ja pode ser Lançado sem erros... Estou Precisando de Pessoas que saiba no minimo oque é cada pasta no Server, pois estou precisando de pessoas para montar os equipes, revisar as spells e revisar o Map pois ele era uma versão 8.0 e eu coloquei ele em 8.6 TFS 0.4 com War System e Cast System se Necessario, porem é muitos detalhes para que eu possa administra-lo sozinho, então venho aque solicitar a ajuda de quem realmente entende de Ot Server, Lembrando que não preciso de Scripter, Mapper e sim de pessoas com tempo para poder me ajuda a revisar e arrumar os bugs. Atualmente o Server só esta faltando Adicionar os Status do Itens Revisar o Map a Procura de Bugs em Spr Revisar Spells e Adicionar as que Falta Revisar as Transformações. Lembrando que tenho varias Spr de Transformações disponivel para serem colocadas no Server. Zaiko- Kagome - Kame ....em outras palavras tenho o cliente DBOBR Serv1 Descompilado então posso colocar todas as 35 vocações dele disponivel. É isso ae Galera preciso de pessoas que realmente querem ajudar e em um futuro proximo possar se tornar um Server Bem Famoso. Meu Skype > emersonaaron caso se interese
  22. Bom dia Galera estou precisando de ajuda de vcs eu fiz um script usando Tibia API que solta uma magia quando pega-se Target só q ele esta dando Loop no client e assim travando ele teria como vcs verifica para mim se possivel se fiz algo errado ? não da erro nenhum só que eu percebi q quando uso essa opçao o cient comaça trrava d+ e depois ele da erro fatal no cliente segue o Timer que eu utilizo Private Sub TimerAtk_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerAtk.Tick For Each monster As Creature In c.BattleList.GetCreatures If (p.TargetId > 0) Then c.Console.Say(ComboBox3.Text) End If Next End Sub Segue tbm o CheckBox Private Sub CheckBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox8.CheckedChanged If CheckBox8.Checked Then TimerAtk.Start() ComboBox3.Enabled = False Else TimerAtk.Stop() ComboBox3.Enabled = True End If End Sub Se possivel me ajudem

Informação Importante

Confirmação de Termo