Lineage 2 Tower Forum

Full Version: Ayuda con script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hola, este es mi primer post, asi que perdon si cometo algun error.
estuve buscando script para que un cantante cante y apenas se fueran los cantos volviera a cantar el que falta (juego en un server Hi5), como no encontre me base en un script que se llama Tyni ISS que encontre en el foro, la cosa es que cuando corro el programa el pj no hace nada, de antemano gracias por su ayuda


Code:
ShowToClient("GOD", "TinyISS ACTIVE", 3);
----aca defino los cantos
SongOfRenwalID = 349;
SongOfChampionID = 364;
SongOfVitalityID = 304;
SongOfHunterID = 269;
SongOfWardingID=267;
SongOfEarthID=264;

function CheckIssBuff()
local me = GetMe();
end;
-- Solo
if (me ~= nil) and not (me:IsAlikeDeath()) then
ISSSonata1(me);
ISSSonata2(me);
ISSSonata3(me);
ISSSonata4(me);
ISSSonata5(me);
ISSSonata6(me);

end;

-------------aca deberian ir las funciones para los cantos--------------------
function ISSSonata1(me)
local me = GetMe(); -- No Global
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (member:GotBuff(CheckSonataID2)) then
Command("/useshortcut 5 1");
Sleep(5*1000); -- 5sec
end;
end;    
end;

function ISSSonata2(me)
local me = GetMe();
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (me:GotBuff(CheckSonataID2)) then
Command("/useshortcut 5 2");
Sleep(5*1000); -- 5sec
end;
end;    
end;

function ISSSonata3(me)
local me = GetMe(); -- No Global
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (me:GotBuff(CheckSonataID3)) then
Command("/useshortcut 5 3");
Sleep(5*1000); -- 5sec
end;
end;    
end;

function ISSSonata4(me)
local me = GetMe(); -- No Global
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (me:GotBuff(CheckSonataID4)) then
Command("/useshortcut 5 4");
Sleep(5*1000); -- 5sec
end;
end;    
end;

function ISSSonata5(me)
local me = GetMe(); -- No Global
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (me:GotBuff(CheckSonataID5)) then
Command("/useshortcut 5 5");
Sleep(5*1000); -- 5sec
end;
end;    
end;

function ISSSonata6(me)
local me = GetMe(); -- No Global
if (me ~= nil) and not (me:IsAlikeDeath()) then
if not (me:GotBuff(CheckSonataID6)) then
Command("/useshortcut 5 6");
Sleep(5*1000); -- 5sec
end;
end;    
end;
------------------------------------------------------

------------------------------------------------------
function MainTinyIss()
local me = GetMe(); -- No Global

-- cantante = 100
    if (GetMe():GetClass() == 100) then

CheckSonataID1 = SongOfRenwalID;
CheckSonataID2 = SongOfChampionID;
CheckSonataID3 = SongOfVitalityID;
CheckSonataID4 = SongOfHunterID;
CheckSonataID5 = SongOfWardingID;
CheckSonataID6 = SongOfEarthID;

    end;
    
    CheckIssBuff(); -- Let Check Buff
end;    
    
--End-TinyIss-----------------------------------------

repeat
    if not IsPaused() then

--Check Clase: |SwordMuse = 100
if (GetMe():GetClass() == 100) then

if not (GetMe():IsBlocked(true)) then -- and not (GetMe():GetMpPercent() == 100)
MainTinyIss();
Sleep(250);
end;
else
ShowToClient("ERROR", "CLASE ERRONEA: SCRIPT EQUIVOCADO", 3);
Sleep(30*1000); -- 30sec
end;
    end; --not paused
until false;
Como estas, TyniIss es mi iss. No testie tu codigo, pero veo lo siguiente, yo hago que si te quedas "sin buff" se precione originalmente, F1: Buff, F2: Sonatas, F3, Harmonys.

Vos estas colocando:

    LUA Programming
Command("/useshortcut 5 6");



Eso significa, que el programa esta actuando el skill numero 6, de la barra 5. Hay que ver que tenes ahi.
pq no usas mejor la interfaz de tower para eso???
Lo que yo te puedo decir con la poca experiencia que tengo es que lo hagas desde dentro del juego pulsando el boton "Inicio" de tu teclaso, se te abre un submenu diferente al de //cfg mucho mas sencillo para esto y mas intuitivo, simplemente abres la pestaƱa "Buff" y ahi empiezas a agrear por nombres el buff que quieras, puedes ponerle auto detectable, par que cuando se quede sin ello se eche solo el mismo y al que tengas en party (lo que no se hacer es que apunte a otro pj y le de buff especificas a el...) una vez lo tengas pulsas arriba Enable y ya se hace el solo la funcion.

Espero que te sirva de ayuda ^^

Sl2
Vi la funciones del nuevo menu cargado con home. Yo lo usaba solamente para realisar el "save" de las configuraciones al personaje. Hay una opcion para auto buff. Seria cuestion de probarlas.
Reference URL's