Postado Junho 23, 2015 9 anos Oque á de errado com o comando ? function onSay(player, words, param) if not player:getGroup():getAccess() then return true end local steps = tonumber(param) if not steps then return false end local position = player:getPosition() position:getNextPosition(player:getDirection(), steps) position = player:getClosestFreePosition(position, false) if position.x == 0 then player:sendCancelMessage("You cannot teleport there.") return false end player:teleportTo(position) return false end
Postado Junho 23, 2015 9 anos Autor nada, tente mudar no phpmyadmin, account_type para 5 Ainda não funciona
Postado Junho 24, 2015 9 anos muda o nome do arquivo.lua para teleporttiles Coloca e coloca isso: function onSay(cid, words, param, channel) local t = {} if(param ~= '') then t = string.explode(param, ",") end local n = tonumber(t[1]) if(not n) then n = 1 end local pid = cid if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid or (isPlayerGhost(pid) and getPlayerAccess(pid) > getPlayerAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end local pos = getClosestFreeTile(pid, getPosByDir(getCreaturePosition(pid), getCreatureLookDirection(pid), n), false, false) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end local tmp = getCreaturePosition(pid) if(doTeleportThing(pid, pos, true) and not isPlayerGhost(pid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end e na tag do seu XML coloca isso aqui: <talkaction log="yes" words="/a" access="4" event="script" value="teleporttiles.lua"/> Editado Junho 24, 2015 9 anos por jhubber (veja o histórico de edições)
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.