Postado Agosto 22, 2018 6 anos OTX 3.7 Pessoal gostaria de saber como alterar o acesso de determinados comandos dos membros da staff. ADM, GOD, CM, GM, SENIOR TUTOR E TUTOR. Exemplo colocar acesso 6 para o comando de criar monstros (/m) Meu servidor é um Global 10.99 originalmente veio apenas com 3 hierarquias. GOD-3, GAMEMASTER-2 e PLAYER-1. Eu editei e criei 6 acessos GOD-6, COMMUNITY MANAGER-5, GAMEMASTER-4, SENIOR TUTOR-3, TUTOR-2 e PLAYER-1. Gostaria de saber em que pasta ir para alterar. Meu talkactions-xml não tem o "acess" Meu talkactions.xml: Spoiler <?xml version="1.0" encoding="UTF-8"?> <talkactions> <!-- <talkaction words="/ctffdgdfgdf" separator=" " script="ctf.lua" />--> <!-- Gods --> <talkaction words="/addskill" separator=" " script="add_skill.lua" /> <talkaction words="/r" separator=" " script="removething.lua" /> <talkaction words="/chameleon" separator=" " script="chameleon.lua" /> <talkaction words="/clean" script="clean.lua" /> <talkaction words="/closeserver" separator=" " script="closeserver.lua" /> <talkaction words="/save" separator=" " script="save.lua" /> <talkaction words="/i" separator=" " script="create_item.lua" /> <talkaction words="/ghost" script="ghost.lua" /> <talkaction words="/hide" script="hide.lua" /> <talkaction words="/mccheck" script="mccheck.lua" /> <talkaction words="/openserver" script="openserver.lua" /> <talkaction words="/owner" separator=" " script="owner.lua" /> <talkaction words="/m" separator=" " script="place_monster.lua" /> <talkaction words="/s" separator=" " script="place_npc.lua" /> <talkaction words="/summon" separator=" " script="place_summon.lua" /> <!-- Skill Point --> <talkaction words="!points" script="sp.lua"/> <!-- Achievements Commands --> <talkaction words="/addach" separator=" " script="achievements.lua" /> <talkaction words="/removeach" separator=" " script="achievements.lua" /> <!-- Gamemasters --> <talkaction words="/ban" separator=" " script="ban.lua" /> <talkaction words="/ipban" separator=" " script="ipban.lua" /> <talkaction words="/unban" separator=" " script="unban.lua" /> <talkaction words="/up" script="up.lua" /> <talkaction words="/down" script="down.lua" /> <talkaction words="/c" separator=" " script="teleport_creature_here.lua" /> <talkaction words="/goto" separator=" " script="teleport_to_creature.lua" /> <talkaction words="/gotopos" separator=" " script="teleport_to_pos.lua" /> <talkaction words="/t" script="teleport_home.lua" /> <talkaction words="/town" separator=" " script="teleport_to_town.lua" /> <talkaction words="/a" separator=" " script="teleport_ntiles.lua" /> <talkaction words="/pos" separator=" " script="position.lua" /> <talkaction words="/info" separator=" " script="info.lua" /> <talkaction words="/kick" separator=" " script="kick.lua" /> <talkaction words="/B" separator=" " script="broadcast.lua" /> <talkaction words="/looktype" separator=" " script="looktype.lua" /> <talkaction words="/ghost1" script="ghost1.lua" /> <talkaction words="/mute" script="mute.lua" /> <!--Tutors --> <talkaction words="/mute" separator=" " script="mute.lua" /> <!-- Senior Tutors --> <talkaction words="/addtutor" separator=" " script="add_tutor.lua" /> <talkaction words="/removetutor" separator=" " script="remove_tutor.lua" /> <!-- War Area System --> <talkaction words="/citywar" script="wardarashia.lua"/> <talkaction words="/citywar" script="waredron.lua"/> <talkaction words="/citywar" script="warlb.lua"/> <!-- player talkactions --> <talkaction words="!buyhouse" script="buyhouse.lua" /> <talkaction words="!leavehouse" script="leavehouse.lua" /> <talkaction words="!uptime" script="uptime.lua" /> <talkaction words="!spectators" script="spectators.lua" /> <talkaction words="!cast" separator=" " script="start_cast.lua" /> <talkaction words="!stopcast" script="stop_cast.lua" /> <talkaction words="!outfit" script="guild_outfit.lua"/> <talkaction words="!frags" script="kills.lua" /> <talkaction words="!kills" script="kills.lua" /> <talkaction words="!online" script="online.lua" /> <talkaction words="!guildpoints" separator=" " script="guildpoints.lua" /> <talkaction words="!serverinfo" script="serverinfo.lua" /> <talkaction words="/mute2" separator=" " script="mute2.lua" /> <talkaction words="/unmute2" separator=" " script="mute2.lua" /> <talkaction words="/mute" separator=" " script="mute.lua" /> <talkaction words="/unmute" separator=" " script="mute.lua" /> <talkaction words="!aol" script="aol.lua"/> <talkaction words="!bless" script="bless.lua"/> <!--<talkaction words="Allwords" script="antidivulguer.lua" /> --> <talkaction words="!exp" script="exp.lua" /> </talkactions> Meu groups.xml: Spoiler <?xml version="1.0" encoding="UTF-8"?> <groups> <group id="1" name="player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" /> <group maxvipentries="200" maxdepotitems="0" access="1" flags="135291445241" name="Tutor" id="2"/> <group maxvipentries="200" maxdepotitems="0" access="1" flags="135291445242" name="Senior Tutor" id="3"/> <group id="4" name="gamemaster" flags="137438953471" access="1" maxdepotitems="0" maxvipentries="200" /> <group maxvipentries="200" maxdepotitems="0" access="1" flags="135291445242" name="Community Manager" id="5"/> <group id="6" name="GOD" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" /> </groups> Agradeço quem puder ajudar. REP+ Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. Editado Agosto 22, 2018 6 anos por Daniel000 (veja o histórico de edições)
Postado Agosto 23, 2018 6 anos Provavelmente está definido em cada script qual group pode usar o comando. Abra talkactions/ban e cole aqui. Ot Design: https://discord.gg/VgtVRNmCD7
Postado Agosto 24, 2018 6 anos Autor Em 23/08/2018 em 11:20, Daniel disse: Provavelmente está definido em cada script qual group pode usar o comando. Abra talkactions/ban e cole aqui. Daniel desculpa a demora em responder. Aqui vai o talkactions/ban Spoiler local banDays = 9999 function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local name = param local reason = '' local separatorPos = param:find(',') if separatorPos ~= nil then name = param:sub(0, separatorPos - 1) reason = string.trim(param:sub(separatorPos + 1)) end local accountId = getAccountNumberByPlayerName(name) if accountId == 0 then return false end local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) if resultId ~= false then result.free(resultId) return false end local timeNow = os.time() db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. ", " .. db.escapeString(reason) .. ", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") local target = Player(name) if target ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " has been banned.") target:remove() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " has been banned.") end end Grato se puder ajudar.
Postado Agosto 24, 2018 6 anos @KotZletY pode ajudar? Achei que o acesso estaria em cada script, mas talvez seja outra coisa.. Ot Design: https://discord.gg/VgtVRNmCD7
Postado Agosto 25, 2018 6 anos Solução @Daniel000 Spoiler local banDays = 9999 function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end local name = param local reason = '' local separatorPos = param:find(',') if separatorPos ~= nil then name = param:sub(0, separatorPos - 1) reason = string.trim(param:sub(separatorPos + 1)) end local accountId = getAccountNumberByPlayerName(name) if accountId == 0 then return false end local resultId = db.storeQuery("SELECT 1 FROM `account_bans` WHERE `account_id` = " .. accountId) if resultId ~= false then result.free(resultId) return false end local timeNow = os.time() db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" .. accountId .. ", " .. db.escapeString(reason) .. ", " .. timeNow .. ", " .. timeNow + (banDays * 86400) .. ", " .. player:getGuid() .. ")") local target = Player(name) if target ~= nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, target:getName() .. " has been banned.") target:remove() else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, name .. " has been banned.") end end if player:getAccountType() < ACCOUNT_TYPE_GOD then return false end Contas com acesso menor que GOD não usará o comando, mas qualquer acesso superior ou igual a GOD, irá usar. if player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER then return false end Mesmo esquema, contas com acesso menor que gamemaster não irá usar o comando, mas contas com acesso superior ou igual a gamemaster, irá usar!!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.