Ir para conteúdo
  • 0

Erro Talkactions


marvadon

Pergunta

 

Boa tarde,

 

 

Estou com problemas em minhas talkactions Global Mitsuig 10.96

 

 

 

 

 

/t não manda player para o templo

 

 

/ghost não deixa God invisivel

 

 

/addskill não funciona

 

 

/i não funciona

 

 

 

 

 

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

 

<!-- Achievements Commands -->

<talkaction words="/addach" separator=" " script="achievements.lua" />

<talkaction words="/removeach" separator=" " script="achievements.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="/mounts" separator=" " script="allmounts.lua" />

<talkaction words="/addons" separator=" " script="alladdons.lua" />

 

<!-- Senior Tutors -->

<talkaction words="/addtutor" separator=" " script="add_tutor.lua" />

<talkaction words="/removetutor" separator=" " script="remove_tutor.lua" />

 

<!-- player talkactions -->

<talkaction words="!buypremium" script="buyprem.lua" />

<talkaction words="!buyhouse" script="buyhouse.lua" />

<talkaction words="!leavehouse" script="leavehouse.lua" />

<talkaction words="!changesex" script="changesex.lua" />

<talkaction words="!uptime" script="uptime.lua" />

<talkaction words="!deathlist" script="deathlist.lua" />

<talkaction words="!kills" script="kills.lua" />

<talkaction words="!online" script="online.lua" />

<talkaction words="!serverinfo" script="serverinfo.lua" />

<talkaction words="!addon" separator=" " script="addon.lua" />

 

<!-- Cast System -->

<talkaction words="!cast on" separator=" " script="start_cast.lua" />

<talkaction words="!cast off" script="stop_cast.lua" />

 

<!-- test talkactions -->

<talkaction words="!z" separator=" " script="magiceffect.lua" />

<talkaction words="!x" separator=" " script="animationeffect.lua" />

</talkactions>

 

 

 

 

/t:

 

 


function onSay(player, words, param)

if not player:getGroup():getAccess() then

return true

end

 

player:teleportTo(player:getTown():getTemplePosition())

return false

end

 

Addskill:

 

 


local function getSkillId(skillName)

if skillName == "club" then

return SKILL_CLUB

elseif skillName == "sword" then

return SKILL_SWORD

elseif skillName == "axe" then

return SKILL_AXE

elseif skillName:sub(1, 4) == "dist" then

return SKILL_DISTANCE

elseif skillName:sub(1, 6) == "shield" then

return SKILL_SHIELD

elseif skillName:sub(1, 4) == "fish" then

return SKILL_FISHING

else

return SKILL_FIST

end

end

 

local function getExpForLevel(level)

level = level - 1

return ((50 * level * level * level) - (150 * level * level) + (400 * level)) / 3

end

 

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 split = param:split(",")

if split[2] == nil then

player:sendCancelMessage("Insufficient parameters.")

return false

end

 

local target = Player(split[1])

if target == nil then

player:sendCancelMessage("A player with that name is not online.")

return false

end

 

-- Trim left

split[2] = split[2]:gsub("^%s*(.-)$", "%1")

 

local count = 1

if split[3] ~= nil then

count = tonumber(split[3])

end

 

local ch = split[2]:sub(1, 1)

for i = 1, count do

if ch == "l" or ch == "e" then

target:addExperience(getExpForLevel(target:getLevel() + 1) - target:getExperience(), false)

elseif ch == "m" then

target:addManaSpent(target:getVocation():getRequiredManaSpent(target:getBaseMagicLevel() + 1) - target:getManaSpent())

else

local skillId = getSkillId(split[2])

target:addSkillTries(skillId, target:getVocation():getRequiredSkillTries(skillId, target:getSkillLevel(skillId) + 1) - target:getSkillTries(skillId))

end

end

return false

end

 

/ghost:

 

 


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 position = player:getPosition()

local isGhost = not player:isInGhostMode()

 

player:setGhostMode(isGhost)

if isGhost then

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are now invisible.")

position:sendMagicEffect(CONST_ME_YALAHARIGHOST)

else

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are visible again.")

position.x = position.x + 1

position:sendMagicEffect(CONST_ME_SMOKE)

end

return false

end

 

/i :

 

 


function onSay(player, words, param)

if not player:getGroup():getAccess() then

return true

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:isFluidContainer() then

count = math.min(100, math.max(1, count))

else

count = math.max(0, count)

end

else

count = itemType:isFluidContainer() and 0 or 1

end

 

local result = player:addItem(itemType:getId(), count)

if result ~= nil then

if not itemType:isStackable() then

if type(result) == "table" then

for i = 1, #result do

result:decay()

end

else

result:decay()

end

end

player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)

end

return false

end

 

Alguém poderia me ajudar?

 

 

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

Verifica se tua ACCOUNT TEM ACESS 5 e seu PERSONAGEM também... 

 

OLHA NO SEU GROUP.XML e ve qual que é, pode ser 3 mas a conta e o personagem precisam ter o acesso de adm

Editado por Cleberadm
Link para o comentário
Compartilhar em outros sites

  • 0
25 minutos atrás, Cleberadm disse:

Verifica se tua ACCOUNT TEM ACESS 5 e seu PERSONAGEM também... 

 

OLHA NO SEU GROUP.XML e ve qual que é, pode ser 3 mas a conta e o personagem precisam ter o acesso de adm

Boa tarde,

 

verifiquei o Group acess é 3, conferi no banco de dados o acesso do char e está correto. mas as talk continuam não funcionando. :'(

Link para o comentário
Compartilhar em outros sites

  • 0
Agora, Cleberadm disse:

posta seu group.xml, tira uma print do banco de dados só aparecendo do teu adm, na tabela player e account...

group:

<?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>

banco1-jpgbanco2-jpgbanco3-jpgbanco4-jpg

9

banco1.jpg

banco2.jpg

banco3.jpg

acc1.jpg

acc2.jpg

banco1.jpg.1d7d6455c757c0d2cd1f1a708b33581f.jpg

banco2.thumb.jpg.8f75488382a02d0755470b1f1654d2c9.jpg

banco3.thumb.jpg.3e62b143ad27740144a36cb79db41a92.jpg

acc1.jpg.2918c6a07743ec97ec9b2bb598739a8e.jpg

acc2.jpg.692a383f7554266f7b249359342aa12f.jpg

Link para o comentário
Compartilhar em outros sites

  • 0
8 minutos atrás, Cleberadm disse:

nA TABELA account ESTÁ O TYPE 3 no lugar do meu 5 TAMBÉM? MUDE SEU TYPE 1 PARA TYPE 3!

 

ACC.png

Funcionou!!!!!!! :D

 

só o /t que não esta funcionando 100%, o god vai pro templo mas não consigo enviar os player para lá

 

Link para o comentário
Compartilhar em outros sites

  • 0

@marvadon como existe outro tópico tratando sobre à questão do /t, irei fechar esse tópico por ter resolvido as demais questões. 

 

Editado por Poccnn
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...