Ir para conteúdo

ViitinG

Membro
  • Registro em

  • Última visita

Solutions

  1. ViitinG's post in (Resolvido)ajuda nascer com vip was marked as the answer   
    Procure antes de criar o tópico amigo !
    http://www.tibiaking.com/forum/topic/2623-creaturescript-ganhar-3-dias-de-premium-ao-logar-pela-primeira-vez/
  2. ViitinG's post in (Resolvido)Nao consigo logar no meu server was marked as the answer   
    Não.O IP 127.0.0.1 é somente para você entrar.
  3. ViitinG's post in (Resolvido)ola como eu tiro o comando /t was marked as the answer   
    Cuidado com double post amigo,você só poder dar UP após 24 horas !
    É só mudar no talkactions.xml está tag,bote o access 3 ou 5 :
    <talkaction log="yes" words="/t" access="3" event="script" value="teleportmaster.lua"/>
  4. ViitinG's post in (Resolvido)Dúvidas Cortina was marked as the answer   
    Coloque ela pelo "Raw Palette>Hangables" ao invés de "Doodad Palette>Hangables".
  5. ViitinG's post in (Resolvido)quando augem morrer no meu baiak was marked as the answer   
    "data/creaturescript/scripts/saveplayer" :
    local config = { savePlayer = true, healPlayerOnLevel = true } function onAdvance(cid, skill, oldLevel, newLevel) if(skill == SKILL__EXPERIENCE) then return true end if(skill == SKILL__LEVEL and config.healPlayerOnLevel) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid)) end if(config.savePlayer) then doPlayerSave(cid, true) end return true end "data/creaturescripts/creaturescripts.xml" :
    <event type="advance" name="SavePlayer event="script" value="saveplayer.lua"/> "data/creaturescripts/scripts/login.lua" :
    registerCreatureEvent(cid, "SavePlayer")
    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → Suporte OTServ → Suporte de OTServ Geral"
    Para: "OTServ → Suporte OTServ → Suporte de Scripts"
  6. ViitinG's post in (Resolvido)Sistema De Refino was marked as the answer   
    Antes de criar um tópico tente pesquisar pelo mesmo amigo !
    Da uma olhada neste : http://www.tibiaking.com/forum/topic/11580-perfect-upgrade-system/
  7. ViitinG's post in (Resolvido)Icon System was marked as the answer   
    Resolvido.
  8. ViitinG's post in (Resolvido)erro deslogando com blatle was marked as the answer   
    Verifica se na pasta "data/creaturescripts/scripts" tem algum script para retirar o battle quando entrar na protection zone.
  9. ViitinG's post in (Resolvido)Área de mergulho ? was marked as the answer   
    Raw Palette>Sea.
  10. ViitinG's post in (Resolvido)Magic Wall nao desaparece! was marked as the answer   
    O tópico foi movido para a área correta, preste mais atenção da próxima vez!
    Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

    Este tópico foi movido:
    De: "OTServ → OTServ Geral"
    Para: "OTServ → Suporte OTServ → Suporte de Scripts"
     
     
    Verifica se a tag do item.xml está assim :
    <item id="1497" article="a" name="magic wall"> <attribute key="type" value="magicfield" /> <attribute key="decayTo" value="0" /> <attribute key="duration" value="20" /> </item>
  11. ViitinG's post in (Resolvido)Não consigo adicionar atributos aos itens was marked as the answer   
    Você tem que adicionar o item no movements.xml amigo.
    Exemplo :
    <movevent type="DeEquip" itemid="8900" slot="shield" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="8900" slot="shield" level="40" event="function" value="onEquipItem"> </movevent
  12. ViitinG's post in (Resolvido)Logout was marked as the answer   
    "data/creaturescripts/creaturescripts.xml" :
    <event type="think" name="Idle" event="script" value="idle.lua"/> "data/creaturescripts/scripts/idle.lua" :
    local config = { idleWarning = getConfigValue('idleWarningTime'), idleKick = getConfigValue('idleKickTime') } function onThink(cid, interval) if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or getPlayerCustomFlagValue(cid, PlayerCustomFlag_AllowIdle)) then return true end local idleTime = getPlayerIdleTime(cid) + interval doPlayerSetIdleTime(cid, idleTime) if(config.idleKick > 0 and idleTime > config.idleKick) then doRemoveCreature(cid) elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes" if(config.idleKick > 0) then message = message .. ", you will be disconnected in " local diff = math.ceil((config.idleWarning - config.idleKick) / 60000) if(diff > 1) then message = message .. diff .. " minutes" else message = message .. "one minute" end message = message .. " if you are still idle" end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".") end return true end "data/creaturescripts/login.lua" :
    registerCreatureEvent(cid, "Idle") Agora é só alterar o tempo no neste local que você citou do config.lua.
  13. ViitinG's post in (Resolvido)Teleport que aparece em X dias was marked as the answer   
    Tenta assim :
    local config = { day = "Monday","Wednesday","Friday","Sunday", pos = {x=151, y=77, z=6}, -- Posição aonde sera criado o teleport topos = {x=550, y=34, z=7}, -- Posição pra onde o teleport ira levar o player time = 5, -- tempo que o teleport ira sumir em minutos msg_open = "The Portal to Hell was opened due to a war between angels and demons, run to the path of the Pits of Hell and kill Luciferus and his demons, the portal will close in 5 minutes.", -- mensagem ao abrir o teleport msg_close = "Lucifer found that some humans have managed to get into his reign and shut the gate." -- mensagem ao fechar o teleport } local function DelTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end function onTimer() if (os.date("%A") == config.day) then doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage(config.msg_open) addEvent(DelTp, config.time*60*1000) addEvent(doBroadcastMessage, config.time*60*1000, config.msg_close) end return true end
  14. ViitinG's post in (Resolvido)Sqllite studio was marked as the answer   
    Tenta atualizar o SQLStudio,pelo que estou vendo ele está na versão 1.1.1 aí !
  15. ViitinG's post in (Resolvido)[Pedido] Mount-ao Clicar no item was marked as the answer   
    Amigo antes de criar um tópico tente procurar pelo que precisa !
    Ve se isso pode te ajudar : http://www.tibiaking.com/forum/topic/31842-item-mount-exclusivo1031-a-1037tfs-10/
  16. ViitinG's post in (Resolvido)Players comando !save was marked as the answer   
    Tente esse aqui então :
    "data/talkactions/scripts/save.lua" :
    local savingEvent = 0 function onSay(cid, words, param) if getPlayerAccess(cid) ~= 0 then if isNumber(param) == TRUE then stopEvent(savingEvent) save(tonumber(param) * 60 * 1000) else saveServer() end end end function save(delay) saveServer() if delay > 0 then savingEvent = addEvent(save, delay, delay) end end "data/talkactions/talkactions.xml" :
    <talkaction words="/save" script="save.lua" />
  17. ViitinG's post in (Resolvido)ERROS BÁSICOS AO INICIAR OT was marked as the answer   
    Isso não é erro nenhum é apenas um warning avisando que não tem as houses dos IDs citados.Não influência em nada mas caso você queira tirar é só remover as houses pelos IDs que mostra no warning.
  18. ViitinG's post in (Resolvido)[AJUDA] Quero Script Pro Pk Sair Com 10 Segundos was marked as the answer   
    Você pode mudar isso no config.lua brother :
    pzLocked = 30 * 1000
  19. ViitinG's post in (Resolvido)[AJUDA] New player área. was marked as the answer   
    Bota para o player quando criar uma nova conta ele nascer no lugar onde pega seus rewards e quando o player entrar no teleport para ir para o templo ele vai virar morador do templo e toda hora que morrer ele vai voltar para o templo e não para o local dos rewards.
    Mude a coordenada do Account Manager para o templo e a coordenada de newplayer para a sala de rewards e no teleport que está na area de reward você bota o actionid 30021 em vermelho você bota o townid da cidade que ele vai virar morador.
  20. ViitinG's post in (Resolvido)Auto Clean e Auto Save was marked as the answer   
    O de save é 3600000 !
    obs : para fazer as contas basta botar "60000xMinutos" no caso "60000x30" para 30 minutos e "60000x60" para uma hora.
     
    @danihcv isto serve para dar clean após um global save,como ele quer um clean em 30 minutos e um save em 1 hora e não 1 hora para os dois,tem que ser feito nos scripts.
  21. ViitinG's post in (Resolvido)New account free vip 5 dias was marked as the answer   
    Tenta assim então :
    function onLogin(cid) local storage,days = (getPlayerAccountId(cid)+550),5 if getGlobalStorageValue(storage) <= 0 then setGlobalStorageValue(storage, 55555) vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(tonumber(days))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!") end return true end
  22. ViitinG's post in (Resolvido)TSF 1.0 NPC BANK {BUG} was marked as the answer   
    Tente trocar seu script por este :
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local Topic, count, transfer = {}, {}, {} 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 local function getCount(s) local b, e = s:find('%d+') return b and e and math.min(4294967295, tonumber(s:sub(b, e))) or -1 end local function findPlayer(name) local q = db.getResult('SELECT name FROM players WHERE name=' .. db.escapeString(name) .. ' LIMIT 1'), nil if q:getID() == -1 then return end local r = q:getDataString('name') q:free() return r end function greet(cid) Topic[cid], count[cid], transfer[cid] = nil, nil, nil return true end function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false elseif msgcontains(msg, 'balance') then npcHandler:say('Your account balance is ' .. getPlayerBalance(cid) .. ' gold.', cid) Topic[cid] = nil elseif msgcontains(msg, 'deposit') and msgcontains(msg, 'all') then if getPlayerMoney(cid) == 0 then npcHandler:say('You don\'t have any gold with you.', cid) Topic[cid] = nil else count[cid] = getPlayerMoney(cid) npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid) Topic[cid] = 2 end elseif msgcontains(msg, 'deposit') then if getCount(msg) == 0 then npcHandler:say('You are joking, aren\'t you??', cid) Topic[cid] = nil elseif getCount(msg) ~= -1 then if getPlayerMoney(cid) >= getCount(msg) then count[cid] = getCount(msg) npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid) Topic[cid] = 2 else npcHandler:say('You do not have enough gold.', cid) Topic[cid] = nil end elseif getPlayerMoney(cid) == 0 then npcHandler:say('You don\'t have any gold with you.', cid) Topic[cid] = nil else npcHandler:say('Please tell me how much gold it is you would like to deposit.', cid) Topic[cid] = 1 end elseif Topic[cid] == 1 then if getCount(msg) == -1 then npcHandler:say('Please tell me how much gold it is you would like to deposit.', cid) Topic[cid] = 1 elseif getPlayerMoney(cid) >= getCount(msg) then count[cid] = getCount(msg) npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid) Topic[cid] = 2 else npcHandler:say('You do not have enough gold.', cid) Topic[cid] = nil end elseif msgcontains(msg, 'yes') and Topic[cid] == 2 then if doPlayerRemoveMoney(cid, count[cid]) then doPlayerSetBalance(cid, getPlayerBalance(cid) + count[cid]) npcHandler:say('Alright, we have added the amount of ' .. count[cid] .. ' gold to your balance. You can withdraw your money anytime you want to.', cid) else npcHandler:say('I am inconsolable, but it seems you have lost your gold. I hope you get it back.', cid) end Topic[cid] = nil elseif msgcontains(msg, 'no') and Topic[cid] == 2 then npcHandler:say('As you wish. Is there something else I can do for you?', cid) Topic[cid] = nil elseif msgcontains(msg, 'withdraw') then if getCount(msg) == 0 then npcHandler:say('Sure, you want nothing you get nothing!', cid) Topic[cid] = nil elseif getCount(msg) ~= -1 then if getPlayerBalance(cid) >= getCount(msg) then count[cid] = getCount(msg) npcHandler:say('Are you sure you wish to withdraw ' .. count[cid] .. ' gold from your bank account?', cid) Topic[cid] = 4 else npcHandler:say('There is not enough gold on your account.', cid) Topic[cid] = nil end elseif getPlayerBalance(cid) == 0 then npcHandler:say('You don\'t have any money on your bank account.', cid) Topic[cid] = nil else npcHandler:say('Please tell me how much gold you would like to withdraw.', cid) Topic[cid] = 3 end elseif Topic[cid] == 3 then if getCount(msg) == -1 then npcHandler:say('Please tell me how much gold you would like to withdraw.', cid) Topic[cid] = 3 elseif getPlayerBalance(cid) >= getCount(msg) then count[cid] = getCount(msg) npcHandler:say('Are you sure you wish to withdraw ' .. count[cid] .. ' gold from your bank account?', cid) Topic[cid] = 4 else npcHandler:say('There is not enough gold on your account.', cid) Topic[cid] = nil end elseif msgcontains(msg, 'yes') and Topic[cid] == 4 then if getPlayerBalance(cid) >= count[cid] then doPlayerAddMoney(cid, count[cid]) doPlayerSetBalance(cid, getPlayerBalance(cid) - count[cid]) npcHandler:say('Here you are, ' .. count[cid] .. ' gold. Please let me know if there is something else I can do for you.', cid) else npcHandler:say('There is not enough gold on your account.', cid) end Topic[cid] = nil elseif msgcontains(msg, 'no') and Topic[cid] == 4 then npcHandler:say('The customer is king! Come back anytime you want to if you wish to withdraw your money.', cid) Topic[cid] = nil elseif msgcontains(msg, 'transfer') then if getCount(msg) == 0 then npcHandler:say('Please think about it. Okay?', cid) Topic[cid] = nil elseif getCount(msg) ~= -1 then count[cid] = getCount(msg) if getPlayerBalance(cid) >= count[cid] then npcHandler:say('Who would you like to transfer ' .. count[cid] .. ' gold to?', cid) Topic[cid] = 6 else npcHandler:say('There is not enough gold on your account.', cid) Topic[cid] = nil end else npcHandler:say('Please tell me the amount of gold you would like to transfer.', cid) Topic[cid] = 5 end elseif Topic[cid] == 5 then if getCount(msg) == -1 then npcHandler:say('Please tell me the amount of gold you would like to transfer.', cid) Topic[cid] = 5 else count[cid] = getCount(msg) if getPlayerBalance(cid) >= count[cid] then npcHandler:say('Who would you like to transfer ' .. count[cid] .. ' gold to?', cid) Topic[cid] = 6 else npcHandler:say('There is not enough gold on your account.', cid) Topic[cid] = nil end end elseif Topic[cid] == 6 then local v = getPlayerByName(msg) if getPlayerBalance(cid) >= count[cid] then if v then transfer[cid] = msg npcHandler:say('Would you really like to transfer ' .. count[cid] .. ' gold to ' .. getPlayerName(v) .. '?', cid) Topic[cid] = 7 elseif findPlayer(msg):lower() == msg:lower() then transfer[cid] = msg npcHandler:say('Would you really like to transfer ' .. count[cid] .. ' gold to ' .. findPlayer(msg) .. '?', cid) Topic[cid] = 7 else npcHandler:say('This player does not exist.', cid) Topic[cid] = nil end else npcHandler:say('There is not enough gold on your account.', cid) Topic[cid] = nil end elseif Topic[cid] == 7 and msgcontains(msg, 'yes') then if getPlayerBalance(cid) >= count[cid] then local v = getPlayerByName(transfer[cid]) if v then doPlayerSetBalance(cid, getPlayerBalance(cid) - count[cid]) doPlayerSetBalance(v, getPlayerBalance(v) + count[cid]) npcHandler:say('Very well. You have transferred ' .. count[cid] .. ' gold to ' .. getPlayerName(v) .. '.', cid) elseif findPlayer(transfer[cid]):lower() == transfer[cid]:lower() then doPlayerSetBalance(cid, getPlayerBalance(cid) - count[cid]) db.executeQuery('UPDATE players SET balance=balance+' .. count[cid] .. ' WHERE name=' .. db.escapeString(transfer[cid]) .. ' LIMIT 1') npcHandler:say('Very well. You have transferred ' .. count[cid] .. ' gold to ' .. findPlayer(transfer[cid]) .. '.', cid) else npcHandler:say('This player does not exist.', cid) end else npcHandler:say('There is not enough gold on your account.', cid) end Topic[cid] = nil elseif Topic[cid] == 7 and msgcontains(msg, 'no') then npcHandler:say('Alright, is there something else I can do for you?', cid) Topic[cid] = nil elseif msgcontains(msg, 'change gold') then npcHandler:say('How many platinum coins would you like to get?', cid) Topic[cid] = 8 elseif Topic[cid] == 8 then if getCount(msg) < 1 then npcHandler:say('Hmm, can I help you with something else?', cid) Topic[cid] = nil else count[cid] = math.min(500, getCount(msg)) npcHandler:say('So you would like me to change ' .. count[cid] * 100 .. ' of your gold coins into ' .. count[cid] .. ' platinum coins?', cid) Topic[cid] = 9 end elseif Topic[cid] == 9 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2148, count[cid] * 100) then npcHandler:say('Here you are.', cid) doPlayerAddItem(cid, 2152, count[cid]) else npcHandler:say('Sorry, you do not have enough gold coins.', cid) end else npcHandler:say('Well, can I help you with something else?', cid) end Topic[cid] = nil elseif msgcontains(msg, 'change platinum') then npcHandler:say('Would you like to change your platinum coins into gold or crystal?', cid) Topic[cid] = 10 elseif Topic[cid] == 10 then if msgcontains(msg, 'gold') then npcHandler:say('How many platinum coins would you like to change into gold?', cid) Topic[cid] = 11 elseif msgcontains(msg, 'crystal') then npcHandler:say('How many crystal coins would you like to get?', cid) Topic[cid] = 13 else npcHandler:say('Well, can I help you with something else?', cid) Topic[cid] = nil end elseif Topic[cid] == 11 then if getCount(msg) < 1 then npcHandler:say('Hmm, can I help you with something else?', cid) Topic[cid] = nil else count[cid] = math.min(500, getCount(msg)) npcHandler:say('So you would like me to change ' .. count[cid] .. ' of your platinum coins into ' .. count[cid] * 100 .. ' gold coins for you?', cid) Topic[cid] = 12 end elseif Topic[cid] == 12 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, count[cid]) then npcHandler:say('Here you are.', cid) doPlayerAddItem(cid, 2148, count[cid] * 100) else npcHandler:say('Sorry, you do not have enough platinum coins.', cid) end else npcHandler:say('Well, can I help you with something else?', cid) end Topic[cid] = nil elseif Topic[cid] == 13 then if getCount(msg) < 1 then npcHandler:say('Hmm, can I help you with something else?', cid) Topic[cid] = nil else count[cid] = math.min(500, getCount(msg)) npcHandler:say('So you would like me to change ' .. count[cid] * 100 .. ' of your platinum coins into ' .. count[cid] .. ' crystal coins for you?', cid) Topic[cid] = 14 end elseif Topic[cid] == 14 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2152, count[cid] * 100) then npcHandler:say('Here you are.', cid) doPlayerAddItem(cid, 2160, count[cid]) else npcHandler:say('Sorry, you do not have enough platinum coins.', cid) end else npcHandler:say('Well, can I help you with something else?', cid) end Topic[cid] = nil elseif msgcontains(msg, 'change crystal') then npcHandler:say('How many crystal coins would you like to change into platinum?', cid) Topic[cid] = 15 elseif Topic[cid] == 15 then if getCount(msg) == -1 or getCount(msg) == 0 then npcHandler:say('Hmm, can I help you with something else?', cid) Topic[cid] = nil else count[cid] = math.min(500, getCount(msg)) npcHandler:say('So you would like me to change ' .. count[cid] .. ' of your crystal coins into ' .. count[cid] * 100 .. ' platinum coins for you?', cid) Topic[cid] = 16 end elseif Topic[cid] == 16 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid, 2160, count[cid]) then npcHandler:say('Here you are.', cid) doPlayerAddItem(cid, 2152, count[cid] * 100) else npcHandler:say('Sorry, you do not have enough crystal coins.', cid) end else npcHandler:say('Well, can I help you with something else?', cid) end Topic[cid] = nil elseif msgcontains(msg, 'change') then npcHandler:say('There are three different coin types in Tibia: 100 gold coins equal 1 platinum coin, 100 platinum coins equal 1 crystal coin. So if you\'d like to change 100 gold into 1 platinum, simply say \'{change gold}\' and then \'1 platinum\'.', cid) Topic[cid] = nil elseif msgcontains(msg, 'bank') then npcHandler:say('We can change money for you. You can also access your bank account.', cid) Topic[cid] = nil end return true end npcHandler:setCallback(CALLBACK_GREET, greet) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  23. ViitinG's post in (Resolvido)Portas não abrem [PowerBox GVT] was marked as the answer   
    Tem uma nova versão do modem PowerBox GVT que ta impedindo de liberar porta,o site fala que a porta está liberada mas na verdade não está,deve ser o seu caso..
    Tente ligar para GVT e pedir para eles desbloquearem para você,sei que é chato mas acho que só assim mesmo ou então tenta fazer o procedimento todo denovo de liberar porta e habilitar o DMZ e tenta reiniciar o modem após fazer tudo !
  24. ViitinG's post in (Resolvido)Alguns Players Vindo Pelado was marked as the answer   
    Caso precise do script de first item :
    "data/creaturescript/firstitems.lua"
    local commonItems = { -- ITEMS ALL VOCS RECEIVE {itemid=2480, count=1}, -- legion helmet {itemid=2464, count=1}, -- chain armor {itemid=2468, count=1}, -- studded legs {itemid=2643, count=1}, -- leather boots {itemid=2120, count=1}, -- rope {itemid=5710, count=1} -- shovel } local firstItems = { { -- SORC ITEMS {itemid=2190, count=1}, -- wand of vortex {itemid=2175, count=1} -- spellbook }, { -- DRUID ITEMS {itemid=2182, count=1}, -- snakebite rod {itemid=2175, count=1} -- spellbook }, { -- PALADIN ITEMS {itemid=2456, count=1}, -- bow {itemid=2544, count=100} -- 100 arrows }, { -- KNIGHT ITEMS {itemid=2412, count=1}, -- katana {itemid=2530, count=1} -- copper shield } } for _, items in ipairs(firstItems) do for _, item in ipairs(commonItems) do table.insert(items, item) end end local storage = 35353 function onLogin(cid) if getPlayerGroupId(cid) < 3 then local receivedItems = getPlayerStorageValue(cid, storage) if receivedItems == -1 then --[[local backpack = ]]doPlayerAddItem(cid, 1988, 1) local giveItems = firstItems[getPlayerVocation(cid)] if giveItems ~= nil then for _, v in ipairs(giveItems) do --doAddContainerItem(backpack, v.itemid, v.count or 1) doPlayerAddItem(cid, v.itemid, v.count or 1) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved your first items!") end setPlayerStorageValue(cid, storage, 1) end return true end
  25. ViitinG's post in (Resolvido)[AJUDA] Item que ganha dias de vip (Sistema Mock) was marked as the answer   
    "data/actions/scripts/ganharvip"
    function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- dias que serão adicionados local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 55555) local timenow = os.time() if getPlayerStorageValue(cid, 55555) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(cid, 55555, time) local quantity = math.floor((getPlayerStorageValue(cid, 55555) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end "data/actions/actions.xml"
    <action itemid="IDDOITEM" script="ganharvip.lua"/>

Informação Importante

Confirmação de Termo