Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. 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
  2. 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
  3. claro amg, chegando em casa eu olho, qual distro vc usa e versão do tfs? ou é otx?
  4. tente usar item.type por exemplo qndo tiver mais que 10 parcel if(item.itemid == parcelID and item.type > 10) then
  5. 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
  6. 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
  7. manda sua lib que eu arrumo
  8. @underpunk https://pastebin.com/raw/ZaPQZk8y acho que é o box code do forum bugando os script
  9. 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?
  10. 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..
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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?
  16. n copei td kk https://pastebin.com/raw/Xnhp2fCB
  17. testa esse mod e ve se adc 50% de exp https://pastebin.com/raw/9g3qg6h1
  18. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { s = 11126, -- storage level = 8, -- level minimo time = 1100, -- tempo em minutos para voltar a abrir a chest item = {{7590, 10},{2173, 1},{7589, 10},{7620, 10},{7591, 10},{7588, 10},{7618, 10},{8472, 10},{8473, 10},{2789, 25},{2160, 1},{2152, 25},{2639, 1},{8306, 25},{2268, 25},{2273, 25},{2274, 25},{2214, 1},{2165, 1} } -- items sortiados(pode adicionar mais) } if getPlayerLevel(cid) < config.level then return doPlayerSendCancel(cid, "Você deve ter pelo menos level ".. config.level .." para abrir a Chest.") elseif getPlayerStorageValue(cid, config.s) >= os.time() then local minutos = math.floor((getPlayerStorageValue(cid, config.s) - os.time())/(60)) return doPlayerSendTextMessage(cid, 25, "You already got your reward today, wait ".. (minutos < 0 and 0 or minutos) .." minuts to pick up again.") end local r = math.random(7, #config.item) local item, amount = config.item[r][1], config.item[r][2] doPlayerAddItem(cid, item, amount) doPlayerSendTextMessage(cid, 25, "You Received ".. amount .." "..getItemNameById(item)..", congratulations!") setPlayerStorageValue(cid, config.s, os.time()+config.time*60) doSendMagicEffect(getPlayerPosition(cid), 30) doPlayerSendTextMessage(cid, 22, "You daily reward !") return true end
  19. <?xml version="1.0" encoding="UTF-8"?> <mod name="Simple Task" version="1.0" enabled="yes"> <config name="task_func"> <![CDATA[ monstertable = { ["troll"] = {monster = {"troll", "frost troll", "furious troll", "island troll", "swamp troll", "troll champion", "troll legionnaire"}, startStorage = 200201, storage = 91001, count = 20, experience = 150, money = 300, reward = {{2160, 2}, {2389, 10}}}, ["goblin"] = {monster = {"goblin", "goblin assassin", "goblin leader"}, startStorage = 200202, storage = 91002, count = 30, experience = 200, money = 150, reward = {{1294, 20}}} } function isSummon(cid) return getCreatureMaster(cid); end function checkTask(cid) for k, v in pairs(monstertable) do if getPlayerStorageValue(cid, v.startStorage) >= 1 then return true end end return false end function getItemsFromList(items) local str = '' if table.maxn(items) > 0 then for i = 1, table.maxn(items) do str = str .. items[i][2] .. ' ' .. getItemNameById(items[i][1]) if i ~= table.maxn(items) then str = str .. ', ' end end end return str end function GiveRewardsTask(cid, items) local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID for _, i_i in ipairs(items) do local item, amount = i_i[1],i_i[2] if isItemStackable(item) or amount == 1 then doAddContainerItem(backpack, item, amount) else for i = 1, amount do doAddContainerItem(backpack, item, 1) end end end end function HavePlayerPosition(cid, from, to) return isInRange(getPlayerPosition(cid), from, to) and true or false end ]]> </config> <event type="login" name="TaskLogin" event="script"> <![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "KillTask") return true end ]]> </event> <event type="kill" name="KillTask" event="script"> <![CDATA[ domodlib('task_func') function onKill(cid, target, lastHit) if isMonster(target) and not isSummon(target) then local n = string.lower(getCreatureName(target)) for task, mob in pairs(monstertable) do if getPlayerStorageValue(cid, mob.startStorage) >= 1 then for i = 1, #mob.monster do if n == mob.monster[i] and getPlayerStorageValue(cid, mob.startStorage) >= 1 then local contagem = getPlayerStorageValue(cid, mob.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then return true end if contagem > mob.count then return true end setPlayerStorageValue(cid, mob.storage, contagem+1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, ""..(contagem == mob.count and "Congratulations! You finished the task of "..task.."." or "defeated. Total ["..contagem.."/"..mob.count.."] "..task..".").."") end end end end end return true end ]]> </event> </mod> ------------------ domodlib('task_func') local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local msg = string.lower(msg) if isInArray({"task", "tasks"}, msg) then selfSay("Tell me what the monster's name wants to do the task?", cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if monstertable[msg] then if checkTask(cid) ~= true then local contagem = getPlayerStorageValue(cid, monstertable[msg].storage) if(contagem == -1) then contagem = 1 end if not tonumber(contagem) then selfSay("Sorry, but you're done with the "..msg..".", cid) talkState[talkUser] = 0 return true end setPlayerStorageValue(cid, monstertable[msg].startStorage, 1) selfSay("Congratulations, you are now participating in the "..msg.." task, "..monstertable[msg].count.." "..msg.." left for you to kill.", cid) talkState[talkUser] = 0 else selfSay("Sorry, but you are already part of a task.", cid) talkState[talkUser] = 0 end else selfSay("Enter the correct task name.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, "reward") then if checkTask(cid) then for k, v in pairs(monstertable) do if getPlayerStorageValue(cid, v.startStorage) >= 1 then local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then selfSay("You can only receive items only once.", cid) return true end if (((contagem) -1) >= v.count) then local str = "" if v.experience ~= nil then doPlayerAddExp(cid, v.experience) str = str.."".. (str == "" and "" or ",").. " "..v.experience.." of experience" end if v.money ~= nil then doPlayerAddMoney(cid, v.money) str = str.."".. (str == "" and "" or ",").." "..v.money.." golds" end if v.reward ~= nil then GiveRewardsTask(cid, v.reward) str = str.."".. (str == "" and "" or ", ") ..""..getItemsFromList(v.reward) end selfSay("Thanks for your help, you received "..(str == "" and "none" or ""..str.."").." for completing the task of the "..k..".", cid) setPlayerStorageValue(cid, v.storage, "Finished") setPlayerStorageValue(cid, v.startStorage, 0) setPlayerStorageValue(cid, 521456, getPlayerStorageValue(cid, 521456) == -1 and 1 or getPlayerStorageValue(cid, 521456) + 1) else selfSay("Sorry, but you only killed "..((contagem)-1).." of "..v.count.." "..k..".", cid) end end end else selfSay("You are not participating in any task.", cid) end elseif msgcontains(msg, "leave") then if checkTask(cid) then talkState[talkUser] = 2 for k, v in pairs(monstertable) do if getPlayerStorageValue(cid, v.startStorage) >= 1 then storagesair = v.startStorage local contagem = getPlayerStorageValue(cid, v.storage) if (contagem == -1) then contagem = 1 end if not tonumber(contagem) then selfSay("You are not participating in any task.", cid) else selfSay("You are participating in a "..k.." and already has "..((contagem)-1).." dead "..k..", do you really want to leave?", cid) end end end else selfSay("You are not on any task.", cid) end elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 then setPlayerStorageValue(cid, storagesair, 0) selfSay("You were successfully removed from the task!", cid) elseif msgcontains(msg, "no") then selfSay("Okay then.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  20. e você usa aquele script de double exp para premium né? aquela de onLogin local rate = 1.5 -- 50% local config = { welvip = "Voce e um jogador premium, possui "..((rate - 1)*100).."% a mais de exp do que os jogadores free's", not_vip = "Adquira sua premium em nosso site ntons.sytes.net e obtenha "..((rate - 1)*100).."% a mais de EXP!", } ..... vcoê usa esse? mas o script da potion não funciona quando você da use? porque o script da potion era pra pegar o 1.5 e somar com o 100% no teu caso, fechando 3.0, correto? qndo vc loga(premium) e usa o exp potion, ele nao sobe para 3.0?
  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() 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 focus == cid then 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 focus ~= player.uid then focus = 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 end
  22. 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) 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 focus == cid then 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 focus ~= player.uid then focus = 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 end
  23. additemdepot.lua function doPlayerAddDepotItems(pid, item, count) --By magus and edited by vodkart local item,count = {item},{(count or 1)} for k,v in ipairs(item) do local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1") return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '')") or false end end function onSay(cid, words, param) local t = string.explode(param:lower(),",") if not t[1] then doPlayerSendCancel(cid, "digite Nome, Item ID, quantidade.") return true elseif not getPlayerByNameWildcard(t[1]) and not getPlayerGUIDByName(t[1]) then doPlayerSendCancel(cid, "Você deve digitar um Nome Válido.") return true elseif not tonumber(t[2]) or not tonumber(t[3]) or tonumber(t[3]) < 1 or tonumber(t[3]) > 999 or not isItemStackable(t[2]) and tonumber(t[3]) > 10 then doPlayerSendCancel(cid, "você deve digitar NOME,ID,QUANTIDADE(maior que 0"..(not isItemStackable(t[2]) and " até 10 se não for empilhavel." or " até 1000 se for empilhavel.")..").") return true elseif not isItemMovable(t[2]) or not getItemNameById(tonumber(t[2])) then doPlayerSendCancel(cid, "Este item não existe ou não pode ser adicionado ao jogador.") return true end local player = getPlayerByNameWildcard(t[1]) if player then parcel = doCreateItemEx(ITEM_PARCEL) if isItemStackable(t[2]) or tonumber(t[3]) == 1 then doAddContainerItem(parcel, t[2], t[3]) else for i = 1, t[3] do doAddContainerItem(parcel, t[2], 1) end end doPlayerSendMailByName(getPlayerNameByGUID(getPlayerGUIDByName(t[1])), parcel, 1) else local getPlayer = getPlayerGUIDByName(t[1]) if isItemStackable(t[2]) or tonumber(t[3]) == 1 then doPlayerAddDepotItems(getPlayer, t[2], t[3]) else for i = 1, t[3] do doPlayerAddDepotItems(getPlayer, t[2], 1) end end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você adicionou "..t[3].." "..getItemNameById(t[2]).." ao depot do jogador "..t[1]) return true end TAG <talkaction log="yes" access="5" words="/adddepot" event="script" value="additemdepot.lua"/> Exemplo: /adddepot vodkart,2160,500 or /adddepot vodkart,2494,6 postei isso em 2013 acho la na otland kk https://otland.net/threads/add-items-depot-from-player-online-offline.196947/
  24. posso dar uma olhada no seu script de exp potion e config.lua?

Informação Importante

Confirmação de Termo