Tudo que Muvukaa postou
-
(Resolvido)[RESOLVIDO] [SQLite] -=[TFS]=- [TALKACTION] - 0.4 8.60 Advanced Poll System AJUDA SOCORRO
Não pego esses comandos no seu script Mateus Robeerto /endpoll [14/03/2024 11:33:46] [Error - TalkAction Interface] [14/03/2024 11:33:46] data/talkactions/scripts/pollsystem.lua:onSay [14/03/2024 11:33:46] Description: [14/03/2024 11:33:46] data/talkactions/scripts/pollsystem.lua:32: bad argument #1 to 'ipairs' (table expected, got number) [14/03/2024 11:33:46] stack traceback: [14/03/2024 11:33:46] [C]: in function 'ipairs' [14/03/2024 11:33:46] data/talkactions/scripts/pollsystem.lua:32: in function 'getMostVotedOption' [14/03/2024 11:33:46] data/talkactions/scripts/pollsystem.lua:122: in function <data/talkactions/scripts/pollsystem.lua:41> /poll [14/03/2024 11:33:47] [Error - TalkAction Interface] [14/03/2024 11:33:47] data/talkactions/scripts/pollsystem.lua:onSay [14/03/2024 11:33:47] Description: [14/03/2024 11:33:47] data/talkactions/scripts/pollsystem.lua:112: bad argument #1 to 'ipairs' (table expected, got number) [14/03/2024 11:33:47] stack traceback: [14/03/2024 11:33:47] [C]: in function 'ipairs' [14/03/2024 11:33:47] data/talkactions/scripts/pollsystem.lua:112: in function <data/talkactions/scripts/pollsystem.lua:41> @Mateus Robeerto
-
(Resolvido)[RESOLVIDO] [SQLite] -=[TFS]=- [TALKACTION] - 0.4 8.60 Advanced Poll System AJUDA SOCORRO
error em todos os comandos. [13/03/2024 15:38:53] data/talkactions/scripts/pollsystem.lua:onSay [13/03/2024 15:38:53] Description: [13/03/2024 15:38:53] data/talkactions/scripts/pollsystem.lua:15: attempt to call field 'unserialize' (a nil value) [13/03/2024 15:38:53] stack traceback: [13/03/2024 15:38:53] data/talkactions/scripts/pollsystem.lua:15: in function 'getMostVotedOption' [13/03/2024 15:38:53] data/talkactions/scripts/pollsystem.lua:103: in function <data/talkactions/scripts/pollsystem.lua:27> local POLL_STORAGE = 80000 local OPTIONS_STORAGE = 80001 local PLAYER_STORAGE = 80000 local function getTotalVotes() local options = table.unserialize(getStorage(OPTIONS_STORAGE)) local amount = 0 for _, option in ipairs(options) do amount = amount + option[2] end return amount end local function getMostVotedOption() local options = table.unserialize(getStorage(OPTIONS_STORAGE)) local value, ret = 0 for _, option in ipairs(options) do if option[2] > value then value = option[2] ret = option[1] end end return ret end function onSay(cid, words, param, channel) param = param or "" if param == "" and not words == "/poll" then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The command ".. words .." need parameters.") end local parameters, vote = {} if(words == "/newpoll") then if getStorage(POLL_STORAGE) ~= -1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, but there is a poll in progress.\nIf you want to start a new poll, type /endpoll.") end parameters = string.explode(param, ",") if #parameters < 3 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The command /newpoll needs a poll and at least two options.") end if parameters[1] then local options = {} for i = 2, #parameters do table.insert(options, {parameters[i], 0}) end if #options < 2 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Insert at least two options after the poll") end doSetStorage(POLL_STORAGE, parameters[1]) options = table.serialize(options) doSetStorage(OPTIONS_STORAGE, options) doBroadcastMessage("A new poll is in progress with the title '".. getStorage(POLL_STORAGE) .."?'!\nSee the status with /poll and vote with /vote.") end elseif(words == "/vote") then vote = tonumber(param) or -1 local options = table.unserialize(getStorage(OPTIONS_STORAGE)) if getStorage(POLL_STORAGE) == -1 then return doPlayerSendCancel(cid, "There is not a poll in progress.") end if vote == -1 then return doPlayerSendCancel(cid, "You need to choose a option to vote.") end if getCreatureStorage(cid, PLAYER_STORAGE) == 1 then print(getCreatureStorage(cid, PLAYER_STORAGE)) return doPlayerSendCancel(cid, "You cannot vote two times.") end if vote > #options then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE) end options[vote][2] = options[vote][2] + 1 doSetStorage(OPTIONS_STORAGE, table.serialize(options)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have voted in the option ".. options[vote][1] .." successfully!") doCreatureSetStorage(cid, PLAYER_STORAGE, 1) elseif(words == "/poll") then local options = table.unserialize(getStorage(OPTIONS_STORAGE)) if getStorage(POLL_STORAGE) == -1 then return doPlayerSendCancel(cid, "There is not a poll in progress.") end local text = "ADVANCED poll SYSTEM\n\n".. getStorage(POLL_STORAGE) .."?\n" local count = 1 for _, option in ipairs(options) do text = text .."\n#".. count .." ".. option[1] .." ".. (getTotalVotes() == 0 and 0 or math.floor((option[2]/getTotalVotes()) * 100)) .."%\n" count = count + 1 end doPlayerPopupFYI(cid, text) elseif(words == "/endpoll") then if getStorage(POLL_STORAGE) == -1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "There is not a poll to be ended.") end if not getMostVotedOption() then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wait at least one vote to end this poll.") end doBroadcastMessage("The poll '".. getStorage(POLL_STORAGE) .."?' has been finished!\nThe most voted option was ".. getMostVotedOption() ..".") doSetStorage(POLL_STORAGE, -1) doSetStorage(OPTIONS_STORAGE, -1) for _, player in ipairs(getPlayersOnline()) do doCreatureSetStorage(player, PLAYER_STORAGE, -1) end db.executeQuery("UPDATE `player_storage` SET value = -1 WHERE `key` = ".. PLAYER_STORAGE ..";") end return true end
-
[RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Não to conseguindo usa o comando !character list
<?xml version="1.0" encoding="UTF-8"?> <mod name="Characters Market System" version="1.0" author="LuckOake" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="market"><![CDATA[ price = 27112 owner = 27113 level = 30 -- Level min of character.-- min_price = 100 -- Price min of character-- max_price = 1000000 -- Price maximum of character-- function doTransferCharacter(cid, accId) return db.executeQuery("UPDATE `players` SET `account_id` = "..accId.." WHERE `id` = "..getPlayerGUIDByName(cid).."") end function doOfflinePlayerAddMoney(guid, money) return db.executeQuery("UPDATE `players` SET `balance` = `balance` + '"..money.."' WHERE `id` = '"..getPlayerGUIDByName(guid).."';") end function setOfflinePlayerStorageValue(name, key, value) local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. getPlayerGUIDByName(name) .." AND `key` = ".. key ..";") if result:getID() == -1 then return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (".. getPlayerGUIDByName(name) ..", ".. key ..", ".. value ..");") else result:free() return db.executeQuery("UPDATE `player_storage` SET `value` = ".. value .." WHERE `player_id` = ".. getPlayerGUIDByName(name) .." AND `key` = ".. key ..";") end end function getOfflinePlayerStorageValue(name, key) local result, ret = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = '".. getPlayerGUIDByName(name) .."' AND `key` = ".. key ..";") if result:getID() == -1 then return nil end ret = result:getDataInt("value") result:free() return ret end function getOfflinePlayerValue(name, value) local result, ret = db.getResult("SELECT `"..value.."` FROM `players` WHERE `id` = "..getPlayerGUIDByName(name)..";") ret = result:getDataInt(value) result:free() return ret end function isCharacterForSale(name) if not getOfflinePlayerStorageValue(name, price) or getOfflinePlayerStorageValue(name, price) < 1 then return false else return true end end ]]></config> ------------------------------------------------------------------------------------ <talkaction words="!character" event="buffer"><![CDATA[ domodlib('market') local t = string.explode(param, ",") if t[1] == "sell" then if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true elseif getPlayerByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true elseif getOfflinePlayerValue(t[2], "level") < level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true elseif tonumber(t[3]) < min_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price..".") return true elseif tonumber(t[3]) > max_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price..".") return true end setOfflinePlayerStorageValue(t[2], price, t[3]) setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" gold coins.') elseif t[1] == "buy" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif not playerExists(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true elseif not doPlayerRemoveMoney(cid, getOfflinePlayerStorageValue(t[2], price)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough money. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." gold coins.") return true end if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then doOfflinePlayerAddMoney(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2])) else doPlayerAddMoney(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) doPlayerSendTextMessage(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" has been sold for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') end doTransferCharacter(t[2], getPlayerAccountId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought the character "'..t[2]..'" for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') setOfflinePlayerStorageValue(t[2], owner, -1) setOfflinePlayerStorageValue(t[2], price, -1) return true elseif t[1] == "remove" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true end setOfflinePlayerStorageValue(t[2], price, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You removed the character "'..t[2]..'" from the Characters Market.') return true elseif t[1] == "list" then local result = db.getResult("SELECT `name` FROM `players`") if result:getID() == -1 then return true end local msg = "Characters for Sale:\n\n" while true do local name = result:getDataString("name") if isCharacterForSale(name) then local sex = getOfflinePlayerValue(name, "sex") == 1 and "Male" or "Female" msg = ""..msg.." - ".. name .." (Level: "..getOfflinePlayerValue(name, "level").." / Vocation: "..getVocationInfo(getOfflinePlayerValue(name, "vocation")).name.." / Sex: "..sex.." / Owner: "..getPlayerNameByGUID(getOfflinePlayerStorageValue(name, owner))..") [Price: "..getOfflinePlayerStorageValue(name, price).."] \n" end if not result:next() then break end end doPlayerPopupFYI(cid, msg) return true elseif not t[1] or t[1] ~= "buy" or t[1] ~= "sell" or t[1] ~= "remove" or t[1] ~= "list" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect params. You can only 'buy' or 'sell' a character, 'remove' it from the Characters Market or see the 'list' of characters for sale.") return true end return true ]]></talkaction> ------------------------------------------------------------------------------------ <event type="login" name="MarketLogin" event="script"><![CDATA[ function onLogin(cid) domodlib('market') if getPlayerStorageValue(cid, price) > 0 then return false elseif getPlayerStorageValue(cid, 41792) ~= -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sold the character "..getPlayerNameByGUID(getPlayerStorageValue(cid, 41792))..". The money is in your bank account.") setPlayerStorageValue(cid, 41792, -1) end return true end ]]></event> </mod> APARECE ISSO NO CONSOLE [11/03/2024 08:49:51] [Error - TalkAction Interface] [11/03/2024 08:49:52] buffer [11/03/2024 08:49:52] Description: [11/03/2024 08:49:52] [string "price = 27112..."]:26: attempt to concatenate a nil value
-
[RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Transforma MYSQL em SQLITE cleanhouses
<?xml version="1.0" encoding="UTF-8"?> <mod name="Cleanhouses" version="1.03" author="nsanee" contact="tibiaking.com" enabled="no"> <description> v.1.03 - Added 'onlyNonPremium' configurable. Removed modlib, since the script is run once anyway we don't need it loaded at all times. It shouldn't now stop execution when a house is nameless. v.1.02 - now uses only one sql query, removed multiworld configurable since it's not needed anymore v.1.01 - small fixes, optimized query + multiworld support. This mod will clean houses of inactive players and move their items to the depot. config explained: days - If the player hasn't logged in for this number of days his house will be freed. log - true/false, whether to enable logging of which houses have been cleaned. file - path to the log file, where logs will be stored. Ignored if 'log' set to false onlyNonPremium - if set to 'true', the script will clean only the houses of players who don't have any pacc days left. other notes: DO NOT remove doSaveServer() at the end, otherwise if your server happens to crash before the nearest server save you will regret it =) </description> <globalevent name="cleanhouses" type="start" event="buffer"><![CDATA[ local config = { days = 15, log = true, file = getDataDir() .. "/logs/cleanhouses.txt", onlyNonPremium = true } local ns_query =[[ SELECT houses.owner, houses.id as hid, houses.name as house_name ,players.name FROM houses LEFT JOIN players ON players.id=houses.owner LEFT JOIN accounts ON players.account_id=accounts.id WHERE players.lastlogin < (UNIX_TIMESTAMP() - ]] ..config.days.. [[*24*60*60) ]] ..(config.onlyNonPremium and ' AND accounts.premdays=0 ' or '')..[[ AND players.world_id =]] .. getConfigValue("worldId") local house = db.getResult(ns_query) local logs = " :: Houses cleaned:\n\n" if house:getID() ~= -1 then repeat logs = logs .. house:getDataString('house_name') ..", owned by " .. house:getDataString('name') .. "\n" setHouseOwner(house:getDataInt('hid'), 0) until not house:next() house:free() else logs = logs .. "There were no houses to clean." end if config.log then doWriteLogFile(config.file, logs) end addEvent(doSaveServer, 1000) ]]></globalevent> </mod>
-
[RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Minha Stamina Refil e Stamina Infinita o Potion não enche in game só enche quando desloga e loga
function onLogin(cid) local bless = {"First Bless,", "Second Bless,", "Third Bless,", "Fourth Bless,", "Fifth Bless."} local check = "Received blessings: " local hasBlessings = false for i = 1, #bless do if getPlayerBlessing(cid, i) then check = check .. bless[i] hasBlessings = true end end if hasBlessings then doPlayerSendTextMessage(cid, 20, check) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "[Warning] - You are not blessed, use the command [!bless].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "[Warning] - You are not blessed, use the command [!bless].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, "[Warning] - You are not blessed, use the command [!bless].") end return true end Consegui script porem rodapé não aparece mensagem só aparece vermelho warning e no server log eu queria que aparecesse rodapé
-
[RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Minha Stamina Refil e Stamina Infinita o Potion não enche in game só enche quando desloga e loga
STAMINA REFIL function onUse(cid, item, frompos, item2, topos) doPlayerAddStamina(cid, 2520) -- 2520 = 42 horas, se você colocar 1 o item ira curar 1 minuto da stamina. doCreatureSay(cid, "O Jogador "..getPlayerName(cid).." usou uma stamina [UP]." ,19) doSendMagicEffect(frompos, 36) -- Efeito, para mudar basta alterar o número 1 para o efeito que você quiser, /z 1 para ver o efeito no tibia. doRemoveItem(item.uid, 1) -- Se quiser que o item fique infinito, basta alterar o número 1 para 0 return 1 end STAMINA INFINITA function onUse(cid, item, frompos, item2, topos) doPlayerAddStamina(cid, 2520) -- 2520 = 42 horas, se você colocar 1 o item ira curar 1 minuto da stamina. doCreatureSay(cid, "O Jogador "..getPlayerName(cid).." usou uma stamina up Infinita." ,19) doSendMagicEffect(frompos, 47) -- Efeito, para mudar basta alterar o número 1 para o efeito que você quiser, /z 1 para ver o efeito no tibia. doRemoveItem(item.uid, 0) -- Se quiser que o item fique infinito, basta alterar o número 1 para 0 return 1 end Config.lua rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true Só enche quando desloga e loga quando ta jogando in game não enche tudo na hora.
-
(Resolvido)-=[TFS]=- 0.4 8.60 NPC PROMOTION COM MOEDA VIP 11192 SÓ PODE COMPRA PROMOTION SE TIVER 100 MOEDAS VIP
-=[TFS]=- 0.4 8.60 NPC PROMOTION COM MOEDA VIP 11192 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce Tem Que Ter 100 [VIP COINS]. E Ter Level 717217!'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 100, level = 717217, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new())
-
[RESOLVIDO] [PEDIDO] Servidor de Tibia Que Tem Magia lavaglume e Magia de 50 Reset 60 Reset 70 Reset 90 Reset 90 Reset até 1k reset
[PEDIDO] Servidor de Tibia Que Tem magia lavaglume e Magia de 50 Reset 60 Reset 70 Reset 90 Reset 90 Reset até 1k reset
-
[RESOLVIDO] - [SQLite] -=[TFS]=- 0.4 8.60 Problema com npc Scrutinon
alguem pode resolve esse problema pra mim
-
[RESOLVIDO] - [SQLite] -=[TFS]=- 0.4 8.60 Problema com npc Scrutinon
Alguém pode me ajudar?
-
[RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Item X que deixa com bless infinita -|||- Alguém me Ajuda a Cria um Item Que da Bless Infinita
[SQLite] -=[TFS]=- 0.4 8.60 Item X que deixa com bless infinita
-
[SQLite] -=[TFS]=- 0.4 8.60 [MODS] cleanhouse SQLite
Eu to usando cleanhouse do outro forum porem só pega mysql não pega sqlite alguém pode fazer pegar em sqlite cleanhouses.xml
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [CREATURESCRIPT] VIP Days Não Funciona Alguem Pode me Ajuda
local configZero = { storageOneInLife = 13545, -- to win only once in a lifetime message = "PARABENS!!\nVoce ganhou 2 dias VIP!", -- message vipStorage = 13545, -- vip storage vipDays = 2, -- vip days } function onLogin(cid) if getPlayerStorageValue(cid, configZero.storageOneInLife) < 1 then local currentVipTime = getPlayerStorageValue(cid, configZero.vipStorage) local newVipTime = os.time() + (configZero.vipDays * 24 * 60 * 60) setPlayerStorageValue(cid, configZero.vipStorage, currentVipTime + newVipTime) local days = configZero.vipDays doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, configZero.message) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu um " .. days .. " dias de VIP, bom jogo!") -- Broadcast to all players doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O jogador " .. getPlayerName(cid) .. " recebeu " .. days .. " dias de VIP, bom jogo!") end return true end @GM Vortex esse aqui pego mais fica aparecendo memsagens status vip no account manager local configZero = { storageOneInLife = 135545, -- pra ganhar só 1 vez na vida message = "PARABENS!!\nVoce ganhou 2 dias VIP!", -- message messageType = MESSAGE_INFO_DESCR, vipStorage = 13545, -- storage vip vipDays = 2, -- dias vip accountManagerVerify = true, -- muda para false se não funcionar } function onLogin(cid) if configZero.accountManagerVerify then if getCreatureName(cid) == "Account Manager" then return true -- para não afetar o account manager end end if getPlayerStorageValue(cid, configZero.storageOneInLife) < 1 then local currentVipTime = getPlayerStorageValue(cid, configZero.vipStorage) local newVipTime = os.time() + (configZero.vipDays * 24 * 60 * 60) setPlayerStorageValue(cid, configZero.vipStorage, currentVipTime + newVipTime) setPlayerStorageValue(cid, configZero.storageOneInLife, 1) doPlayerSendTextMessage(cid, configZero.messageType, configZero.message) end return true end EU QUERIA QUE FUNCIONASSE SÓ POR 1 CONTA QUE CRIA E PRA 1 PERSONAGEM E NAO CRIA OUTROS PERSONAGENS E GANHA VIP SOMENTE PRA 1 CONTA E PRA 1 PERSONAGEM QUE CRIA NA CONTA SE CRIA OUTRO PERSONAGEM NAO GANHA VIP. NÃO PEGO!
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [CREATURESCRIPT] VIP Days Não Funciona Alguem Pode me Ajuda
@Vodkart TALKACTION SYSTEMVIP: function onSay(cid, words, param) if words == "!buyvip" then -- Check player with VIP if getPlayerStorageValue(cid, 13545) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já tem vip, espere seu tempo acabar, para verificar com !vipdays.") return true end local itemid = 2159 local count = 100000 if doPlayerRemoveItem(cid, itemid, count) 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 [" .. count .. " " .. getItemNameById(itemid) .. "] para colocar VIP.") end elseif words == "!vipdays" then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end 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)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") 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 else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") 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)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end end return true end MOVEMENTS TILE: -- Script Vip Sytem 1.0 -- function onStepIn(cid, item, position, fromPosition) local config = { msgDenied = "Voce Nao e [VIP] Digite !buyvip 100k [Donate] Coin.", msgWelcome = "Seja Bem Vindo a Área -=[VIP]=-" } if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgDenied) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return TRUE end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome) return TRUE end @GM Vortex [09/01/2024 19:50:13] [Error - CreatureScript Interface] [09/01/2024 19:50:13] data/creaturescripts/scripts/meupix.lua:onLogin [09/01/2024 19:50:13] Description: [09/01/2024 19:50:13] data/creaturescripts/scripts/meupix.lua:23: attempt to call global 'addVipDays' (a nil value) [09/01/2024 19:50:13] stack traceback: [09/01/2024 19:50:13] data/creaturescripts/scripts/meupix.lua:23: in function <data/creaturescripts/scripts/meupix.lua:1> [09/01/2024 19:50:13] Account Manager has logged out. [09/01/2024 19:50:13] [Error - CreatureScript Interface] [09/01/2024 19:50:13] In a timer event called from: [09/01/2024 19:50:13] data/creaturescripts/scripts/login.lua:onLogin [09/01/2024 19:50:13] Description: [09/01/2024 19:50:13] (luaGetCreatureName) Creature not found
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [CREATURESCRIPT] VIP Days Não Funciona Alguem Pode me Ajuda
@Karliin não funciono
-
(Resolvido)[SQLite] -=[TFS]=- 0.4 8.60 [CREATURESCRIPT] VIP Days Não Funciona Alguem Pode me Ajuda
To com problema nesse script ele fala no jogo que adiciono mais quando vo pro pizo que ta action ID 13545 unique ID 13545 não entra não funciona esse Script. Ele funciona assim adiciona 2 Dias de vip pro player em na pasta creaturescript to tentando ajuda CHATGPT -- Função para adicionar dias VIP a um jogador function addVipDays(cid, days) -- Adicione sua lógica para lidar com a funcionalidade VIP aqui -- Para fins de demonstração, apenas enviaremos uma mensagem doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce recebeu " .. days .. " dias de VIP.") -- Adicione a lógica real para definir o status VIP ou outras ações necessárias end function onLogin(cid) local storage, days = (getPlayerAccountId(cid) + 550), 1 if getGlobalStorageValue(storage) <= 0 then setGlobalStorageValue(storage, 13545) -- Chame as funções personalizadas para funcionalidade VIP addVipDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce recebeu um " .. days .. " dias de VIP, bom jogo!") end return true end To usando esse script como base: function onLogin(cid) local storage,days = (getPlayerAccountId(cid)+550),1 if getGlobalStorageValue(storage) <= 0 then setGlobalStorageValue(storage, 1) addVipDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu um "..days.." dias de vip, bom jogo!") end return true end
-
(Resolvido)[SQLite] -=[TFS]=- [GLOBALEVENTS] 0.4 8.60 NÃO APARECE NO CONSOLE BROADCAST OS RESETS SÓ APARECE PLAYER LVL RESET [-1] E O PLAYER TEM 68 RESETS E MESMO ASSIM NAO APARECE
NÃO APARECE OS RESETS TOPILEVEL.lua [GLOBALEVENTS] local maxPlayers = 5 function onThink(interval, lastExecution) local t, ret = {}, "TOP " .. math.min(maxPlayers, getWorldCreatures(0)) .. " Rank Level e Reset (LIVE):\n" for _, cid in ipairs (getPlayersOnline()) do table.insert(t, {cid, getPlayerLevel(cid)}) end table.sort(t, function(a, b) return a[2] > b[2] end) for i = 1, math.min(#t, maxPlayers) do local pid = t[i][1] ret = ret .. "\n" .. i .. " - " .. getCreatureName(pid) .. ": Level: [" .. t[i][2] .. "] - Reset: ["..getPlayerStorageValue(pid, 54676).."]" end return doBroadcastMessage(ret) end Reset System.lua [TALKACTION] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = true, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = true, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = false, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = true, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 54676, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- Não Mude. lvl = 717217, -- Level Necessário para Resetar. [valor] lvlreset = 1, -- Level que retornará após o Reset. [valor] limite = 101, -- Máximo de resets que um player pode chegar. [valor] newClasse = 0, -- Id da Nova Vocação após o Reset. [valor] tempo = 0 }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 0 then resets = 0 end return resets end local resets = getResets(cid) local needLvl ="Você precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar! Você será deslogado em "..config.resetStatus.tempo.." Segundos." --[Condiçoes]__ local storageKey = 13545 if getCreatureStorage(cid, storageKey) < os.time() then doPlayerPopupFYI(cid, "Somente Player VIP Account.") return true elseif(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.") return TRUE elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif doPlayerSendCancel(cid, needLvl) then doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end --[By: Linnux]__
-
[RESOLVIDO] Alguem sabe me dizer que ot é esse rebirth-highexp.com
rebirth-highexp.com Spells for Level 1000 Obscure Druid Buff - (200Reset) : 6 Mega Druid Buff - (100Reset) : 4 High Druid Buff - (600Reset) : 7 Power Druid Buff - (40Reset) : 2 Angel Druid Buff - (300Reset) : 7 Ultra Druid Buff - (70Reset) : 3 Zed Druid Buff - (500Reset) : 7 Supreme Druid Buff - (150Reset) : 5 Super Druid Buff - (10Reset) : 1 Top Druid Buff - (400Reset) : 7 Spells for Level 1500 exevo gran mas mort - Death Winter : 1050 Spells for Level 1800 Crystalize - (Target250Reset) : 25 Holy Strike - (Target20Reset) : 20 Holy Wave - (Target50Reset) : 22 Holy Sphere - (Target100Reset) : 23 Infernium Absolut - (Target150Reset) : 23 Vego Ancient - (Target500Reset) : 2600 High Final - (Target600Reset) : 2600 Final Ancient - (Target300Reset) : 2600 Top Ancient - (Target400Reset) : 2600 Supreme Nature - (Target200Reset) : 24 Spells for Level 2000 Glacial - (10Reset) : 1000 Spells for Level 2500 Water Splash - (25Reset) : 1100 Spells for Level 3000 Lavaplume - (40reset) : 1500 Spells for Level 3100 Nevask - (70Reset) : 2500 Spells for Level 3200 Poison Flux - (100reset) : 2000 Spells for Level 3300 Justice Blast - (150reset) : 2000 Spells for Level 3400 Drain Blood - (200Reset) : 2000 Spells for Level 3500 Ancient - (250Reset) : 2000 Spells for Level 4000 Tablen - (350Reset) : 2000 Spells for Level 4500 Kisber - (450Reset) : 2000 Spells for Level 5000 Smoke Nar - (550Reset) : 2000
-
[SQLite] -=[TFS]=- 0.4 8.60 ME AJUDA POR FAVOR PROBLEMA EM CRIA GUILD
sqlite
-
[SQLite] -=[TFS]=- 0.4 8.60 ALGUEM SABE A QUERY PRA CRIA TABLE GUILDS
- [SQLite] -=[TFS]=- 0.4 8.60 ME AJUDA POR FAVOR PROBLEMA EM CRIA GUILD
Obrigado funciono.- [SQLite] -=[TFS]=- 0.4 8.60 ME AJUDA POR FAVOR PROBLEMA EM CRIA GUILD
[27/10/2023 14:20:40] sqlite3_step(): SQLITE ERROR: INSERT on table "guild_ranks" violates foreign: "guild_id"- [SQLite] -=[TFS]=- 0.4 8.60 Não funciona [Movements]
function onStepIn(cid, item, position, fromPosition) if getPlayerGuildId(cid) > 0 then if getPlayerLevel(cid) >= 717217 then if getPlayerStorageValue(cid, 13545) - os.time() <= 0 then doPlayerSendTextMessage(cid, 22, "WELCOME!") doSendMagicEffect(getCreaturePosition(cid), 28) else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser level 717217 ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa ser VIP ou falar com o ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid, 22, "Você precisa fazer parte de alguma guild ou fala com ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end return TRUE end [ORIGINAL] function onStepIn(cid, item, position, fromPosition) if getPlayerGuildId(cid) > 0 then if getPlayerLevel(cid) >= 717217 then doPlayerSendTextMessage(cid,22,"WELCOME!") doSendMagicEffect(getCreaturePosition(cid), 28) else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid,22,"Voce precisa ser level 717217 ou fala pro ADM para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end else doTeleportThing(cid, fromPosition) doPlayerSendTextMessage(cid,22,"Voce precisa fazer parte de alguma guild para passar por este piso.") doSendMagicEffect(getCreaturePosition(cid), 2) end return TRUE end- [RESOLVIDO] [SQLite] -=[TFS]=- 0.4 8.60 Me ajuda por favor acaba vip mais player continua tendo acesso vip ESQUECI DE MEXER NO MOVEMENTS E BOTA SCRIPT ORIGINAL MOVEMENTS NESSA FUNÇÃO SCRIPT.LUA solução vipe.lua unqiueid tava actionid
[SQLite] -=[TFS]=- 0.4 8.60 Me ajuda por favor acaba vip mais player continua tendo acesso vip TALKACTION: systemvip function onSay(cid, words, param) if words == "!buyvip" then -- Check player with VIP if getPlayerStorageValue(cid, 13545) - os.time() > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já tem vip, espere seu tempo acabar, para verificar com !vipdays.") return true end local itemid = 11192 local count = 10000 if doPlayerRemoveItem(cid, itemid, count) 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 [" .. count .. " " .. getItemNameById(itemid) .. "] para colocar VIP.") end elseif words == "!vipdays" then local timenow = os.time() local quantity = math.floor((getPlayerStorageValue(cid, 13545) - timenow) / (24 * 60 * 60)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end 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)) if quantity > 0 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce tem " .. quantity .. " dias de VIP no seu character.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nao tem dias vip.") end end end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") 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 else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") 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)) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem acesso a este comando.") end end return true end MOVEMENT: vipe.lua function onStepIn(cid, item, position, pos, fromPosition) storage = 13545 if getPlayerLevel(cid) < storage then if getPlayerStorageValue(cid, 13545) <= 0 then doTeleportThing(cid, fromPosition, TRUE) pos = getCreaturePosition(cid) doSendMagicEffect(getThingPos(cid), CONST_ME_BIGCLOUDS) doPlayerPopupFYI(cid,"Você não é vip, digite !buyvip 20k Vip Coin") end return TRUE end end CREATURESCRIPT: endvip function removeVipName(cid) local newName = string.gsub(getCreatureName(cid), "%[VIP%]", "") newName = newName:trim() db.executeQuery("UPDATE `players` SET `name` = '" .. newName .. "' WHERE `id` = " .. getPlayerGUID(cid) .. ";") doRemoveCreature(cid) end 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(removeVipName, 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 Ainda Tem " .. daysLeft .. " Dias de [VIP] Restantes.") end end return true end- [SQLite] -=[TFS]=- 0.4 8.60 Como faço pro account manager não recebe nada nenhum item fica nil por favor me ajudem
obrigado - [SQLite] -=[TFS]=- 0.4 8.60 ME AJUDA POR FAVOR PROBLEMA EM CRIA GUILD
Informação Importante
Confirmação de Termo