09-06-2014, 11:38 AM
Yo se que hay un monton de Scripts de ISS que funcionan (o no), pero la verdad, me parecen demaciado complicados asi que decidi escribir uno que funciona y bien simple!
Todo el codigo se basa en 1 Funcion de L2Tower: GotBuff();
Esta funcion chekea si tenemos, o nuestro target tiene "determinado" buff y a partir de ese momento, toma una accion.
Basicamente, el iss Bufea, cuando pierde el buff o alguien de la party pierde el buff. No es lo mas WOW pero funciona.
NOTA: Se revisan 2 Buff y 2 Sonatas porque a veces, el juego da un "EXTRA" tiempo al buff o a la Sonata y si es asi, el script no se daria cuenta que nos quedamos sin Buff
Por otro lado, las Harmonys se DAN con el BUFF.. queda claro que si nos quedamos sin Buff, tambien nos quedamos sin Harmonys..
Para esto escribi 2 funciones: Una revisa Sonatas..
La otra revisa buff. Asi de simple.
Como maneja el tema de las Sonatas, Buff y Harmonys.. Simple con los macros del juego.
Macro 1,1: Colocan las sonatas
Macro 1,2: Colocan los Buff
Macro 1,3: Colocan los nombres de sus personajes y a continuacion el Harmony
Nota: Si 2 personajes llevan el mismo Armony, coloquen /delay 1 despues del Harmony
Basicamente me Base en 3 ISS. Iss Dominator, Iss Domcryer, Iss Spectral Dancer.. osea los que tengo y pude sacar las ID de los Skills. Pero esto puede ser modificado por ustedes
La funcion CheckIssBuff() se divide en 2 partes:
1ro: Si estoy solo, me Bufeo a mi y me controlo a mi.
Luego... al invitar a alguien a la party, verifico si tienen o no Buff. Yo uso Dominators, osea que me daria lo mismo, pero agregue esto por si cargo otro tipo de iss.
Y por ultimo Corresponde agrego un Checkeo de Classes, para tratar de dar el buff correcto. En caso de que no sea Dominator o Spectral Dancer, trata de Bufear como Doomcryer sea el iss que sea. Como mencione antes, no tengo mas id de skills de otras razas de iss.
Para las proximas versiones ya le agregue 2 cosas importantes.
Curar y Revivir.
Ahi dejo el primer Codigo. Yo lo corri unas horas con Dominator y Doomcryer sin problemas. Quiero q mi Spectral dancer llegue ya a 99 y no lo puedo sacar de la party leveando X) hehe.
TinyISS v0.1 : Buff in SOLO + Party
Todo el codigo se basa en 1 Funcion de L2Tower: GotBuff();
Esta funcion chekea si tenemos, o nuestro target tiene "determinado" buff y a partir de ese momento, toma una accion.
Basicamente, el iss Bufea, cuando pierde el buff o alguien de la party pierde el buff. No es lo mas WOW pero funciona.
NOTA: Se revisan 2 Buff y 2 Sonatas porque a veces, el juego da un "EXTRA" tiempo al buff o a la Sonata y si es asi, el script no se daria cuenta que nos quedamos sin Buff
Por otro lado, las Harmonys se DAN con el BUFF.. queda claro que si nos quedamos sin Buff, tambien nos quedamos sin Harmonys..
Para esto escribi 2 funciones: Una revisa Sonatas..
LUA Programming
if not (member:GotBuff(CheckSonataID1)) or not (member:GotBuff(CheckSonataID2)) then
La otra revisa buff. Asi de simple.
Como maneja el tema de las Sonatas, Buff y Harmonys.. Simple con los macros del juego.
Macro 1,1: Colocan las sonatas
Macro 1,2: Colocan los Buff
Macro 1,3: Colocan los nombres de sus personajes y a continuacion el Harmony
Nota: Si 2 personajes llevan el mismo Armony, coloquen /delay 1 despues del Harmony
Basicamente me Base en 3 ISS. Iss Dominator, Iss Domcryer, Iss Spectral Dancer.. osea los que tengo y pude sacar las ID de los Skills. Pero esto puede ser modificado por ustedes
La funcion CheckIssBuff() se divide en 2 partes:
1ro: Si estoy solo, me Bufeo a mi y me controlo a mi.
LUA Programming
if (me ~= nil) and not (me:IsAlikeDeath()) then
ISSSonata(me); -- Sonatas Solo
Sleep(100)
ISSBuff(me); -- Buff + Harmony Solo
end;
Luego... al invitar a alguien a la party, verifico si tienen o no Buff. Yo uso Dominators, osea que me daria lo mismo, pero agregue esto por si cargo otro tipo de iss.
LUA Programming
local partylist = GetPartyList(); -- No Global
for member in partylist.list do
if (member ~= nil) and not (me:IsAlikeDeath()) then
ISSSonata(member); -- Sonatas Party
Sleep(100)
ISSBuff(member); -- Buff + Harmony Party
end;
end;
Y por ultimo Corresponde agrego un Checkeo de Classes, para tratar de dar el buff correcto. En caso de que no sea Dominator o Spectral Dancer, trata de Bufear como Doomcryer sea el iss que sea. Como mencione antes, no tengo mas id de skills de otras razas de iss.
Para las proximas versiones ya le agregue 2 cosas importantes.
Curar y Revivir.
Ahi dejo el primer Codigo. Yo lo corri unas horas con Dominator y Doomcryer sin problemas. Quiero q mi Spectral dancer llegue ya a 99 y no lo puedo sacar de la party leveando X) hehe.
TinyISS v0.1 : Buff in SOLO + Party
Quote:
LUA Programming
-- L2TOWER: LUA - TinyISS Buff v.01 fix.1 (dancer) | Solo + Party Buff | rORUMI -- Put in 1,1 macro -> sonatas: Drag your Sonatas Skills in the macro list -- Put in 1,2 macro -> Buff: Drag your Buffer Skills in the macro slots -- Put in 1,3 macro -> /target your char name, then drag the Harmony in next slot for you and next do the same to all your chars ------------------------------------------------------ ShowToClient("GOD", "TinyISS ACTIVE", 3); --ID's-TinyISS---------------------------------------- --Self-Buff-------------------------------------------[ISS+85 DOMINATOR] HornFrenzyDomiID = 11589; -- Horn Frenzy DrumFrenzyDomiID = 11590; -- Drum Frenzy PrevailingSonataDomiID = 11600; -- Frenzied Prevailing Sonata DaringSonataDomiID = 11601; -- Frenzied Daring Sonata --Self-Buff-------------------------------------------[ISS+85 SPECTRAL DANCER] (Melody id = Doomcryer) HornMelodyDancerID = 11517; -- Horn Melody DrumMelodyDancerID = 11518; -- Drum Melody PrevailingDanceDancerID = 11610; -- Prevailing Dance DaringDanceDancerID = 11611; -- Daring Dance --Self-Buff-------------------------------------------[ISS+85 DOOMCRYER] HornMelodyDoomID = 11517; -- Horn Melody DrumMelodyDoomID = 11518; -- Drum Melody PrevailingSonataDoomID = 11529; -- Prevailing Sonata DaringSonataDoomID = 11530; -- Daring Sonata ------------------------------------------------------ ------------------------------------------------------ ------------------------------------------------------ -- CheckIssBuff [OK] | Check the ID skills in my buff skills ------------------------------------------------------ function CheckIssBuff() local me = GetMe(); -- No Global -- Solo if (me ~= nil) and not (me:IsAlikeDeath()) then ISSSonata(me); -- Sonatas Solo Sleep(100) ISSBuff(me); -- Buff + Harmony Solo end; -- in Party local partyList = GetPartyList(); -- No Global for member in partyList.list do if (member ~= nil) and not (me:IsAlikeDeath()) then ISSSonata(member); -- Sonatas Party Sleep(100) ISSBuff(member); -- Buff + Harmony Party end; end; end; function ISSSonata(member) local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then if not (member:GotBuff(CheckSonataID1)) or not (member:GotBuff(CheckSonataID2)) then Command("/useshortcut 1 1"); Sleep(5*1000); -- 5sec end; end; end; function ISSBuff(member) local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then if not (member:GotBuff(CheckBuffID1)) or not (member:GotBuff(CheckBuffID2)) then Command("/useshortcut 1 2"); Sleep(15*1000); -- 15sec ISSHarmony(); Sleep(1000) end; end; end; function ISSHarmony() local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then Command("/useshortcut 1 3"); Sleep(10*1000); -- 10 sec end; end; ------------------------------------------------------ ------------------------------------------------------ function MainTinyIss() local me = GetMe(); -- No Global -- IssDominator = 174 if (GetMe():GetClass() == 174) then CheckBuffID1 = HornFrenzyDomiID; CheckBuffID2 = DrumFrenzyDomiID; CheckSonataID1 = PrevailingSonataDomiID; CheckSonataID2 = DaringSonataDomiID; -- IssSpectralDancer = 173 elseif (GetMe():GetClass() == 173) then CheckBuffID1 = HornMelodyDancerID; CheckBuffID2 = DrumMelodyDancerID; CheckSonataID1 = PrevailingDanceDancerID; CheckSonataID2 = DaringDanceDancerID; -- IssDoomcryer = 175 or Any else CheckBuffID1 = HornMelodyDoomID; CheckBuffID2 = DrumMelodyDoomID; CheckSonataID1 = PrevailingSonataDoomID; CheckSonataID2 = DaringSonataDoomID; end; CheckIssBuff(); -- Let Check Buff end; --End-TinyIss----------------------------------------- repeat if not IsPaused() then --Check Clase: | IssHierophant = 171 | IssSwordMuse = 172 | IssSpectralDancer = 173 | IssDominator = 174 | IssDoomcryer = 175 if (GetMe():GetClass() == 171) or (GetMe():GetClass() == 172) or (GetMe():GetClass() == 173) or (GetMe():GetClass() == 174) or (GetMe():GetClass() == 175) 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;
Basicamos ahora quedaria mas completo con el agregado de condicines para que no cometa errores por la distancia de la party, quedarse sin MP por curar demaciado, Revivir, Veridicar si estan los personajes vivos antes de volver a Bufear, etc
Agregado a 0.2:
- fix Dancer
- Iss Heal
- Iss Ress
- MpStop para que el Heal no se coma todo el MP
- Rango de Accion para cuando esta en party y se aleja mucho no tome como que esta sin buff
- Revision de esperar a Bufear hasta que el personaje o los personajes de la party no esten muertos.. jeje
Agregado a 0.2 Fix 1. Pequeño Arreglo de condiciones, para que pueda curar y no Resucitar, o Resucitar sin curar..
Espero que le sea util X)
TinyISS v0.2 : Buff in SOLO + Party + Ress + Heal + PartyRange + MPCheck
Quote:
LUA Programming
-- Solo + Party Buff + Iss Heal + Iss Ress + Check Range Party + Mp Low Stop -- Put in 1,1 macro -> sonatas: Drag your Sonatas Skills in the macro list -- Put in 1,2 macro -> Buff: Drag your Buffer Skills in the macro slots -- Put in 1,3 macro -> /target your char name, then drag the Harmony in next slot for you and next do the same to all your chars ------------------------------------------------------ ShowToClient("GOD", "TinyISS ACTIVE", 3); --ID's-TinyISS---------------------------------------- --Self-Buff-------------------------------------------[ISS+85 DOMINATOR] HornFrenzyDomiID = 11589; -- Horn Frenzy DrumFrenzyDomiID = 11590; -- Drum Frenzy PrevailingSonataDomiID = 11600; -- Frenzied Prevailing Sonata DaringSonataDomiID = 11601; -- Frenzied Daring Sonata --Self-Buff-------------------------------------------[ISS+85 SPECTRAL DANCER] (Melody id = Doomcryer) HornMelodyDancerID = 11517; -- Horn Melody DrumMelodyDancerID = 11518; -- Drum Melody PrevailingDanceDancerID = 11610; -- Prevailing Dance DaringDanceDancerID = 11611; -- Daring Dance --Self-Buff-------------------------------------------[ISS+85 DOOMCRYER] HornMelodyDoomID = 11517; -- Horn Melody DrumMelodyDoomID = 11518; -- Drum Melody PrevailingSonataDoomID = 11529; -- Prevailing Sonata DaringSonataDoomID = 11530; -- Daring Sonata ------------------------------------------------------ --Config---------------------------------------------- MPStop = 40; -- MP % To Stop Some Actions partyRangeCheck = 700; -- Max Range to check party buff mustRess = true; -- Must I do ISS Ress? mustHeal = true; -- Must I do ISS Heal? ------------------------------------------------------ ressSkillIssID = 11564; -- Angel's Resurrection healingMelodyID = 11570; -- Healing Melody --flags----------------------------------------------- flagCheckMyClass = true; -- true 1st check time, then false | We want check our class only 1 time. ------------------------------------------------------ --CastOnTarget() [OK]| Autocast de skills function CastOnTarget(id,target) if id then local MySkills = GetSkills():FindById(id) if MySkills and (MySkills:CanBeUsed()) then Target(target) UseSkillRaw(id,false,false) Sleep(500) ClearTarget(); CancelTarget(false); CancelTarget(false); CancelTarget(false); return true end; end; return false end; ------------------------------------------------------ ------------------------------------------------------ -- CheckIssBuff [OK] | Check the ID skills in my buff skills ------------------------------------------------------ function CheckIssBuff() local me = GetMe(); -- No Global -- Solo if (me ~= nil) and not (me:IsAlikeDeath()) then ISSSonata(me); -- Sonatas Solo Sleep(100) ISSBuff(me); -- Buff + Harmony Solo end; -- in Party local partyList = GetPartyList(); -- No Global for member in partyList.list do if (member ~= nil) and not (member:IsAlikeDeath()) and (me ~= nil) and not (me:IsAlikeDeath()) and (me:GetRangeTo(member) < partyRangeCheck) then ISSSonata(member); -- Sonatas Party Sleep(100) ISSBuff(member); -- Buff + Harmony Party end; end; end; function ISSSonata(member) local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then if not (member:GotBuff(CheckSonataID1)) or not (member:GotBuff(CheckSonataID2)) then Command("/useshortcut 1 1"); Sleep(5*1000); -- 5sec end; end; end; function ISSBuff(member) local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then if not (member:GotBuff(CheckBuffID1)) or not (member:GotBuff(CheckBuffID2)) then Command("/useshortcut 1 2"); Sleep(15*1000); -- 15sec ISSHarmony(); Sleep(1000) end; end; end; function ISSHarmony() local me = GetMe(); -- No Global if (me ~= nil) and not (me:IsAlikeDeath()) then Command("/useshortcut 1 3"); Sleep(15*1000); -- 15 sec end; end; ------------------------------------------------------ ------------------------------------------------------ -- NeedRessParty | [OK] - ISS Res -- Requiere: CastOnTarget() ------------------------------------------------------ function NeedRessParty() -- |r: true|false if any dead local me = GetMe(); -- No Global local partyList = GetPartyList(); -- No Global for member in partyList.list do -- partyList: Ress para party - playerList: ress para cualquiera cerca if (member:IsAlikeDeath()) and (me:GetRangeTo(member) < partyRangeCheck) then CastOnTarget(ressSkillIssID, member); -- Ress Sleep (300) return true; end; end; return false; end; ------------------------------------------------------ -- IssHealParty() | [OK] - ISS Heal -- Requiere: CastOnTarget() ------------------------------------------------------ function IssHealParty() local me = GetMe(); -- No Global local partyList = GetPartyList(); -- No Global for member in partyList.list do -- partyList: Ress para party - playerList: ress para cualquiera cerca if (member ~= nil) and not(member:IsAlikeDeath()) and (member:GetHpPercent() < 60) and (me:GetRangeTo(member) < partyRangeCheck) and (me:GetMpPercent() > MPStop) then CastOnTarget(healingMelodyID, member); -- Heal Sleep (300) end; end; end; -- fn ------------------------------------------------------ function CheckMyClass() -- flag: 1 time check if flagCheckMyClass then -- IssDominator = 174 if (GetMe():GetClass() == 174) then CheckBuffID1 = HornFrenzyDomiID; CheckBuffID2 = DrumFrenzyDomiID; CheckSonataID1 = PrevailingSonataDomiID; CheckSonataID2 = DaringSonataDomiID; -- IssSpectralDancer = 173 elseif (GetMe():GetClass() == 173) then CheckBuffID1 = HornMelodyDancerID; CheckBuffID2 = DrumMelodyDancerID; CheckSonataID1 = PrevailingDanceDancerID; CheckSonataID2 = DaringDanceDancerID; -- IssDoomcryer = 175 or Any else CheckBuffID1 = HornMelodyDoomID; CheckBuffID2 = DrumMelodyDoomID; CheckSonataID1 = PrevailingSonataDoomID; CheckSonataID2 = DaringSonataDoomID; end; end; flagCheckMyClass = false; end; --fn ------------------------------------------------------- function MainTinyIss() local me = GetMe(); -- No Global CheckMyClass(); if mustRess then if not NeedRessParty() then if mustHeal then IssHealParty() end; end; end; CheckIssBuff(); -- Let Check Buff end; -- fn --End-TinyIss----------------------------------------- repeat if not IsPaused() then --Check Clase: | IssHierophant = 171 | IssSwordMuse = 172 | IssSpectralDancer = 173 | IssDominator = 174 | IssDoomcryer = 175 if (GetMe():GetClass() == 171) or (GetMe():GetClass() == 172) or (GetMe():GetClass() == 173) or (GetMe():GetClass() == 174) or (GetMe():GetClass() == 175) 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;