Ir para conteúdo

Rusherzin

Membro
  • Registro em

  • Última visita

Tudo que Rusherzin postou

  1. Esse script aí é de uma action mesmo. Tenta com esse: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) function onCastSpell(cid, var) local MIN = 3000 local MAX = 6000 doCreatureAddHealth(cid, math.random(MIN, MAX)) doPlayerAddMana(cid, math.random(MIN, MAX)) return doCombat(cid, combat, var) end
  2. Cara, acho que adicionar a parte de vocation na tag no spells.xml é o bastante: <rune name="Mana Rune" id="2298" allowfaruse="0" charges="1" lvl="12" maglv="2" exhaustion="2000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="custom spells/mana rune.lua"/> <vocation id="2"/> </rune> Mais ou menos como no exemplo acima, se não conseguir ajeitar, posta a tag atual da mana rune que eu arrumo.
  3. Esse arquivo não parece completo. Qual é o valor da storage?
  4. ALTER TABLE `players` ADD `frags_all` INT(32) NOT NULL
  5. Fico feliz que tenha funcionado. Boa sorte com o tópico.
  6. Sim, fazer um separado pode ser uma boa. Só testa essa última aqui, tentei pegar o dado com Int ao invés de String. Mas, se não funcionar e precisares de ajuda para fazer separado, é só pedir. 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(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then 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")) local voc = tonumber(itemr:getDataInt("vocation")) local look = tonumber(itemr:getDataInt("looktype")) local outfit = {lookType = look} if isInArray({5,8},tipe) then if(voc == 0) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end else doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") doCreatureChangeOutfit(cid, outfit) doPlayerSetVocation(cid, voc) 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.executeQuery("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
  7. Checa aí no teu banco de dados se existe a coluna frags_all na tabela players.
  8. Okay, tentei de novo. O problema é que quando o código é muito grande e não fui eu que fiz, eu fico bem perdido. Mas tenta de novo: 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(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then 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")) local voc = tostring(itemr:getDataString("vocation")) local look = tostring(itemr:getDataString("looktype")) local outfit = {lookType = look} if isInArray({5,8},tipe) then if(voc == 0) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end else doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") doCreatureChangeOutfit(cid, outfit) doPlayerSetVocation(cid, voc) 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.executeQuery("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
  9. Bom, acho que a parte de mostrar a vida que heala tem a ver com a configuração no config.lua. showHealingDamage = true Mas essa configuração, aparentemente, só mostra o healing de vida. Então, acho que o único jeito (além de editar nas sources) é botar ali no código algo assim: doSendAnimatedText(getCreaturePosition(cid), "+"..REG_MANA, COLOR_PURPLE)
  10. Poste o conteúdo do arquivo fraggers.php.
  11. 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(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then 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")) local voc = tostring(itemr:getDataString("vocation")) local look = tostring(itemr:getDataString("looktype")) if isInArray({5,8},tipe) then if(voc == 0 and look == 0) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end else doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") doCreatureChangeOutfit(cid, look) doPlayerSetVocation(cid, voc) 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.executeQuery("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
  12. Geralmente isso é configurado no config.php. Na variável $towns_list.
  13. Isso, essa mesmo. Eu tentei fazer aqui, mas não testei. Ele vai adicionar a vocação e o looktype quando vocation e looktype não forem 0. (vou botar sem spoiler, pois o spoiler está zoando os códigos aqui) 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(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then 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")) local voc = tostring(itemr:getDataString("vocation")) local look = tostring(itemr:getDataString("looktype")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then if(voc == 0 and look == 0) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Você Recebeu Uma | "..productn.." | que comprou no Shop, Obrigado e Bom Uso da "..productn.." ") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") doCreatureChangeOutfit(cid, look) doPlayerSetVocation(cid, voc) end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..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.executeQuery("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
  14. Sim, eu entendi. Mas eu tenho que ter uma referência para diferenciar quando é que o script está entregando uma vocação e quando está entregando um item. Por exemplo, se tu colocar sempre em category o valor "vocation", eu posso checar esse valor e entregar a vocação. Tem como me mostrar a tabela de ofertas da sua database? Só para eu ver o nome das colunas existentes.
  15. Quando tu quer vender um item normal, o que é tu colocas em vocation e looktype? Só para eu poder usar isso no código para diferenciar quando entregar um item e quando entregar uma vocação.
  16. Não testei, fiz direto aqui no editor de texto. Se não entender a tabela, avisa. function onDeath(cid, corpse, killer) local lvltable = { -- min, max, perda {1000, 1099, 50}, {1100, 1199, 60} } local level = getPlayerLevel(cid) if isPlayer(cid) then for k, v in pairs(lvltable) do if level >= v[1] and level <= v[2] then doPlayerAddExp(cid, getExperienceForLevel(level - v[3]) - getPlayerExperience(cid)) end end end return true end
  17. Nossa, eu copiei o código do post do cara como base e nem notei, tenta assim: function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 966) return true end function onStepOut(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 965) return true end
  18. Estranho, tu botou as duas tags no movements.xml? <movevent type="StepIn" itemid="965" event="script" value="mudartile.lua"/> <movevent type="StepOut" itemid="966" event="script" value="mudartile.lua"/>
  19. <movevent type="StepIn" itemid="965" event="script" value="mudartile.lua"/> <movevent type="StepOut" itemid="966" event="script" value="mudartile.lua"/> function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 966) return true end function onStepOut(creature, item, position, fromPosition) if not isPlayer(cid) then return true end doTransformItem(getThingFromPos(position).uid, 965) return true end
  20. function onUse(cid, item, frompos, item2, topos) configs = { premydays = 1 -- Dias de premmy que o item dara } if(getTilePzInfo(getCreaturePosition(cid))) then doPlayerAddPremiumDays(cid, configs.premydays) doPlayerSendTextMessage(cid, 25, "Você acabou de receber "..configs.premydays.." dia de VIP.") doRemoveItem(item.uid, 1) doRemoveCreature(cid) else doPlayerSendTextMessage(cid, 25, "Você precisa estar na Protection Zone.") end end
  21. Onde baixou esse gesior? Conseguiu completar os passos da instalação com sucesso?
  22. Rusherzin postou uma resposta no tópico em Suporte Tibia OTServer
    Entendo. Porém, esse bug dos Samples, ele não precisa logar neles, os Samples são usados como base para criar outro character, sendo assim, todo dinheiro que o Sample tiver no banco será colocada na conta dos characters recém criados. Mas enfim, sobre o depot, eu, infelizmente, não conheço nenhum bug.
  23. $contents = file_get_contents($filename); $array = explode("\n", $contents); $output = array(); foreach ($array as $arr) { if (strpos($arr, '--') !== 0) { $output[] = $arr; } }
  24. Rusherzin postou uma resposta no tópico em Suporte Tibia OTServer
    Bom, pensando em guilds, esse é o único problema que eu consigo lembrar. Vi também que tu falou sobre ter dinheiro no depot, não consigo recordar de nada sobre isso. Fora isso, um outro bug que eu lembro é um em que os players podiam depositar dinheiro na conta dos characters Sample, assim, quando eles criavam novos characters, eles vinham com dinheiro no banco.

Informação Importante

Confirmação de Termo