Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. n testei function onLook(cid, thing, position, lookDistance) function getDeathsAndKills(cid, type) -- by vodka local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0 if (query:getID() ~= -1) then repeat d = d+1 until not query:next() query:free() end return d end if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(thing.uid, "kill").."] Players.\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(thing.uid, "death").."] Times") elseif thing.uid == cid then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, (getPlayerSex(cid) == 0 and "She" or "He").." has Killed: ["..getDeathsAndKills(cid, "kill").."] Players.\n"..(getPlayerSex(cid) == 0 and "She" or "He").." has Died: ["..getDeathsAndKills(cid, "death").."] Times") end return true end
  2. esse sistema já existe, no caso esse paper só poderia ser transferido pelo trade não é? não é difícil de criar!
  3. já existe esse sistema no fórum, só procurar reclama que ngm ajuda mas não move um dedo pra ir nas seções procurar! Logo de cara achei na primeira página
  4. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    não precisa kk < menor que <= igual ou menor que == igual que ~= diferente de > maior que >= igual ou maior que etc
  5. t = {} local m = getThingPosWithDebug(cid) for x = -7, 7 do for y = -7, 7 do local pos = {x = m.x + x, y = m.y + y, z = m.z, stackpos = 0} if getTileThingByPos(pos).itemid > 0 then t[#t+1] = pos end end end local function doEarthquake(cid, pos) if not isCreature(cid) then return true end if not isSightClear(getThingPosWithDebug(cid), pos, false) then return true end if not canWalkOnPos(pos, false, false, false, false, true) then return true end doAreaCombatHealth(cid, GROUNDDAMAGE, pos, 0, -min, -max, 255) doSendMagicEffect({x = pos.x + 1, y = pos.y + 1, z = pos.z}, 127) end if #t > 0 then for a = 1, #t do local random = math.random(1, #t) addEvent(doEarthquake, a * 24, cid, t[random]) t = doRemoveElementFromTable(t, t[random]) -- pra que essa função? existe table.insert e table.remove kk end end teste desse jeito
  6. já fiz!! está na 2° página do tópico rsrsrs abre o MODS e antes de </mod> adicione <movevent type="StepIn" actionid ="45250" event="script"><![CDATA[ domodlib('task_func') function onStepIn(cid, item, position, fromPosition) local amount = 30 if getTaskPoints(cid) < amount then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, 25, "Você só pode passar se tiver " .. amount .. " Task Points.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end return true end]]></movevent> ai no tile coloca AID = 45250
  7. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Item_Bonus" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="itembonus_func"><![CDATA[ monsters = { ["apocalypse"] = {s = 487541, min = 5000, item = {2160,10}}, ["ghazbaran"] = {s = 487542, min = 6000, item = {2173,1}}, ["infernatil"] = {s = 487543, min = 6000, item = {2173,1}}, ["dragon"] = {s = 487544, min = 200, item = {2159,10}} } ]]></config> <event type="login" name="ItemBonusRegister" event="script"><![CDATA[ domodlib('itembonus_func') function onLogin(cid) registerCreatureEvent(cid, "ItemBonusCombat") registerCreatureEvent(cid, "ItemBonusStats") for _, v in pairs(monsters) do -- when die or relog setPlayerStorageValue(cid, v.s, 0) end return true end]]></event> <event type="combat" name="ItemBonusCombat" event="script"><![CDATA[ domodlib('itembonus_func') if isPlayer(cid) and isMonster(target) and monsters[getCreatureName(target):lower()] then registerCreatureEvent(target, "ItemBonusStats") registerCreatureEvent(target, "ItemBonusDeath") end return true]]></event> <event type="statschange" name="ItemBonusStats" event="script"><![CDATA[ domodlib('itembonus_func') if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) and isMonster(cid) and monsters[getCreatureName(cid):lower()] then local v = monsters[getCreatureName(cid):lower()] if getPlayerStorageValue(attacker, v.s) < v.min then setPlayerStorageValue(attacker, v.s, (getPlayerStorageValue(attacker, v.s) <= 0 and value or getPlayerStorageValue(attacker, v.s)+value)) end end return true]]></event> <event type="death" name="ItemBonusDeath" event="script"><![CDATA[ domodlib('itembonus_func') function onDeath(cid, corpse, deathList) local x = monsters[getCreatureName(cid):lower()] if x then for _, pid in ipairs(deathList) do if isCreature(pid) and isPlayer(pid) then if getPlayerStorageValue(pid, x.s) >= x.min then doPlayerAddItem(pid,x.item[1],x.item[2]) end setPlayerStorageValue(pid, x.s, 0) end end end return true end]]></event> </mod>
  8. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Item_Bonus" version="1.0" author="Vodkart" contact="tibiaking.com" enabled="yes"> <config name="itembonus_func"><![CDATA[ monsters = { ["rat"] = {s = 487541, min = 15, item = {2160,10}}, ["rotworm"] = {s = 487542, min = 20, item = {2173,1}}, ["cyclops"] = {s = 487543, min = 100, item = {2173,1}}, } ]]></config> <event type="login" name="ItemBonusRegister" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "ItemBonusCombat") registerCreatureEvent(cid, "ItemBonusStats") return true end]]></event> <event type="combat" name="ItemBonusCombat" event="script"><![CDATA[ domodlib('itembonus_func') if isPlayer(cid) and isMonster(target) and monsters[getCreatureName(target):lower()] then registerCreatureEvent(target, "ItemBonusStats") registerCreatureEvent(target, "ItemBonusDeath") end return true]]></event> <event type="statschange" name="ItemBonusStats" event="script"><![CDATA[ domodlib('itembonus_func') if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) and isMonster(cid) and monsters[getCreatureName(cid):lower()] then if value >= monsters[getCreatureName(cid):lower()].min then setPlayerStorageValue(attacker, monsters[getCreatureName(cid):lower()].s, 1) end end return true]]></event> <event type="death" name="ItemBonusDeath" event="script"><![CDATA[ domodlib('itembonus_func') function onDeath(cid, corpse, deathList) local x = monsters[getCreatureName(cid):lower()] if x then for _, pid in ipairs(deathList) do if isCreature(pid) and isPlayer(pid) and getPlayerStorageValue(pid, x.s) > 0 then doPlayerAddItem(pid,x.item[1],x.item[2]) setPlayerStorageValue(pid, x.s, 0) end end end return true end]]></event> </mod> para configurar só vir nessa tabela: monsters = { ["rat"] = {s = 487541, min = 15, item = {2160,10}}, ["rotworm"] = {s = 487542, min = 20, item = {2173,1}}, ["dragon"] = {s = 487543, min = 700, item = {2173,1}}, } ["nome do monstro em letra minuscula"] = [s = storage coloque sempre uma diferente, min = quantidade de hit necessaria, item {id do item, quantidade}} obs: isso é em MODS
  9. function onCastSpell(cid, var) if getPlayerStorageValue(cid, 15000) - os.time() <= 0 then doPlayerSendCancel(cid, "You can/'t cast this spell.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end return doCombat(cid, combat, var) end function onSay(cid, words, param, channel) local store,exausted = 156201,30 -- exaust na talk if getPlayerStorageValue(cid, store) >= os.time() then doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, store) - os.time() .. " seconds to use this command again.") return true end setPlayerStorageValue(cid, 15000, os.time()+10) setPlayerStorageValue(cid, store, os.time()+exausted) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "ativado 10 segundos.") return true end
  10. posta a magia aqui que editamos porque o código do cara está certo. a storage vai ficar no jogador por 10 segundos. ai você poderia dar os 10 segundos assim: setPlayerStorageValue(cid, 15000, os.time()+10) -- aqui dá 10 segundos if getPlayerStorageValue(cid, 15000) - os.time() > 0 then -- aqui checa se ele tem os 10 segundos ainda --usar magia end
  11. Como no simple task 3.0? Até dá, mas teria que adaptar as funções, npc, etc... E como na versão 4.0 falaram para fazer por ordem, vou deixar assim...
  12. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    function doPlayerRemoveLevel(cid, level) if isPlayer(cid) == true and level >= 1 then local experience = getPlayerRequiredExperience(cid, getPlayerLevel(cid)-level) return doPlayerRemoveExp(cid, experience) end return false end mais funções https://github.com/opentibia-xx/data/blob/master/functions.lua
  13. só aceita com moeda mesmo, se não eu posso te passar um que seja pelo trade-say, onde o jogador fala qual item deseja comprar e talz... já está feito aqui:
  14. local config = { minlevel = 150, --- level inical para resetar price = 10000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 0, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 50, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } local function getResets(cid) local query = db.getResult("SELECT `resets` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return query:getDataInt("resets") <= 0 and 0 or query:getDataInt("resets") end local function addReset(cid) local resets = getResets(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/100) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/100) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) local guid = getPlayerGUID(cid) doRemoveCreature(cid) local description = resets+1 db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]', `level` = "..config.newlevel..", `experience`= 0, `resets`= "..description.." WHERE `players`.`id`= ".. guid) return true end function onSay(cid, words, param, channel) local var = getResets(cid) local newPrice = config.price + (var * config.priceByReset) local newminlevel = config.minlevel + (var * config.levelbyreset) if param == "quantity" then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a total of '..var..' reset(s).') end if var >= config.maxresets then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'You already have reached the maximum of '.. config.maxresets.. ' resets!') elseif getPlayerMoney(cid) < newPrice then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'Its necessary to have at least '..newPrice..' gp\'s for reseting!') elseif getPlayerLevel(cid) < newminlevel then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,'The minimum level for reseting is '..newminlevel..'!') end doPlayerRemoveMoney(cid,newPrice) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = var+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerPopupFYI(cid, msg) return true end
  15. tenta trocar <item id="13258" article="a" name="MasterBall"> <attribute key="weight" value="0" /> <attribute key="description" value="This is a pokeball used to catch fainted pokemon. It has a 4x catch rate."/> </item> por <item id="13258" article="a" name="master ball"> <attribute key="weight" value="0" /> <attribute key="description" value="This is a pokeball used to catch fainted pokemon. It has a 4x catch rate." /> </item>
  16. acho que vc ta usando o ID errado da master ball no npc
  17. tem certeza que a coluna é "resets" ou invés de "reset" né?
  18. gostei dessa ideia, então estou num projeto e estou meio sem tempo, já passei parto do simple task pra tfs 1.2 e tal. terminando esse projeto e de passar o sistema pra tfs 1.2 eu começo a editar o sistema e colocar um somente para Daily Task System com essas coisas que vc citou, pq achei mto boa essas dicas. só n vou te dar prazo pq não sei qndo começo kk
  19. Todas essas aplicações já existem no sistema, além disso não acho necessário criar uma coluna na DB para salvar as task points, sendo que pode ser feito com storage... O que eu posso fazer é ensinar ou criar um script ensinando a usar os task points, para abrir báu, falar com npc, etc... 1° - Não fiz o sistema de BOSS ROOM ainda, mas poderá ser feito desse jeito sim 2° - Dá para remover a talk e colocar só no default msm 3° - Já ganha uma storage, só falar usar a storage e usar para abrir o baú com a mesma storage do sistema o que é re-roll? acho legal de acordo com os pontos(rank já existe) vc poder ganhar alguns recompensas "extras" como você falou.
  20. posso fazer um sistema de somente task diaria... tem alguma alteração que alguém queira fzr no sistema? implementar a task diaria no caso.
  21. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    você pode ir ajudando na área de suporte e pedidos de script pra ir aprendendo um pouco, até alguém fazer um pedido aqui no seu tópico
  22. Quem disse? você que usou a função erroneamente... doCreatureChangeOutfit(cid, roupa) o certo é doCreatureChangeOutfit(cid, {lookType = roupa}) ou pode usar tbm esta outra função doSetCreatureOutfit(cid, {lookType = roupa}, -1)

Informação Importante

Confirmação de Termo