Admin Necro ADMINISTRADOR
Mensajes : 64 Fecha de inscripción : 04/11/2010 Edad : 27 Localización : Mi Casa
| Tema: [TalkAction] Crear Un Teleport Sáb Nov 06, 2010 12:33 am | |
| Ola, Nomas Posteando Algo Qe Puede Ser Muy Util Ya Qe Crea tp's (; Descripcion: Al Darle Look A Un Sqm [Cuadro] i Decir /addtp Automaticamente Se Graban Las Pociciones De Ese Lugar i Luego Al Darle Look A Otro Sqm [Cuadro] i Volver a Decir /addtp Se Crea Un teleport En Ese Sqm [Cuadro] Con Las Cordenadas De El Primer Lugar Dnd Le Diste Look (: Nota: Si te Eqibokaste Puedes Decir /addtp clear i Se Borran Las Coordenadas (:! [Me Ise Bolas Explicando asi qe Ai Ud Entiendanle XD!] Ok Primero A data/talkactions/talkactions.xml y Pegamos Esto: - Código:
-
<talkaction log="yes" words="/addtp" access="5" event="script" value="addtp.lua"/> Luego A data/talkactions/scripts Copeamos un Archivo le borramos Lo De Adentro Lo Renombramos Como addtp y Pegamos Esto Dentro: - Código:
-
function comparePosition(pos1, pos2) return (pos1.x == pos2.x and pos1.y == pos2.y and pos1.z == pos2.z) and true or false end
local position = false function onSay(cid, words, param, channel) local pos,c = getCreatureLookPosition(cid),position if param == "clear" then position = false return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Clear.") end if not(position) or not(comparePosition(position,pos)) then if position == false then position = pos return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("The teleporter's position was set. [X: %i, Y: %i, Z: %i]",pos.x, pos.y, pos.z)) and doSendMagicEffect(pos, 14) end position = false return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, string.format("The teleporter was set up. From:[X: %i, Y: %i, Z: %i] To:[X: %i, Y: %i, Z: %i]",c.x, c.y, c.z, pos.x, pos.y, pos.z)) and doSendMagicEffect(pos, 14) and doCreateTeleport(1387, pos, c) end return doPlayerSendCancel(cid,"The teleport position can't be the position where the teleporter is.") end CREDITOS: Summ | |
|
Admin Skit ADMINISTRADOR
Mensajes : 36 Fecha de inscripción : 04/11/2010 Edad : 25 Localización : exiveame XD
| Tema: Re: [TalkAction] Crear Un Teleport Sáb Nov 06, 2010 5:08 am | |
| chido chido 10/10 | |
|