Jump to content
  • 0

ERRO talkaction /t


marvadon

Question

Bom dia Galera,

 

Estou com problemas em minha talkaction que manda o player para o templo.

 

Ela manda o God para o templo mas não manda os players.

alguém pode me ajudar?

function onSay(player, words, param)	if not player:getGroup():getAccess() then		return true	end	player:teleportTo(player:getTown():getTemplePosition())	return falseend

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Testa ai, nao cheguei testar..

NO XML EDITA O <talkaction words="/t" separator=" " script="teleport_home.lua" />

adiciona o separator...

e no .lua

 

function onSay(player, words, param)    if not player:getGroup():getAccess() then        return true    end    if param == '' then    player:teleportTo(player:getTown():getTemplePosition())        target = player:getTarget()        if not target then            return false        end    else        target = Player(param)        end    if not target then        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'Player ' .. param .. ' is not currently online.')        return false    end    target:teleportTo(target:getTown():getTemplePosition())    return falseend
Edited by Cleberadm
Link to comment
Share on other sites

  • 0
3 minutos atrás, Poccnn disse:

Modificasse no arquivo xml o grupo que pode usar?

sim sim, está tudo certo, todas as outras Talk funcionam normalmente, essa funciona tmbm, porem não consigo mandar os players.

Veja como está:

<!-- 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" />

 

Link to comment
Share on other sites

  • 0

Aqui está o 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="god" flags="272730398714" access="1" maxdepotitems="0" maxvipentries="200" /></groups>

 

Link to comment
Share on other sites

  • 0
1 hora atrás, Poccnn disse:

Não preciso do groups.xml. o que pedi para fazer tu fizes-te?

Retirei a parte do código, porem o god não consegue mandar os players para o templo e os players comuns conseguem usar o /t

Link to comment
Share on other sites

  • 0
1 hora atrás, Cleberadm disse:

Testa ai, nao cheguei testar..

NO XML EDITA O <talkaction words="/t" separator=" " script="teleport_home.lua" />

adiciona o separator...

e no .lua

 

function onSay(player, words, param)    if not player:getGroup():getAccess() then        return true    end    if param == '' then    player:teleportTo(player:getTown():getTemplePosition())        target = player:getTarget()        if not target then            return false        end    else        target = Player(param)        end    if not target then        player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, 'Player ' .. param .. ' is not currently online.')        return false    end    target:teleportTo(target:getTown():getTemplePosition())    return falseend

Funcionou perfeitamente. muito obrigado! :D:D:D:D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...