Ir para conteúdo

maikons

Membro
  • Registro em

  • Última visita

Tudo que maikons postou

  1. não tem mesmo como colocar um item agrupavel ou usar outro com a mesma sprite só q agrupavel?
  2. Meu war system é o aqui do tibiaking, só modifiquei o war.lua, porque estava com um problema o mesmo problema que foi resolvido por outro membro aqui do fórum http://www.tibiaking.com/forum/topic/8827-war-system-guild-war-com-escudos-completo/ Unica coisa q eu mudei foi o war.lua function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end por causa desse erro [Error - TalkAction Interface] data/talkactions/scripts/war.lua Description: <internalGetPlayerInfo> Player not found when requesting player in fo #11 tópico: http://www.tibiaking.com/forum/topic/20521-ajuda-com-scripter/ O erro é na hora de aceitar a war /war accept,Name
  3. Queria uma condicional pra quebrar o comando Tipo assim If(cap < 500) return msg="vc nao tem cap otario" ou if(cap < 500) then msg="vc nao tem cap otario" return 1 end Só pro cara não conseguir pegar o bau sem a cap necessaria
  4. ah ta explicado, eu coloquei só como stackablle lá agora toda vez eu vejo o item, abro bp q ele ta ou vou onde ele ta da the bug no jogo Não tava afim de editar o tibia.dat, pq vai ser só um OT mesmo não queria que tive-sem que baixar o client pra poder jogar... Não tem outro jeito de fazer isso? Sei lá criando outro item com a msm sprite, vcs sabem?
  5. Vlw funcionou, te dei 3 reps ai
  6. Não da erro no console e nem funciona
  7. Não funcionou, tem q manjar pra poder tirar as partes certas, eu tentei, tbm n consegui
  8. Passei quse uma hora no OTItemEditor 0.3.9 procurando por esse maldito item e nunca acho!
  9. Com o GOD e meu kina online fica 13:24 2 players online: 13:24 Elite Maikon [72], Suport Maikon [30]. 13:24 Vocations: Elite Knight [1], Druid [1]. Queria remover essa linha 13:24 Elite Maikon [72], Suport Maikon [30]. Pra ficar assim 13:24 2 players online: 13:24 Vocations: Elite Knight [1], Druid [1]. E queria configurar pra aparecer o dobro de player sempre Tipo: Se eu tive-se logado no Elite Maikon e no Suport Maikon em vez de ser 13:24 2 players online: 13:24 Vocations: Elite Knight [1], Druid [1]. Ser 13:24 4 players online: 13:24 Vocations: Elite Knight [2], Druid [2]. Pra dar impressão de OT mais cheio Meu !online local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')), showLevel = "yes", showVocations = "yes" } config.showLevel, config.showVocations = getBooleanFromString(config.showLevel), getBooleanFromString(config.showVocations) function onSay(cid, words, param, channel) local strings, i, position, added, vocations, vocStr = {""}, 1, 1, false, {}, "" for _, pid in ipairs(getPlayersOnline()) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if(vocations[getPlayerVocation(pid)] ~= nil) then vocations[getPlayerVocation(pid)] = vocations[getPlayerVocation(pid)] + 1 else vocations[getPlayerVocation(pid)] = 1 end added = false if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. ""..(config.showLevel and " [" .. getPlayerLevel(pid) .. "]" or "").."" i = i + 1 added = true end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player" .. (i > 1 and "s" or "") .. " online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) end if(config.showVocations) then for vocId, quant in pairs(vocations) do vocStr = vocStr .. ""..getVocationInfo(vocId).name.." ["..quant.."], " end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Vocations: "..vocStr:gsub(", $", ".")) end return true end
  10. Como eu faço pra tornar o item id: 12325 Um item que junte, agrupe, até 100 igual gold e worm e todos os outros itens?
  11. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Poxa cara me desculpa, eu sou meio retardado, juro q n tinha visto essa variavel kkkk printou 0 nunca mexi nisso, mas deve ta ligado ao calculo doido de adicionar skill, como nunca mexi com skill nem to ligado -- a divisao por 3000 foi porque cada ponto de skill try equivale a 30 tries de skill e nos naturalmente dividimos por 100. 1/30 * 1/100 = 1/3000
  12. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    embaixo do que?
  13. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Muito foda, parabéns! Só tem alta coisas mínimas, ta funcionando quase tudo 23:43 Magnus: You finished the quest, now you want to receive your reward in gold, trainning or in experience? 23:43 Paladin [35]: trainning 23:43 Magnus: Which skill you want to train with me? choose between axe, distance, club, sword, shield and magic 23:43 Paladin [35]: axe 23:43 Magnus: Thanks for your help, here is your prize.. Não mexeu nem 1% E desse jeito não vai ter tipo paladin com skill de axe alta, ou mage Como é a formula?
  14. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Também fiz uma opção de pegar a recompensa em skills e dei uma melhorada no script, basta substituir o script do npc por esse daqui: Você tem que garantir que em data/lib/constant existe essa tabela (se nao tiver, é só colocar): SKILL_IDS = { ["fist"] = SKILL_FIST, ["club"] = SKILL_CLUB, ["sword"] = SKILL_SWORD, ["axe"] = SKILL_AXE, ["distance"] = SKILL_DISTANCE, ["dist"] = SKILL_DISTANCE, ["shielding"] = SKILL_SHIELD, ["shield"] = SKILL_SHIELD, ["fishing"] = SKILL_FISHING, ["fish"] = SKILL_FISHING, ["level"] = SKILL__LEVEL, ["magic"] = SKILL__MAGLEVEL } e que essas variáveis possuam esses valores: SKILL_FIST = 0 SKILL_CLUB = 1 SKILL_SWORD = 2 SKILL_AXE = 3 SKILL_DISTANCE = 4 SKILL_SHIELD = 5 SKILL_FISHING = 6 SKILL__MAGLEVEL = 7 SKILL__LEVEL = 8 Que foda vei, vlw, agora ta contando os kills, ta dando até pra entregar task de kill quando finaliza, mas só tem dois problemas Parece que bugou o collect, eu tenho o item tento entregar a task, mas não vai, diz que eu não tenho E task de training não ta indo, mas pode ser pq o meu ta diferente Essa aqui ta igualzinho SKILL_IDS = { ["fist"] = SKILL_FIST, ["club"] = SKILL_CLUB, ["sword"] = SKILL_SWORD, ["axe"] = SKILL_AXE, ["distance"] = SKILL_DISTANCE, ["dist"] = SKILL_DISTANCE, ["shielding"] = SKILL_SHIELD, ["shield"] = SKILL_SHIELD, ["fishing"] = SKILL_FISHING, ["fish"] = SKILL_FISHING, ["level"] = SKILL__LEVEL, ["magic"] = SKILL__MAGLEVEL } mas a segunda o meu ta assim SKILL_FIRST = 0 SKILL_FIST = SKILL_FIRST SKILL_CLUB = 1 SKILL_SWORD = 2 SKILL_AXE = 3 SKILL_DISTANCE = 4 SKILL_SHIELD = 5 SKILL_FISHING = 6 SKILL__MAGLEVEL = 7 SKILL__LEVEL = 8 SKILL_LAST = SKILL_FISHING SKILL__LAST = SKILL__LEVEL Será que é pq ta um pouco diferente? Da merda se eu mudar?
  15. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    poxa queria tanto usar esse script =(
  16. Vlw chapa, vou add aqui
  17. Meu OT ta dando problema na hora de inicializar pois estão faltando alguns monstros da versão 8.54, os de ZA Meu ot é 8.6 limpo, só mudei o mapa, baixei a 3884 (0.4) Alguem poderia me passar esses monstros: terramite lizard high guard lizard legionnaire lizard zaogun lizard dragon priest draken spellweaver draken warmaster Se souber mais também me diz, da muito erro sobre eles pq tem eles no mapa, mas n tem na pasta de monstros
  18. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Cara vc me embolou pra cacete Onde vc ta querendo chegar com esse post? kkkk Se é saber onde o cmd ta chegando? Ele só entra até onkill por isso só printa work, ele não entra nos outros dois condicionais if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and getCreatureMaster(target) ~= nil and (not(isInParty(cid)) or config.partycount ~= true) then print(1) elseif isMonster(target) and getCreatureMaster(target) ~= nil and isInParty(cid) and config.partycount == true then print(2)
  19. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Pois bem amigo eu tentei isso e continua a mesma coisa, nada de contar kills e no console só aparece work local storages = { name = 95672, count = 95673, maxcount = 95674, } local config = { partycount = true, --- true ou false pra ativar/desativar que os kills dos membros da party contem pra voce killdistance = 7 --- distancia que conta os kills } function onKill(cid, target, lastHit) print("work") if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and getCreatureMaster(target) ~= nil and (not(isInParty(cid)) or config.partycount ~= true) then print(1) if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(cid, storages.name)) then print(3) setPlayerStorageValue(cid, storages.count, getPlayerStorageValue(cid, storages.count) + 1) if getPlayerStorageValue(cid, storages.count) == getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 19, "You finished your task.") elseif getPlayerStorageValue(cid, storages.count) < getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(cid, storages.count) .."/".. getPlayerStorageValue(cid, storages.maxcount) .."].") end end elseif isMonster(target) and getCreatureMaster(target) ~= nil and isInParty(cid) and config.partycount == true then print(2) leader = getPartyLeader(cid) party = getPartyMembers(leader) for i = 1, #party do pid = party[i] if getDistanceBetween(getThingPos(target), getThingPos(pid)) < config.killdistance then if getPlayerStorageValue(pid, storages.maxcount) > 3 then if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(pid, storages.name)) then setPlayerStorageValue(pid, storages.count, getPlayerStorageValue(pid, storages.count) + 1) if getPlayerStorageValue(pid, storages.count) == getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 19, "You finished your task.") elseif getPlayerStorageValue(pid, storages.count) < getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(pid, storages.count) .."/".. getPlayerStorageValue(pid, storages.maxcount) .."].") end end end end end end return true end
  20. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Ué, a resposta que vc deu q se remove-se isso iria começar a contar como kill se mata-se summon
  21. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    Vc está se referindo a distro, ao print? work? Só aparecer: work work work
  22. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    <!-- TASK SYSTEM --> <event type="kill" name="tasksystem" event="script" value="tasksystem.lua"/> login.lua registerCreatureEvent(cid, "FullHpMana") registerCreatureEvent(cid, "tasksystem") return true tasksystem.lua local storages = { name = 95672, count = 95673, maxcount = 95674, } local config = { partycount = true, --- true ou false pra ativar/desativar que os kills dos membros da party contem pra voce killdistance = 7 --- distancia que conta os kills } function onKill(cid, target, lastHit) print("work") if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and getCreatureMaster(target) == target and (not(isInParty(cid)) or config.partycount ~= true) then print(1) if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(cid, storages.name)) then print(3) setPlayerStorageValue(cid, storages.count, getPlayerStorageValue(cid, storages.count) + 1) if getPlayerStorageValue(cid, storages.count) == getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 19, "You finished your task.") elseif getPlayerStorageValue(cid, storages.count) < getPlayerStorageValue(cid, storages.maxcount) then doPlayerSendTextMessage(cid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(cid, storages.count) .."/".. getPlayerStorageValue(cid, storages.maxcount) .."].") end end elseif isMonster(target) and getCreatureMaster(target) == target and isInParty(cid) and config.partycount == true then print(2) leader = getPartyLeader(cid) party = getPartyMembers(leader) for i = 1, #party do pid = party[i] if getDistanceBetween(getThingPos(target), getThingPos(pid)) < config.killdistance then if getPlayerStorageValue(pid, storages.maxcount) > 3 then if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(pid, storages.name)) then setPlayerStorageValue(pid, storages.count, getPlayerStorageValue(pid, storages.count) + 1) if getPlayerStorageValue(pid, storages.count) == getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 19, "You finished your task.") elseif getPlayerStorageValue(pid, storages.count) < getPlayerStorageValue(pid, storages.maxcount) then doPlayerSendTextMessage(pid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(pid, storages.count) .."/".. getPlayerStorageValue(pid, storages.maxcount) .."].") end end end end end end return true end Servidor 3884, 0.4 baixado aqui mesmo no fórum to com task de troll, mato troll aparece na distro work mas se mato rotworm também aparece na distro work
  23. Meu OT ta dando problema na hora de inicializar pois estão faltando alguns monstros da versão 8.54 Meu ot é 8.6 limpo, só mudei o mapa, baixei a 3884 (0.4) Alguem poderia me passar esses monstros: terramite lizard high guard lizard legionnaire lizard zaogun lizard dragon priest draken spellweaver draken warmaster Se souber mais também me diz, da muito erro sobre eles pq tem eles no mapa, mas n tem na pasta de monstros
  24. maikons postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    aqui só funcionou o de collect o de kill não ta contando, quando eu mato um monstro não aparece no default as msgs e tal Por que será? Será que é porque já tenho o sistema de task simple do vodkart? Nem usa as msm storages, mt estranho versão 0.4, 3884

Informação Importante

Confirmação de Termo