Postado Junho 11, 2014 11 anos [PEDIDO] /goto players. ---------------------------------------------------- Tipo Do Script: Talk Versão Utilizada: 8.60 Servidor Utilizado: tfs 0.3.6 Nível De Experiência: não sei Ola galera gostaria de um script onde o mesmo fala-se "/goto ?" ao fizer isso o script ira percorrer os Players que estiverem online sendo que não tem importância ser for por level ou ordem alfabética, a ideia é eu poder percorrer todos os players que estejam online do server estando invisível, sem a necessidade de ir nome por nome. Grato!
Postado Junho 14, 2014 11 anos Em Talkactions.xml <talkaction log="yes" words="/goto" access="3" event="script" value="teleportto.lua"/> Em talkactions/scripts crie um arquivo lua com o nome teleportto.lua, abra e cole isso function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.") return true end local creature = getCreatureByName(param) local player = getPlayerByNameWildcard(param) local waypoint = getWaypointPosition(param) local tile = string.explode(param, ",") local pos = {x = 0, y = 0, z = 0} if(player ~= nil and (not isPlayerGhost(player) or getPlayerGhostAccess(player) <= getPlayerGhostAccess(cid))) then pos = getCreaturePosition(player) elseif(creature ~= nil and (not isPlayer(creature) or (not isPlayerGhost(creature) or getPlayerGhostAccess(creature) <= getPlayerGhostAccess(cid)))) then pos = getCreaturePosition(creature) elseif(isInArray({'back', 'last'}, param:lower())) then pos = getCreatureLastPosition(cid) elseif(type(waypoint) == 'table' and waypoint.x ~= 0 and waypoint.y ~= 0) then pos = waypoint elseif(tile[2] and tile[3]) then pos = {x = tile[1], y = tile[2], z = tile[3]} else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end pos = getClosestFreeTile(cid, pos, true, false) if(not pos or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot perform action.") return true end local tmp = getCreaturePosition(cid) if(doTeleportThing(cid, pos, true) and not isPlayerGhost(cid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Café é bom :3
Postado Junho 17, 2014 11 anos Autor Como que usa? tentei fazer o /goto ? da essa mensagem Invalid param specified.
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.