Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 10/07/23 em todas áreas

  1. POREM DA DEBUG QUANDO EU LOGO ACCOUNT MANAGER E LOGO CHAR VIP NO MESMO CLIENT 1 SÓ SEM MC EU APERTO CTRL + G LOGO ACCOUNT MANAGER DEPOIS ESCOLHO E LOGO CHAR VIP E DA DEBUG NESSE 1 - SCRIPT: FUNCIONA MAIS DA DEBUG function onLogin(cid) local vipStorage = getPlayerStorageValue(cid, 13545) if vipStorage > 0 then local currentTime = os.time() if vipStorage <= currentTime then setPlayerStorageValue(cid, 13545, -1) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(EddyHavoc, 3 * 1000, cid) end else local daysLeft = math.ceil((vipStorage - currentTime) / (24 * 60 * 60)) local pos = {x = 154, y = 51, z = 7} doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Voce Tem " .. daysLeft .. " Dia de [VIP].") end end return true end 2- NÃO FUNCIONA: function onLogin(cid) local vipStorage = getPlayerStorageValue(cid, 13545) if vipStorage > 0 then local daysLeft = math.ceil((vipStorage - currentTime) / (24 * 60 * 60)) -- Calcula os dias restantes if vipStorage - os.time() <= 0 then setPlayerStorageValue(cid, 13545, -1) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(EddyHavoc, 3 * 1000, cid) end else local pos = {x = 154, y = 51, z = 7} doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") setPlayerStorageValue(cid, 13545, -1) if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(EddyHavoc, 3 * 1000, cid) doPlayerPopupFYI(cid, "Voce ainda tem " .. daysLeft .. " dias de VIP restantes.") end end end return true end [24/09/2023 14:43:47] [VIP] ADM has logged in. [24/09/2023 14:43:47] [Error - CreatureScript Interface] [24/09/2023 14:43:47] data/creaturescripts/scripts/endvip.lua:onLogin [24/09/2023 14:43:47] Description: [24/09/2023 14:43:47] data/creaturescripts/scripts/endvip.lua:5: attempt to perform arithmetic on global 'currentTime' (a nil value) [24/09/2023 14:43:47] stack traceback: [24/09/2023 14:43:47] data/creaturescripts/scripts/endvip.lua:5: in function <data/creaturescripts/scripts/endvip.lua:1> [24/09/2023 14:43:47] [VIP] ADM has logged out.
  2. expbuy 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 local DEATH_TABLE = { before_exp = 0, after_exp = 0 } 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) local itemid, count = 9020, 5 -- Edit the item id and count here if isInArray({"recover", "recuperar", "exp", "experience"}, msg) then npcHandler:say("Do you want to recover lost experience after your death for " .. count .. " " .. getItemNameById(itemid) .. "? {yes}", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, DEATH_TABLE.before_exp) ~= -1 and getPlayerExperience(cid) < getPlayerStorageValue(cid, DEATH_TABLE.before_exp) then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local expToRestore = getPlayerStorageValue(cid, DEATH_TABLE.before_exp) - getPlayerStorageValue(cid, DEATH_TABLE.after_exp) doPlayerAddExp(cid, expToRestore) npcHandler:say("Thank you! Here is your experience.", cid) else npcHandler:say("Sorry, you don't have enough " .. getItemNameById(itemid) .. "!", cid) end else npcHandler:say("Sorry, you didn't die or have already recovered your lost experience.", cid) end talkState[talkUser] = 0 elseif msg == "no" then npcHandler:say("Then not.", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) expbuy otimizado local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local DEATH_TABLE = { before_exp = 0, after_exp = 0 } 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) local itemid, count = 9020, 5 -- Edite o ID e a quantidade do item aqui if isInArray({"recover", "recuperar", "exp", "experience"}, msg) then npcHandler:say("Deseja recuperar a experiência perdida após sua morte por " .. count .. " " .. getItemNameById(itemid) .. "? {yes}", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then local beforeExp = getPlayerStorageValue(cid, DEATH_TABLE.before_exp) local afterExp = getPlayerStorageValue(cid, DEATH_TABLE.after_exp) local playerExp = getPlayerExperience(cid) if beforeExp ~= -1 and playerExp < beforeExp then if doPlayerRemoveItem(cid, itemid, count) == TRUE then local expToRestore = beforeExp - afterExp doPlayerAddExp(cid, expToRestore) npcHandler:say("Obrigado! Aqui está sua experiência perdida de volta.", cid) else npcHandler:say("Desculpe, você não tem itens suficientes " .. getItemNameById(itemid) .. "!", cid) end else npcHandler:say("Desculpe, você não morreu ou já recuperou sua experiência perdida!", cid) end talkState[talkUser] = 0 elseif msg == "no" then npcHandler:say("Então, não.", cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  3. Porem quando eu deslogo e escolho character na lista escolho o char [VIP] as vezes da debug Talkaction: Systemvip.lua function onSay(cid, words, param) if words == "!buyvip" then local price = 20000 if doPlayerRemoveItem(cid, 2159, 20000) == TRUE then local days = 31 local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13545) local timenow = os.time() local time if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end if string.find(tostring(getCreatureName(cid)), "[[VIP]]") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem " .. (quantity < 0 and 0 or quantity) .. " dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(cid, 13545, time) local name = getCreatureName(cid) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você precisa de " .. price .. " [Donate] Coin's para colocar VIP.") end elseif words == "!vipdays" then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem " .. (quantity < 0 and 0 or quantity) .. " dias de VIP no seu character.") elseif words == "/checkvip" then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") else local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem " .. (quantity < 0 and 0 or quantity) .. " dias de VIP no character.") end end end elseif words == "/addvip" then if getPlayerAccess(cid) == 5 then local t = string.explode(param, ",") if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") else local playerName = t[1] local player = getPlayerByName(playerName) local name = getCreatureName(player) local days = tonumber(t[2]) local pid = getPlayerByNameWildcard(playerName) if not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn't exist or is offline.") return TRUE end local daysvalue = days * 3600 * 24 local storageplayer = getPlayerStorageValue(player, 13545) local timenow = os.time() local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue) if string.find(tostring(getCreatureName(pid)), "[[VIP]]") then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adicionados " .. days .. " dias de VIP no seu character.") setPlayerStorageValue(player, 13545, time) local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow) / (3600 * 24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem " .. quantity .. " dias de VIP restantes.") else setPlayerStorageValue(player, 13545, time) db.executeQuery("UPDATE `players` SET `name` = '[VIP] " .. name .. "' WHERE `id` = " .. getPlayerGUID(player) .. ";") doRemoveCreature(player) end end end elseif words == "/delvip" then if getPlayerAccess(cid) == 5 then local dec = MESSAGE_INFO_DESCR if param == "" then return TRUE, doPlayerSendTextMessage(cid, 18, "Command param required.") end local C, t = {}, string.explode(param, ",") C.pos = getPlayerPosition(cid) C.uid = getCreatureByName(t[1]) C.time = ((tonumber(t[2]) == nil) and 1 or tonumber(t[2])) * 3600 * 24 -- Tempo da VIP por dia. C.days = (tonumber(t[2]) == nil) and 1 or tonumber(t[2]) -- Dias de VIP. if getPlayerStorageValue(C.uid, 13545) < C.time then doPlayerSendTextMessage(cid, dec, 'O jogador ' .. t[1] .. ' não possui ' .. C.days .. ' dias de VIP.') else doPlayerSendTextMessage(cid, dec, 'Você removeu ' .. C.days .. ' dias de VIP do player ' .. t[1] .. '.') setPlayerStorageValue(C.uid, 13545, getPlayerStorageValue(C.uid, 13545) - C.time) end doSendMagicEffect(C.pos, math.random(28, 30)) end end return TRUE end Creaturescript: endvip.lua function onLogin(cid) local vipStorage = getPlayerStorageValue(cid, 13545) if vipStorage > 0 then local currentTime = os.time() if vipStorage <= currentTime then setPlayerStorageValue(cid, 13545, -1) doPlayerPopupFYI(cid, "Sua [VIP] Acabou.") if string.find(tostring(getCreatureName(cid)), "%[VIP%]") then addEvent(EddyHavoc, 3 * 1000, cid) end else local daysLeft = math.ceil((vipStorage - currentTime) / (24 * 60 * 60)) -- Calcula os dias restantes local pos = {x = 154, y = 51, z = 7} doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Voce ainda tem " .. daysLeft .. " dias de VIP restantes.") end end return true end
  4. local FOODS, MAX_FOOD = { [11130] = {18, "~|Delicia|~"} }, 1200 function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 6280) then if(fromPosition.x == CONTAINER_POSITION) then fromPosition = getThingPosition(cid) end doCreatureSay(cid, getPlayerName(cid) .. " blew out the candle.", TALKTYPE_MONSTER) doTransformItem(item.uid, item.itemid - 1) doSendMagicEffect(fromPosition, CONST_ME_POFF) return true end local food = FOODS[item.itemid] if(food == nil) then return false end local size = food[1] if(getPlayerFood(cid) + size > MAX_FOOD) then doPlayerSendCancel(cid, "You are full.") return true end doPlayerFeed(cid, size) doCreatureSay(cid, food[2], TALKTYPE_MONSTER) return true end SÓ FALTA TIRA EXAUSTED VOCE ESTA CANSADO E O SOUL DEIXA COM EFFECT OUTFIT DO BOLO E DA CURA HP/MANA playerOriginalOutfit = nil skill = nil magic = nil local function bloodCall (cid, times) if isPlayer (cid) then if times == 0 then doCreatureChangeOutfit(cid, playerOriginalOutfit) return true else doCreatureAddHealth(cid,(12*getCreatureMaxHealth(cid)/100)+(skill*6)+(magic*2)) doCreatureAddMana(cid,(12*getPlayerMaxMana(cid)/100)+(skill*6)+(magic*2)) doSendMagicEffect(getCreaturePosition(cid), 51) addEvent (bloodCall, 1 * 2000, cid, times - 1) end end end local Speed = createConditionObject(CONDITION_HASTE) setConditionParam(Speed, CONDITION_PARAM_TICKS, 30000) setConditionFormula(Speed, 0, 6000, 0, 6000) function onUse(cid, item, frompos, item2, topos) chronos = { lookType = 251,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons } hazus = { lookType = 194,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons } kazard = { lookType = 262,lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons } skill = getPlayerSkill(cid,0) magic = getPlayerMagLevel(cid) Blood = math.random(1,3) -- Exhausted Settings -- local exhausted_seconds = 0 -- Segundos que o blood vai demorar para usar denovo local exhausted_storagevalue = 4850 -- Storage Value do exhausted local exhausted_seconds2 = 0 -- How many seconds local exhausted_storagevalue2 = 9893 -- Storage Value local exhausted_seconds3 = 0 -- How many seconds local exhausted_storagevalue3 = 8162 -- Storage Value local exhausted_seconds4 = 0 -- How many seconds local exhausted_storagevalue4 = 6245 -- Storage Value local exhausted_seconds5 = 0 -- How many seconds local exhausted_storagevalue5 = 15555 -- Storage Value -- Exhausted Settings END -- if getPlayerSoul(cid) <= 49 then doPlayerSendTextMessage(cid,20,'Desculpe, você não tem Souls suficiente.') return true end if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then doPlayerSendTextMessage(cid,20,'Você não pode usar um blood of gods durante o efeito de outro.') return true end if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue2)) then doPlayerSendCancel(cid,"Você está muito cansado.") return true end if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue3)) then doPlayerSendCancel(cid,"Você está muito cansado.") return true end if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue4)) then doPlayerSendCancel(cid,"Está esgotado.") return true end if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue5)) then doPlayerSendCancel(cid,"Você está muito cansado.") return true end blood_configs = { [1] = { addHealth = 15 * getCreatureMaxHealth (cid) / 100, addMana = 15 * getCreatureMaxHealth (cid) / 100, creatureOutfit = chronos, creatureName = "Chronos", say = "~|Delicia|~!", }, [2] = { addHealth = 10 * getCreatureMaxHealth (cid) / 100, addMana = 10 * getCreatureMaxHealth (cid) / 100, creatureOutfit = kazard, creatureName = "Kazard", say = "~|Delicia|~", }, [3] = { addHealth =10 * getCreatureMaxHealth (cid) / 100, addMana = 10 * getCreatureMaxHealth (cid) / 100, creatureOutfit = hazus, creatureName = "Hazus", say = "~|Delicia|~", }, } if (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue2)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue3)) and (os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue4)) then doCreatureAddHealth (cid, blood_configs[Blood].addHealth) doCreatureAddMana (cid, blood_configs[Blood].addMana) playerOriginalOutfit = getCreatureOutfit(cid) doCreatureChangeOutfit(cid, blood_configs[Blood].creatureOutfit) doSendMagicEffect (getCreaturePosition(cid), 12) doPlayerSendTextMessage (cid, 20, "Voce usou um Food e se transformou em um ".. blood_configs[Blood].creatureName .. ". (Revitalization Ativado).") doSendAnimatedText (getCreaturePosition(cid), blood_configs[Blood].say, TALKTYPE_ORANGE_1) end addEvent (bloodCall, 1 * 2000, cid, 15) setPlayerStorageValue (cid, exhausted_storagevalue, os.time() + exhausted_seconds) doPlayerAddSoul(cid,-50) doRemoveItem(item.uid,1) return true end
  5. 1 ponto
    Erro só nesta parte do systemvip perfect vip system 2.0 elseif(words == "/checkvip") then if getPlayerAccess(cid) == 5 then if not param then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") end local player = getPlayerByName(param) if not isPlayer(player) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player "..player.." not found.") end local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(player, 13545) - timenow)/(24 * 60 * 60)) doPlayerPopupFYI(cid, "O jogador tem ".. (quantity < 0 and 0 or quantity) .." dias de VIP no character.") return TRUE end [19/09/2023 23:23:03] [Error - TalkAction Interface] [19/09/2023 23:23:03] data/talkactions/scripts/systemvip.lua:onSay [19/09/2023 23:23:03] Description: [19/09/2023 23:23:03] data/talkactions/scripts/systemvip.lua:47: attempt to concatenate local 'player' (a nil value) [19/09/2023 23:23:03] stack traceback: [19/09/2023 23:23:03] data/talkactions/scripts/systemvip.lua:47: in function <data/talkactions/scripts/systemvip.lua:3> ALGUEM CONSEGUE ARRRUMA ESSE SCRIPT AQUI EM BAIXO --[[ by vodkart ]]-- function onLogin(cid) if getPlayerStorageValue(cid, 13540) - os.time() > 0 then setPlayerStorageValue(cid, 9898, 1) end local pos = {x = 157, y = 50, z = 7} -- posiçao do templo. function Vodka(cid) if isPlayer(cid) then db.executeQuery("UPDATE `players` SET `name` = '"..string.sub(getCreatureName(cid), 7).."' WHERE `id` = "..getPlayerGUID(cid)..";") doRemoveCreature(cid) end end if getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13540) - os.time() < 1 or getPlayerStorageValue(cid, 13540) - os.time() == 0 then doTeleportThing(cid, pos) doPlayerPopupFYI(cid, "Sua vip Account acabou.") setPlayerStorageValue(cid, 9898, -1) if string.find(tostring(getCreatureName(cid)),"[[Vip]]") then addEvent(Vodka, 3*1000, cid) end end return TRUE end
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo