marvadon 1 Posted August 30, 2016 Report Share Posted August 30, 2016 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 to comment https://xtibia.com/forum/topic/241971-erro-talkactions/ Share on other sites More sharing options...
0 Session Start 125 Posted August 30, 2016 Report Share Posted August 30, 2016 (edited) nA TABELA account ESTÁ O TYPE 3 no lugar do meu 5 TAMBÉM? MUDE SEU TYPE 1 PARA TYPE 3! Edited August 30, 2016 by Cleberadm Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703152 Share on other sites More sharing options...
0 Session Start 125 Posted August 30, 2016 Report Share Posted August 30, 2016 (edited) 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 Edited August 30, 2016 by Cleberadm Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703142 Share on other sites More sharing options...
0 marvadon 1 Posted August 30, 2016 Author Report Share Posted August 30, 2016 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 to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703144 Share on other sites More sharing options...
0 Session Start 125 Posted August 30, 2016 Report Share Posted August 30, 2016 E na account? está quanto? Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703145 Share on other sites More sharing options...
0 marvadon 1 Posted August 30, 2016 Author Report Share Posted August 30, 2016 6 minutos atrás, Cleberadm disse: E na account? está quanto? esta group 3 Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703146 Share on other sites More sharing options...
0 Session Start 125 Posted August 30, 2016 Report Share Posted August 30, 2016 Poe 5, pra testar Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703147 Share on other sites More sharing options...
0 marvadon 1 Posted August 30, 2016 Author Report Share Posted August 30, 2016 3 minutos atrás, Cleberadm disse: Poe 5, pra testar se colocar 5 o char não loga. Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703148 Share on other sites More sharing options...
0 Session Start 125 Posted August 30, 2016 Report Share Posted August 30, 2016 posta seu group.xml, tira uma print do banco de dados só aparecendo do teu adm, na tabela player e account... Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703149 Share on other sites More sharing options...
0 marvadon 1 Posted August 30, 2016 Author Report Share Posted August 30, 2016 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> Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703151 Share on other sites More sharing options...
0 marvadon 1 Posted August 30, 2016 Author Report Share Posted August 30, 2016 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! Funcionou!!!!!!! só o /t que não esta funcionando 100%, o god vai pro templo mas não consigo enviar os player para lá Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703153 Share on other sites More sharing options...
0 Poccnn 385 Posted August 31, 2016 Report Share Posted August 31, 2016 (edited) @marvadon como existe outro tópico tratando sobre à questão do /t, irei fechar esse tópico por ter resolvido as demais questões. Edited August 31, 2016 by Poccnn Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703200 Share on other sites More sharing options...
0 marvadon 1 Posted August 31, 2016 Author Report Share Posted August 31, 2016 Agora, Poccnn disse: @marvadon como existe outro tópico tratando sobrea questão do /t, irei fechar esse tópico por ter resolvido as demais questões. Obrigado Link to comment https://xtibia.com/forum/topic/241971-erro-talkactions/#findComment-1703201 Share on other sites More sharing options...
Question
marvadon 1
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 to comment
https://xtibia.com/forum/topic/241971-erro-talkactions/Share on other sites
12 answers to this question
Recommended Posts