Ir para conteúdo
  • Cadastre-se

Problema comando de GM/GOD/ADM


Posts Recomendados

Como título diz, estou com um problema nos comandos de gm, god e adm. Tfs 1.0

 

O personagem que utilizo tem codigo de acess: 3 com nome de administrador. Se alguem puder me ajudar.

Os comandos que ele não pode realizar e que preciso as vezes são esses:

/i
/m
/c
/ipban
 
O resto consigo fazer.
 
script groups.xml

<?xml version="1.0" encoding="UTF-8"?>

<groups>
<group id="1" name="Player" flags="0" access="0" maxdepotitems="0" maxvipentries="0" />
<group id="2" name="Gamemaster" flags="137438953471" access="1" maxdepotitems="0" maxvipentries="200" />
<group id="3" name="Administrator" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" />
</groups>

 
script talkactions.xml

<?xml version="1.0" encoding="UTF-8"?>

<talkactions>
       
<!-- Gods -->
<talkaction words="/addskill" separator=" " script="add_skill.lua" />
<talkaction words="/chameleon" separator=" " script="chameleon.lua" />
<talkaction words="/clean" script="clean.lua" />
<talkaction words="/closeserver" separator=" " script="closeserver.lua" />
<talkaction words="/i" separator=" " script="create_item.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" />
<talkaction words="/addtp" separator=" " script="addtp.lua" />
<talkaction words="/addtutor" separator=" " script="add_tutor.lua" />
<talkaction words="/removetutor" separator=" " script="remove_tutor.lua" />
 
<!-- Gamemasters -->
<talkaction words="/save" script="save.lua" />
<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="/r" separator=" " script="removething.lua" />
<talkaction words="/kick" separator=" " script="kick.lua" />
<talkaction words="/B" separator=" " script="broadcast.lua" />
<talkaction words="/looktype" separator=" " script="looktype.lua" />
<talkaction words="/ghost" script="ghost.lua" />
<talkaction words="/mute" script="mute.lua" />
 
<!-- player talkactions -->
<talkaction words="!buyhouse" script="buyhouse.lua"/>
<talkaction words="!leavehouse" script="leavehouse.lua"/>
<talkaction words="!uptime" script="uptime.lua"/>
<talkaction words="!kills" script="kills.lua"/>
<talkaction words="!serverinfo" script="serverinfo.lua"/>
<talkaction words="!aol" script="aol.lua"/>
<talkaction words="!bless" script="bless.lua"/>
<talkaction words="!online" script="online.lua"/>
<talkaction words="!cast" separator=" " script="cast.lua" />
 
<!-- test talkactions -->
<talkaction words="!z" separator=" " script="magiceffect.lua"/>
<talkaction words="!x" separator=" " script="animationeffect.lua"/>
</talkactions>

 
script /i

function onSay(cid, words, param)

local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
 
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
 
local split = param:split(",")
 
local itemType = ItemType(split[1])
if itemType:getId() == 0 then
itemType = ItemType(tonumber(split[1]))
if itemType:getId() == 0 then
player:sendCancelMessage("There is no item with that id or name.")
return false
end
end
 
local count = tonumber(split[2])
if count ~= nil then
if itemType:isStackable() then
count = math.min(10000, math.max(1, count))
elseif not itemType:hasSubType() then
count = math.min(100, math.max(1, count))
else
count = math.max(1, count)
end
else
count = 1
end
 
local result = player:addItem(itemType:getId(), count)
if result ~= nil then
if not itemType:isStackable() then
if type(result) == "table" then
for _, item in ipairs(result) do
item:decay()
end
else
result:decay()
end
end
if(not isPlayerGhost(cid)) then
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
end
end
return false
end

 
script /m

function onSay(cid, words, param)

local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
 
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
 
local orig = player:getPosition()
local creatureId = doSummonCreature(param, orig)
if creatureId ~= false then
local monster = Monster(creatureId)
monster:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
orig:sendMagicEffect(CONST_ME_MAGIC_RED)
else
player:sendCancelMessage("There is not enough room.")
orig:sendMagicEffect(CONST_ME_POFF)
end
return false
end

 
script /c

function onSay(cid, words, param)

local player = Player(cid)
if not player:getGroup():getAccess() then
return true
end
 
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
 
local creature = Creature(param)
if not creature then
player:sendCancelMessage("A creature with that name could not be found.")
return false
end
 
local oldPosition = creature:getPosition()
local newPosition = creature:getClosestFreePosition(player:getPosition(), false)
if newPosition.x == 0 then
player:sendCancelMessage("You can not teleport " .. creature:getName() .. ".")
return false
elseif creature:teleportTo(newPosition) then
if not creature:isInGhostMode() then
oldPosition:sendMagicEffect(CONST_ME_POFF)
newPosition:sendMagicEffect(CONST_ME_TELEPORT)
end
end
return false
end

 
script /ipban

local ipBanDays = 7

 
function onSay(cid, words, param)
local player = Player(cid)
if not player:getGroup():getAccess() then
return false
end
 
local resultId = db.storeQuery("SELECT `account_id`, `lastip` FROM `players` WHERE `name` = " .. db.escapeString(param))
if resultId == false then
return false
end
 
local ip = result.getDataInt(resultId, "lastip")
result.free(resultId)
 
local targetCid = getPlayerByName(param)
if targetCid ~= false then
ip = getIpByName(param)
doRemoveCreature(targetCid)
end
 
if ip == 0 then
return false
end
 
resultId = db.storeQuery("SELECT 1 FROM `ip_bans` WHERE `ip` = " .. ip)
if resultId ~= false then
result.free(resultId)
return false
end
 
local timeNow = os.time()
db:query("INSERT INTO `ip_bans` (`ip`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" ..
ip .. ", '', " .. timeNow .. ", " .. timeNow + (ipBanDays * 86400) .. ", " .. player:getGuid() .. ")")
return false
end
 

 
 

 

 Postei em geral, pois no tópico de talkaction estava desabilitado o botão de inserir tópic, e não encontrei nenhum tópico falando sobre isso.

 

Agradeço desde já.

Link para o post
Compartilhar em outros sites

Tente alterando esse access.

<group id="3" name="Administrator" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" />

Link para o post
Compartilhar em outros sites

No banco de dados vá em Accounts > Sua conta e edite sua conta, na parte type vai estar 1, coloque 5.

Gostou do meu trabalho? Então me ajude colaborando! =)
 
Pagseguro.

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo