Ir para conteúdo

maikons

Campones
  • Total de itens

    77
  • Registro em

  • Última visita

Tudo que maikons postou

  1. Como assim? E qual problema disso?
  2. O que é esse salt?
  3. Agora voltou o problema dos espaços 17:20 You see a magic longsword +1 (Atk:56, Def:41). It can only be wielded properly by knights. It weighs 43.00 oz. It is the magic Cyclopmania Sword. ItemID: [2390]. Position: [X: 948] [Y: 994] [Z: 8].
  4. Nesse script q se passou qnd falha com a 8300 nada acontece, ela continua com o mesmo dano, diz q quebrou, mas continua lá o msm atk
  5. Script do oneshot http://www.xtibia.com/forum/topic/187075-perfect-upgrade-system/ Pessoal do fórum modificou, mas ficou com um problema --[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {90, false, false}, [2] = {80, false, false}, [3] = {70, false, false}, [4] = {60, true, false}, [5] = {40, true, true} }, broadcast = 8, attributes = { ["attack"] = 1, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8300] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if item.itemid == 8300 then if self.item.level > 0 then self:setItemName(self:getItemName():gsub("%+(%d+)", "")) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, getItemAttribute(self.item.uid, key) - self.item.level * value) end end end else doRemoveItem(self.item.uid, 1) end doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, item.itemid == 8300 and "Your item level has been reseted." or "You have broken your item while trying to upgrade it.") end end Se você erra com a pedra ID: 8300, a arma continua com os espaços que foram criados pra escrever o +1 e se você continua errando, continua tendo mais espaços até ficar igual a minha arma 21:27 You see a thaian sword +6 (Atk:52, Def:35). It weighs 61.00 oz. ItemID: [7391]. Position: [X: 982] [Y: 1013] [Z: 7]. E não para nunca, fica com espaços pra crl!
  6. brother só ficou com um pequeno bugzinho 21:27 You see a thaian sword +6 (Atk:52, Def:35). It weighs 61.00 oz. ItemID: [7391]. Position: [X: 982] [Y: 1013] [Z: 7]. Quando reseta não volta os espaços ai dps fica varios espaços Sabe arrumar? Pls galera, me ajudem a arrumar esses espaços! Pls galera, me ajudem a arrumar esses espaços! UP!
  7. Ué o pessoal aqui do fórum não sabe não?
  8. Coloquei isso e recompilei e continua dando erros Achei que nem precisava disso
  9. O que é esse 10.79 que você colocou no tópico? Isso você explicou no inicio do tópico, mas como? O que ele faz? Como faz pra filtrar esses ataques?
  10. 10.79? Funciona realmente? Sei que nenhum script faz milagre, mas o que esse script faz?
  11. O que precisa colocar nas soucers 0.4 pra aceitar war system? Eu tenho a minha editada, só que eu achei que era automático, precisa mudar algo lá?
  12. Eu queria saber pelo menos o pq desse erro pra poder resolver To usando source 0.4, não era só colocar esse script? Qual você usa? Como você fez?
  13. Invita direitinho de novo, mas na hora de aceitar a war...
  14. Meu war system é o mesmo que geral usa, só modifiquei o war.lua por causa desse erro, arrumou o erro, mas não ta dando pra aceitar! O que pode ser? Erro que eu tive que arrumar: [Error - TalkAction Interface] data/talkactions/scripts/war.lua Description: <internalGetPlayerInfo> Player not found when requesting player in fo #11 Erro que ta dando agora ao aceitar a guerra Como resolve? atual 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
  15. Claro, e vai ter q trocar a parte doRemoveItem(item.uid, 1) Pela função que zera o item, mas eu sou burro e não sei por isso peço ajuda de qm tem um olhar melhor pra script
  16. Me desculpa cara, fiquei sem internet Muito obrigado, está funcionando! Estou te dando 5 reps aqui!!! Queria outra ajuda sua, se não for muito! 8306 é a pedra que você me ajudou a quando errar quebrar o item Queria arrumar a pedra VIP do meu OT Seria a 8300, quando erra-se com ela não quebra-se o item (com a 8300) volta-se pro nivel 0 de refinamento, como se nunca tive-se refinado a arma, mas não destrui-se
  17. O oneshot fez uma action muito foda http://www.xtibia.com/forum/topic/187075-perfect-upgrade-system/ Mas eu queria modificar ela, pra toda vez que erra-se em vez de só falhar, qnd falha-se destrui-se a arma/armadura, odne eu mudo?
  18. ta usando ele a qnt tempo? nenhum problema? Já vem com os drivers msm? To pensando em usar o seu o meu só ta me dando dor de cabeça!
  19. Queria usar o windows 7, mas perdi o meu CD antigo e agora já baixei uns 2 no thepiratebay, mas todos são diferentes do primeiro, cheio de problemas, não vem com os drivers, é o meu primeiro vinha com uns drivers de rede, até de graficos bons, instalava junto com o windows, não sei porque, to com um homebasic aqui, mas o antigo era assim... Alguem me explica melhor como isso funciona ou onde baixaram o de vocês?
  20. Agora acho que tá, vlw sem erros obrigadao
  21. Obrigado, mt bom script REP+
  22. Queria uma quest q vc só pude-se pegar um desses 4 itens em 4 baus diferentes 7423 ou 8925 ou 8931 ou 7735 ou 8854 Se pegar um bau n pode pegar os outros..
  23. Dei +rep por me ajudar de novo, mas n funcionou, continua com erro =( Só q agora parece ser outro [Error - CreatureScript Interface] data/creaturescripts/scripts/arenaitems.lua:onAdvance Description: data/creaturescripts/scripts/arenaitems.lua:14: attempt to call gflobal 'isKnight' <a nil value> stack traceback: data/creaturescripts/scripts/arenaitems.lua:14: in function <data/creaturescripts/scripts/arenaitems.lua:13> [C]: in function 'doPlayerAddExperience' data/creatrescripts/sctrips....
  24. Funcional obrigado, +rep
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...