Lineage 2 Tower Forum

Full Version: Ayuda con Script de PM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
chicos alguno sabe como armar script para el tower hice este siguiendo ejemplos de otros usuarios, basicamente es para que de una alrta pero no me funciona ni tampoco me funciona los de otro usuarios esto es lo que tengo:

function Chat(chatType, nick, msg)
if ((chatType == 1) or (chatType == 2) or (chatType == 6) or (chatType == 7)) then
ShowToClient("Alarm","Someone may just petitioned you.");
PlaySound(GetDir() .. "alarm.wav");
Command("/useshortcut 10 1"); --> esto es un macro que tengo
end;
end;
En principio calculo que ese codigo salio de un plugin y no de un script y justamente por eso requiere la minima estructura de codigo para activarse y funcionar.
pasa que fui armando de diferentes plugins y script tienes algo que me pueda ayudar? lo que necesito es que cuando alguien me hablar por pm, peticion y chat general o bien me mande un pm a X personaje o que suene, gracias de antemano

Listo :3 funciona
este es
Code:
alarm = false;

function OnCreate()
    this:RegisterCommand("alarm", CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;

function OnCommand_alarm(vCommandChatType, vNick, vCommandParam)
    
    if (alarm == false) then
alarm = true;
ShowToClient("Alarm","Alarma Activada");
    else
alarm = false;
ShowToClient("Alarm","Alarma Desactivada");    
    end;
    
end;


function OnChatUserMessage(chatType, nick, msg)
    if (((chatType == 2) or (chatType == 6) or (chatType == 7))) then
ShowToClient("Alarm","Someone may just petitioned you.");
PlaySound(GetDir() .. "alarm.wav");
Command("#MSJ"); <-- es cuqluier msj al chat party ya que siempre estoy activo con un pj
end;
end;

function OnLTick1s()
if(start == true) then
ShowToClient("Alarm","Funciona");
end;
end;
[/quote]

una Ultima pregunta sabes cual es el el chattype del chat general el 1?
PD: sigo siendo nuevo en esto XD
Esa es una pregunta ideal para @fox o @kerberos464 haceles pm que seguro te pueden ayudar
    LUA Programming
CHAT_ALLY L2Tower chat type, value: 6
CHAT_CLAN L2Tower chat type, value: 5
CHAT_CMD L2Tower chat type, value: 1
CHAT_CMD2 L2Tower chat type, value: 2
CHAT_HERO L2Tower chat type, value: 10
CHAT_INTERNAL L2Tower chat type, value: 0
CHAT_PARTY L2Tower chat type, value: 4
CHAT_PM L2Tower chat type, value: 3
CHAT_PUBLIC L2Tower chat type, value: 7
CHAT_SHOUT L2Tower chat type, value: 8
CHAT_TRADE L2Tower chat type, value: 9


todos ellos están en el L2Tower Helper, el que vos quieres usar es el shout == 8
you are aware that its a plugin, not script?
he do, in 3 post he share the working version.
Eso es un script o plugin?
(04-01-2015 18:46 PM)Skaprox Wrote: [ -> ]Eso es un script o plugin?


El codigo del post 3 mostrado por kaicer666 es un plugin
Reference URL's