Postado Agosto 29, 2016 8 anos 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 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 Alguem poderia me ajudar?
Postado Agosto 29, 2016 8 anos Normalmente o ghost e o addskill, é pelo distro (eu acho) <talkaction log="yes" words="/ghost" access="3" event="function" value="ghost"/> <talkaction log="yes" words="/addskill" access="6" event="function" value="addSkill"/> Seu TFS é diferente do meu, adapte para o seu TFS caso dê erro!!! /t Spoiler function onSay(cid, words, param, channel) local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end end local pos = getPlayerTown(tid) local tmp = getTownName(pos) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.") return true end pos = getTownTemplePosition(pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".") return true end pos = getClosestFreeTile(tid, pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end
Postado Agosto 30, 2016 8 anos Autor 12 horas atrás, Pepeco disse: Normalmente o ghost e o addskill, é pelo distro (eu acho) <talkaction log="yes" words="/ghost" access="3" event="function" value="ghost"/> <talkaction log="yes" words="/addskill" access="6" event="function" value="addSkill"/> Seu TFS é diferente do meu, adapte para o seu TFS caso dê erro!!! /t Mostrar conteúdo oculto function onSay(cid, words, param, channel) local tid = cid if(param ~= '') then tid = getPlayerByNameWildcard(param) if(not tid or (isPlayerGhost(tid) and getPlayerGhostAccess(tid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.") return true end end local pos = getPlayerTown(tid) local tmp = getTownName(pos) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Home town does not exists.") return true end pos = getTownTemplePosition(pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong temple position for town " .. tmp .. ".") return true end pos = getClosestFreeTile(tid, pos) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, true) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Obrigado Pepeco, mas continua sem funcionar Consegui facer funcionar, era só o type do account que estava errado. obrigado pela ajuda.
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.