Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. é o xml do seu npc não o lua
  2. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    https://tibiaking.com/files/file/44-86-labia-system/
  3. me manda o xml do seu npc pra eu ver como ficou
  4. --- Edited by: MARK ---- local function doPushCreature(target, cid) if target > 0 then if not isNpc(target) then local position = getThingPosition(cid) local fromPosition = getThingPosition(target) local x = ((fromPosition.x - position.x) < 0 and -1 or ((fromPosition.x - position.x) == 0 and 0 or 1)) local y = ((fromPosition.y - position.y) < 0 and -1 or ((fromPosition.y - position.y) == 0 and 0 or 1)) local toPosition = {x = fromPosition.x - x, y = fromPosition.y - y, z = fromPosition.z} if doTileQueryAdd(target, toPosition) == 1 and getTileInfo(toPosition).house == false then doTeleportThing(target, toPosition, true) end end end end local spell = {} spell.config = { [1] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0}, {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } }, [2] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 1, 0, 2, 0, 1, 0}, {0, 1, 0, 0, 0, 1, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } }, [3] = { damageType = 1, areaEffect = 2, area = { {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 1, 2, 1, 0, 0}, {0, 0, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0} } } } spell.combats = {} for _, config in ipairs(spell.config) do local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, config.damageType) setCombatParam(combat, COMBAT_PARAM_EFFECT, config.areaEffect) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -4, 0, -4, 0) function onTargetCreature(cid, target) doPushCreature(target, cid) end setCombatCallback(combat, CALLBACK_PARAM_TARGETCREATURE, "onTargetCreature") setCombatArea(combat, createCombatArea(config.area)) table.insert(spell.combats, combat) end function doremoveItemInPos(pos, itemid) local t = getTileItemById(pos, itemid).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(pos, CONST_ME_POFF) end function onCastSpell(cid, var) for n = 1, #spell.combats do addEvent(doCombat, (n * 120), cid, spell.combats[n], var) end return true end function onCastSpell(cid, var) local post = getPlayerPosition(cid) local item = 11497 local remove_time = 10 doCreateItem(item, 1, post) addEvent(doremoveItemInPos,remove_time*1000, post, item) return true end
  5. Vodkart postou uma resposta no tópico em Suporte & Pedidos
    Parabéns, seu tópico de conteúdo foi aprovado! Muito obrigado pela sua contribuição, nós do Tibia King agradecemos. Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.
  6. sim posta ele ai que edito p/ vc!
  7. https://pastebin.com/raw/N2HnA1qz
  8. isso é um comando/item? poque você poderia salvar essa outfit numa storage.
  9. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    sim vai upando de pouco em pouco cada vez que vc vende item pro npc. mas digamos que eu vendendo um DEMON ARMOR pro npc eu vou encher 10% da labia skill se eu vender uma FIRE AXE, vai aumentando o mesmo 10%? ou conforme o item custe mais caro, maior a quantidade de skill que enche kk
  10. sim, tinha servidor que eu testava um código e não funcionava e em outro sim, tinha que quebrar a cabeça pra saber o que era kk principalmente uma funções básicas, dava moh raiva!! abraços
  11. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    Esse sistema não é mto complexo, só queria saber o que é o 0,025, e uma pergunta. digamos que eu "upe o meu labia skill" só vendendo golden legss, certo? e eu for vender um golden armor, o skill vai ser o mesmo e aplica essa conta? ou é uma skill pra cada item
  12. claro amg, chegando em casa eu olho, qual distro vc usa e versão do tfs? ou é otx?
  13. tente usar item.type por exemplo qndo tiver mais que 10 parcel if(item.itemid == parcelID and item.type > 10) then
  14. local config = { life_ative = 500000, life_add = 300000, seconds_ative = 20, gStorage = 90702, monster = "Gaz'Haragoth" -- nome do monstro } function AddHealth(cid) setGlobalStorageValue(config.gStorage, 0) if not isCreature(cid) then return false end doCreatureAddHealth(cid, config.life_add) doCreatureSay(cid, "Gaz'Haragoth HEALS himself!", TALKTYPE_MONSTER) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) end function onStatsChange(cid, attacker, type, combat, value) if (getGlobalStorageValue(config.gStorage) < 1 and type == STATSCHANGE_HEALTHLOSS and getCreatureName(cid) == config.monster and getCreatureHealth(cid) < config.life_ative) then doCreatureSay(cid, "Gaz'Haragoth beginns to draw on the miniums to HEAL himself!", TALKTYPE_MONSTER) addEvent(AddHealth, config.seconds_ative * 1000, cid) setGlobalStorageValue(config.gStorage, 1) end return true end
  15. eu testei em um ot que baixei e usei as mesmas informações que vc no seu servidor, baiak yourots tfs 0.3.6 e funcionou o mods que mandei e mais algumas coisas que testei com essa função inclusive somando as rates. provavelmente é algo nas suas sourcess
  16. manda sua lib que eu arrumo
  17. @underpunk https://pastebin.com/raw/ZaPQZk8y acho que é o box code do forum bugando os script
  18. a lib você joga na na pasta lib e abre o 050-function.lua e joga la no final mesmo;. sobre o npc, troque esta linha doPlayerAddItem(cid,parameters.give,1) por doPlayerAddEditedItem(cid, parameters.give, 1) isso adiciona o item editado ne? o 103 é o id do item editado?
  19. remove esse script(talk) e tag do eu servidor e depois tente usar o /reload porque esse comando /reload agora foi jogado para sources então você está duplicando esse comando no servidor..
  20. local talkState = {} local dice_pos = {x=32465,y=32497,z=7,stackpos=255} local player_pos = {x=32464,y=32499,z=7} local nme = "Dice" function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end focus, old_focus = 0, 0 function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local function rollDice(cid,ammount) local value = math.random(5792, 5797) local item = getThingFromPos(dice_pos) if item and item.uid and item.uid > 0 and item.itemid >= 5792 and item.itemid <= 5797 then doTransformItem(item.uid, value) end doSendMagicEffect(dice_pos, CONST_ME_CRAPS) local rolled = value - 5791 doCreatureSay(getNpcId(), getCreatureName(getNpcId()) .. ' rolled a ' .. rolled .. '.', TALKTYPE_ORANGE_1) if rolled == ammount then local backpack = doCreateItemEx(10521) doAddContainerItem(backpack,12627,3) doAddContainerItem(backpack,12626,3) doAddContainerItem(backpack,5957,1) doAddContainerItem(backpack,10310,1) doPlayerAddItemEx(cid,backpack) doSendMagicEffect(getThingPos(cid),29) doCreatureSay(cid,gm(cid,nme,1),TALKTYPE_ORANGE_1) else doCreatureSay(cid,gm(cid,nme,2),TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) end addEvent(function(cid) doPlayerSetStorageValue(cid,722522,-1) focus = 0 doTeleportThing(cid,{x=165,y=59,z=7}) end,2000,cid) end if isInArray({1,2,3,4,5,6},tonumber(msg)) and getPlayerStorageValue(cid,722522) < 0 and focus == cid then doPlayerSetStorageValue(cid,722522,1) rollDice(cid,tonumber(msg)) end end function onThink() local player = getTopCreature(player_pos) if player and player.uid and player.uid > 0 and isPlayer(player.uid) then if focus ~= player.uid then focus = player.uid selfSay(gm(cid,nme,3).." "..getCreatureName(player.uid)..".") addEvent(function(cid) if isPlayer(cid) then doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) doPlayerSetStorageValue(cid,722522.-1) focus = 0 doTeleportThing(cid,{x=165,y=59,z=7}) end end,10000,player.uid) end end end
  21. local talkState = {} local focus, old_focus = 0, 0 local dice_pos = {x=32465,y=32497,z=7,stackpos=255} local player_pos = {x=32464,y=32499,z=7} local nme = "Dice" function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local function rollDice(cid,ammount) if not isCreature(cid) then return LUA_ERROR end local value = math.random(5792, 5797) local item = getThingFromPos(dice_pos) if item and item.uid and item.uid > 0 and item.itemid >= 5792 and item.itemid <= 5797 then doTransformItem(item.uid, value) end doSendMagicEffect(dice_pos, CONST_ME_CRAPS) local rolled = value - 5791 doCreatureSay(getNpcId(), getCreatureName(getNpcId()) .. ' rolled a ' .. rolled .. '.', TALKTYPE_ORANGE_1) if rolled == ammount then local backpack = doCreateItemEx(10521) doAddContainerItem(backpack,12627,3) doAddContainerItem(backpack,12626,3) doAddContainerItem(backpack,5957,1) doAddContainerItem(backpack,10310,1) doPlayerAddItemEx(cid,backpack) doSendMagicEffect(getThingPos(cid),29) doCreatureSay(cid,gm(cid,nme,1),TALKTYPE_ORANGE_1) else doCreatureSay(cid,gm(cid,nme,2),TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) end addEvent(function(cid ) if not isCreature(cid) then return LUA_ERROR end doPlayerSetStorageValue(cid,722522,-1) doTeleportThing(cid,{x=165,y=59,z=7}) end, 2000, cid) end if isInArray({1,2,3,4,5,6}, tonumber(msg)) and focus == cid then if not isCreature(cid) then return LUA_ERROR end local storage = getPlayerStorageValue(cid, 722522) if storage == -1 then doPlayerSetStorageValue(cid,722522,1) rollDice(cid, tonumber(msg)) end end end function onThink() local m = getTopCreature(player_pos).uid if m ~= 0 and isPlayer(m) then if focus ~= m then focus = m selfSay(gm(cid,nme,3).." "..getCreatureName(m)..".") addEvent(function(cid) if not isCreature(cid) then return LUA_ERROR end if isPlayer(cid) then doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) doPlayerSetStorageValue(cid,722522.-1) doTeleportThing(cid,{x=165,y=59,z=7}) end end, 10000, m) end end end
  22. data > npc > lib crie um arquivo.lua e renomei para npc-func.lua local focuses = {} function isFocused(cid, t) for i, v in pairs(t) do if(v == cid) then return true end end return false end function addFocus(cid, t) if(not isFocused(cid, t)) then table.insert(t, cid) end end function setFocus(t) for i, v in pairs(t) do if(isPlayer(v)) then doNpcSetCreatureFocus(v) return end end doNpcSetCreatureFocus(0) end function removeFocus(cid, t) for i, v in pairs(t) do if(v == cid) then table.remove(t, i) setFocus(focuses) break end end end function onCreatureDisappear(cid) if isFocused(cid, focuses) then removeFocus(cid, focuses) if isPlayer(cid) then closeShopWindow(cid) end end end e seu script usa assim dofile("data/npc/lib/npc-func.lua") local focuses = {} -- do not change local talkState = {} local focus, old_focus = 0, 0 local dice_pos = {x=32465,y=32497,z=7,stackpos=255} local player_pos = {x=32464,y=32499,z=7} local nme = "Dice" function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local function rollDice(cid,ammount) if not isCreature(cid) then return LUA_ERROR end local value = math.random(5792, 5797) local item = getThingFromPos(dice_pos) if item and item.uid and item.uid > 0 and item.itemid >= 5792 and item.itemid <= 5797 then doTransformItem(item.uid, value) end doSendMagicEffect(dice_pos, CONST_ME_CRAPS) local rolled = value - 5791 doCreatureSay(getNpcId(), getCreatureName(getNpcId()) .. ' rolled a ' .. rolled .. '.', TALKTYPE_ORANGE_1) if rolled == ammount then local backpack = doCreateItemEx(10521) doAddContainerItem(backpack,12627,3) doAddContainerItem(backpack,12626,3) doAddContainerItem(backpack,5957,1) doAddContainerItem(backpack,10310,1) doPlayerAddItemEx(cid,backpack) doSendMagicEffect(getThingPos(cid),29) doCreatureSay(cid,gm(cid,nme,1),TALKTYPE_ORANGE_1) else doCreatureSay(cid,gm(cid,nme,2),TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) end addEvent(function() if not isCreature(cid) then return LUA_ERROR end doPlayerSetStorageValue(cid,722522,-1) doTeleportThing(cid,{x=165,y=59,z=7}) end,2000) end if isInArray({1,2,3,4,5,6},tonumber(msg)) and isFocused(cid, focuses) then if not isCreature(cid) then return LUA_ERROR end local storage = getPlayerStorageValue(cid, 722522) if storage == -1 then doPlayerSetStorageValue(cid,722522,1) rollDice(cid, tonumber(msg)) end end end function onThink() local player = getTopCreature(player_pos) if player and player.uid and player.uid > 0 and isPlayer(player.uid) then if not isFocused(cid, player.uid) then addFocus(player.uid, focuses) selfFocus(player.uid) selfSay(gm(cid,nme,3).." "..getCreatureName(player.uid)..".") addEvent(function() if not isCreature(player.uid) then return LUA_ERROR end if isPlayer(player.uid) then doSendMagicEffect(getThingPos(player.uid),CONST_ME_POFF) doPlayerSetStorageValue(player.uid,722522.-1) doTeleportThing(player.uid,{x=165,y=59,z=7}) end end,10000) end end for _, focus in pairs(focuses) do if not isCreature(focus) then removeFocus(focus, focuses) talk_step = 0 else local distance = getDistanceTo(focus) or 5 if distance > 4 then selfSay("Hmpf!", focus) removeFocus(focus, focuses) talk_step = 0 end end end setFocus(focuses) end
  23. function isFocused(cid, t) for i, v in pairs(t) do if(v == cid) then return true end end return false end function addFocus(cid, t) if(not isFocused(cid, t)) then table.insert(t, cid) end end function setFocus(t) for i, v in pairs(t) do if(isPlayer(v)) then doNpcSetCreatureFocus(v) return end end doNpcSetCreatureFocus(0) end function removeFocus(cid, t) for i, v in pairs(t) do if(v == cid) then table.remove(t, i) setFocus(focuses) break end end end function onCreatureDisappear(cid) if isFocused(cid, focuses) then removeFocus(cid, focuses) if isPlayer(cid) then closeShopWindow(cid) end end end local focuses = {} local talkState = {} local focus, old_focus = 0, 0 local dice_pos = {x=32465,y=32497,z=7,stackpos=255} local player_pos = {x=32464,y=32499,z=7} local nme = "Dice" function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local function rollDice(cid,ammount) if not isCreature(cid) then return LUA_ERROR end local value = math.random(5792, 5797) local item = getThingFromPos(dice_pos) if item and item.uid and item.uid > 0 and item.itemid >= 5792 and item.itemid <= 5797 then doTransformItem(item.uid, value) end doSendMagicEffect(dice_pos, CONST_ME_CRAPS) local rolled = value - 5791 doCreatureSay(getNpcId(), getCreatureName(getNpcId()) .. ' rolled a ' .. rolled .. '.', TALKTYPE_ORANGE_1) if rolled == ammount then local backpack = doCreateItemEx(10521) doAddContainerItem(backpack,12627,3) doAddContainerItem(backpack,12626,3) doAddContainerItem(backpack,5957,1) doAddContainerItem(backpack,10310,1) doPlayerAddItemEx(cid,backpack) doSendMagicEffect(getThingPos(cid),29) doCreatureSay(cid,gm(cid,nme,1),TALKTYPE_ORANGE_1) else doCreatureSay(cid,gm(cid,nme,2),TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(cid),CONST_ME_POFF) end addEvent(function() if not isCreature(cid) then return LUA_ERROR end doPlayerSetStorageValue(cid,722522,-1) doTeleportThing(cid,{x=165,y=59,z=7}) end,2000) end if isInArray({1,2,3,4,5,6},tonumber(msg)) and isFocused(cid, focuses) then if not isCreature(cid) then return LUA_ERROR end local storage = getPlayerStorageValue(cid, 722522) if storage == -1 then doPlayerSetStorageValue(cid,722522,1) rollDice(cid, tonumber(msg)) end end end function onThink() local player = getTopCreature(player_pos) if player and player.uid and player.uid > 0 and isPlayer(player.uid) then if not isFocused(cid, player.uid) then addFocus(player.uid, focuses) selfFocus(player.uid) selfSay(gm(cid,nme,3).." "..getCreatureName(player.uid)..".") addEvent(function() if not isCreature(player.uid) then return LUA_ERROR end if isPlayer(player.uid) then doSendMagicEffect(getThingPos(player.uid),CONST_ME_POFF) doPlayerSetStorageValue(player.uid,722522.-1) doTeleportThing(player.uid,{x=165,y=59,z=7}) end end,10000) end end for _, focus in pairs(focuses) do if not isCreature(focus) then removeFocus(focus, focuses) talk_step = 0 else local distance = getDistanceTo(focus) or 5 if distance > 4 then selfSay("Hmpf!", focus) removeFocus(focus, focuses) talk_step = 0 end end end setFocus(focuses) end
  24. ta bom, como está seu config.lua neta situação: rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true e você usa stages tbm?

Informação Importante

Confirmação de Termo