L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script: Tiny ISS | Desarrollo paso a paso
Author Message
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #1
Script: Tiny ISS | Desarrollo paso a paso

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..

    LUA Programming
if not (member:GotBuff(CheckSonataID1)) or not (member:GotBuff(CheckSonataID2)) then



La otra revisa buff. Asi de simple.

    LUA Programming
if not (member:GotBuff(CheckBuffID1)) or not (member:GotBuff(CheckBuffID2)) then



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;



Agregado a 0.3:

-- v.03
-- OOP BUFF Mode Single ISS + Your Char. Just Active Follow at GUI, Config the Char Name an set "true" in OOP
-- OOP HEAL -> Ahora se puede curar al personaje que esta leveando estando fuera de la party
-- OOP HEAL Any -> Tambien se puede curar personajes en rango, por mas que no sean de nuestro clan estando el OOP
-- Buff time Check -> Ya no se pierden los buff entre re-buff y re-buff
-- Algunas party del codigo ahora no se repiten mas de 1 vez... solo cuando se activa el script

TinyISS v0.3 : Buff in SOLO + Party + OOP + Ress + Heal + PartyRange + MPCheck

Quote:

    LUA Programming
-- L2TOWER: LUA - TinyISS Buff v.03 RC1| rORUMI
-----------------------------------------------
 
--[[ History
 
-- v.03
-- OOP BUFF Mode Single ISS + Your Char. Just Active Follow at GUI, Config the Char Name an set "true" in OOP
-- OOP HEAL Clan Members
-- OOP HEAL Any Char in Range
-- Buff time Check to avoid loose Buff in Solo, Party or OOP mode
-- Check only one time some part of code
 
-- v.02
- fix Dancer ID
- Iss Heal in party
- Iss Ress in Party
- MpStop
- Party Range
- Buff Only if char is Alive
 
-- v.01
- Iss Buff in party using macros
--]]
 
-- Solo + Party Buff + Iss Heal + Iss Ress + Check Range Party + Mp Low Stop + OOP ISS-DD + Buff Time Check
 
-- 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
 
-- Note: OOP Mode: Add yout ISS Name L2Tower GUI in Party -> Auto Accept ON -> Add Player
------------------------------------------------------
ShowToClient("Script", "TinyISS v.03 RC1 ACTIVE", 3);
 
--ID's-TinyISS----------------------------------------
 
--Config----------------------------------------------
MPStop = 30; -- MP % To Stop Some Actions
partyRangeCheck = 900; -- Max Range to check party buff
issHealRangeCheck = 400; -- Max Range to check Iss Heal
 
mustRessPT = true; -- Must I do ISS Ress in party?
mustHealPT = true; -- Must I do ISS Heal in party?
mustHealOOPClan = true; -- Must I do ISS Heal out of party clan member (Nice to Power Leveling Clan Members)
mustHealOOPAny = false; -- Must I do ISS Heal out of party ANY member (Your ISS heal ANY char in Range)
------------------------------------------------------
-- OOP-MODE-------------------------------------------
IssOOP = false; -- if true, iss will invite another char and leave, SET false to ISS in Party
CharName = "NCBot" -- Your Char Name to invite
--Config END------------------------------------------
------------------------------------------------------
 
--Skills-ID-------------------------------------------
ressSkillIssID = 11564; -- Angel's Resurrection
healingMelodyID = 11570; -- Healing Melody
--flags--(Please Dont Change)-------------------------
flagCheckMyBuff = true; -- true 1st check time, then false | We want check our class only 1 time.
flagCheckMyClass = false; -- false 1st check time when check to avoid repeat
 
------------------------------------------------------
-- CHANGE HERE IF YOU HAVE ANOTHER ISS AND THIS SCRIPT DONT WORK
------------------------------------------------------
--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
------------------------------------------------------
 
------------------------------------------------------
--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
------------------------------------------------------
 
------------------------------------------------------
------------------------------------------------------
function CheckIssBuff()
 
-- Solo
		if (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) then
			if not (GetMe():GotBuff(CheckSonataID1)) or not (GetMe():GotBuff(CheckSonataID2)) then DoBuff() end;
			Sleep(1000)
			if not (GetMe():GotBuff(CheckSonataID1)) or not (GetMe():GotBuff(CheckSonataID2)) then DoSonatas() end;
			Sleep(1000)
		end
-- in Party
local partyList = GetPartyList();
		for member in partyList.list do
			if (member ~= nil) and not (member:IsAlikeDeath()) 
				and (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) and (GetMe():GetRangeTo(member) < partyRangeCheck) then
				ISSSonata(member); -- Sonatas Party
				Sleep(1000)
				ISSBuff(member); -- Buff + Harmony Party
				Sleep(1000)
			end
		end
end
 
function ISSSonata(member)
		if (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) then
			if not (member:GotBuff(CheckSonataID1)) or not (member:GotBuff(CheckSonataID2)) then
			Command("/useshortcut 1 1");
			Sleep(5*1000); -- 5sec
			ClearTarget();
			CancelTarget(true);
			end
		end	
end
 
function ISSBuff(member)
		if (GetMe() ~= nil) and not (GetMe():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()
		if (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) then
			Command("/useshortcut 1 3");
			Sleep(15*1000); -- 15 sec
			ClearTarget();
			CancelTarget(true);
 
		end	
end
 
function DoSonatas() -- Solo + oop
		if (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) then
			if IssOOP then OOPInvite();
			Command("/useshortcut 1 1");
			Sleep(5*1000); -- 5sec
			OOPLeave();
			else 
			Command("/useshortcut 1 1");
			Sleep(5*1000); -- 5sec
			end
		end
end --fn
 
function DoBuff() -- Solo + oop
		if (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) then
			if IssOOP then 
				OOPInvite();
				Command("/useshortcut 1 2");
				Sleep(15*1000); -- 15sec
				ISSHarmony();
				Sleep(5*1000);
				OOPLeave();
			else
				Command("/useshortcut 1 2");
				Sleep(15*1000); -- 15sec
				ISSHarmony();
				Sleep(5*1000);			
			end
		end
end --fn
 
function TimeCheck()
 
	local sonataTime = GetMe():GetBuff(CheckSonataID1);
	local buffTime = GetMe():GetBuff(CheckBuffID1);
 
	local timeToSonatas = (60*1000); -- 1 min
	local timeToBuff = (3*60*1000); -- 5 min
 
		if sonataTime then
			timeLeftS = sonataTime.endTime - GetTime();
 
			if (tonumber(timeLeftS) < timeToSonatas) then
				DoSonatas();
			end
		end
 
		if buffTime then
			timeLeftB = buffTime.endTime - GetTime();
			if (tonumber(timeLeftB) < timeToBuff) then
				DoBuff();
			end
		end	
 
end -- fn
--END-BUFF--------------------------------------------
 
------------------------------------------------------
function IssRessParty() -- |r: true|false if any dead
 
	local partyList = GetPartyList(); -- No Global
	for member in partyList.list do -- partyList: Ress para party - playerList: ress para cualquiera cerca
		if (member:IsAlikeDeath()) and (GetMe():GetRangeTo(member) < partyRangeCheck) then
 
			Sleep (20*1000) -- 20sec w8 healer Ress | in party, maybe you have a Haler Better
			CastOnTarget(ressSkillIssID, member); -- Ress
			Sleep (5*1000) -- 5sec
			DoBuff();
		end
	end
 
end --fn
------------------------------------------------------
function IssHealParty()
 
		local partyList = GetPartyList();
		for member in partyList.list do
			if (member ~= nil) and not (member:IsAlikeDeath()) and (member:GetHpPercent() < 80)
						   and (GetMe():GetRangeTo(member) < partyRangeCheck) and (GetMe():GetMpPercent() > MPStop) then
				CastOnTarget(healingMelodyID, member); -- ISS HP Heal
				Sleep (500)
			end
		end
end -- fn
 
function IssHealClanOOPClan()
 
	local players = GetPlayerList();
	for player in players.list do
		if (player ~= nil) and (player:GetClanName() == GetMe():GetClanName()) and not(player:IsMyPartyMember())
						   and not (player:IsAlikeDeath()) and (player:GetHpPercent() < 80)		
						   and (player:GetDistance() < issHealRangeCheck)
						   and (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) and (GetMe():GetMpPercent() > MPStop) then		
 
				CastOnTarget(healingMelodyID, player); -- ISS HP Heal OOP Clan members
				Sleep (1000)
		end
	end
end -- fn
 
function IssHealClanOOPAny()
 
	local players = GetPlayerList();
	for player in players.list do
		if (player ~= nil) and not (player:IsAlikeDeath()) and (player:GetHpPercent() < 80) and not(player:IsMyPartyMember())
						   and (player:GetDistance() < issHealRangeCheck)
						   and (GetMe() ~= nil) and not (GetMe():IsAlikeDeath()) and (GetMe():GetMpPercent() > MPStop) then		
 
				CastOnTarget(healingMelodyID, player); -- ISS HP Heal OOP Any Near
				Sleep (1000)
		end
	end
end -- fn
 
--OOP-------------------------------------------------
function OOPInvite()
		if (CharName ~= nil) then
		Command("/invite "..CharName)
		Sleep(5*1000) -- 5 sec
		else
		ShowToClient("TinyISS", "Bad Char Name, or too Far. ISS cant Invite...", 3);
		Sleep(30*1000) -- 30 sec
		end
end --fn
 
function OOPLeave()
		Sleep(1000) -- 1 sec
		Command("/leave")
		Sleep(1000) -- 1 sec
end --fn
--end-OOP---------------------------------------------
 
 
function CheckMyBuff() -- flag: 1 time check
 
 -- 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
 
flagCheckMyBuff = false;
 
end --fn
 
-------------------------------------------------------
function MainTinyIss()
 
		if flagCheckMyBuff then CheckMyBuff() end;
		----------------------------------------------
		if mustRessPT then IssRessParty() end;
		----------------------------------------------
		if mustHealPT then IssHealParty() end;
		if mustHealOOPClan then IssHealClanOOPClan() end;
		if mustHealOOPAny then IssHealClanOOPAny() end;
		----------------------------------------------
		CheckIssBuff(); -- Let Check Buff
		TimeCheck(); -- Let Check the time of Buff
		Sleep(5*1000)
end -- fn
 
--End-TinyIss-----------------------------------------
 
function CheckMyClass()
	if not flagCheckMyClass 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
			flagCheckMyClass = true;
		end
	end
end -- fn
 
 
repeat
	if not IsPaused() then
		CheckMyClass(); -- 1 time
		if flagCheckMyClass then	
			if not (GetMe():IsBlocked(true)) then
				MainTinyIss();
			end
		else
			ShowToClient("ERROR", "BAD SCRIPT: YOU ARE NOT ISS", 3);
			Sleep(60*1000);			
		end
	else
		Sleep(10*1000); -- paused
	end --not paused
 
until false;




Attached File(s)
.lua  TinyIss-v0.1.lua (Size: 4.38 KB / Downloads: 116)
.lua  TinyIss-v0.3.lua (Size: 11.48 KB / Downloads: 147)
.lua  TinyIss-v0.2.lua (Size: 7.11 KB / Downloads: 103)
(This post was last modified: 10-28-2014 08:51 AM by rORUMI.)
09-06-2014 11:38 AM
Find all posts by this user Quote this message in a reply
 Reputed by : ExoDo(+1) , las76(+2) , diegol(+2)
ExoDo Offline
Restrainer of Glory
*

Posts: 171
Joined: Feb 2014
Reputation: 12
Version: 1.4.2.142
Post: #2
RE: Script: Tiny ISS | Desarrollo paso a paso

Muy bueno y realmente bien explicado.
Yo anteriormente había hecho uno para un amigo basándome en una tabla para buffear con la misma función que vos usas, si la encuentro posteo el codigo.
09-06-2014 12:03 PM
Find all posts by this user Quote this message in a reply
argentinianjesus Offline
Expired VIP Member
**

Posts: 131
Joined: Jan 2012
Reputation: 12
Version: 1.4.3.143
Post: #3
RE: Script: Tiny ISS | Desarrollo paso a paso

Tenes skype?
09-06-2014 12:51 PM
Find all posts by this user Quote this message in a reply
las76 Offline
Expired VIP Member
**

Posts: 2
Joined: Nov 2012
Reputation: 0
Version: 1.4.2.133
Post: #4
RE: Script: Tiny ISS | Desarrollo paso a paso

(09-06-2014 12:51 PM)argentinianjesus Wrote:  Tenes skype?

Como hago la macro 3?
09-07-2014 01:06 AM
Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #5
RE: Script: Tiny ISS | Desarrollo paso a paso

(09-07-2014 01:06 AM)las76 Wrote:  
(09-06-2014 12:51 PM)argentinianjesus Wrote:  Tenes skype?

Como hago la macro 3?

Yo arranco con el nombre del iss y luego el personaje o los personajes

El macro seria algo asi:
/target MiSuperISS
/Warrior Harmony
/Target MiSuperTank
/Knight Harmony
/target MisuperHealer
/Wizzard Harmony


Lo que haces el abrir el editor de macros, y al lado abris las skills.. y arrastras el skill del harmony a la barra de Macros y queda perfecto
(This post was last modified: 09-07-2014 05:42 AM by rORUMI.)
09-07-2014 03:19 AM
Find all posts by this user Quote this message in a reply
 Reputed by : mardukx(+2) , las76(+2)
mardukx Offline
VIP Member
***

Posts: 240
Joined: Jan 2012
Reputation: 0
Version: 1.4.2.142
Post: #6
RE: Script: Tiny ISS | Desarrollo paso a paso

+2 de reputation men sigue asi
09-07-2014 03:33 AM
Find all posts by this user Quote this message in a reply
rORUMI Offline
Expired VIP Member
**

Posts: 278
Joined: May 2014
Reputation: 50
Version: 1.4.2.142
Post: #7
RE: Script: Tiny ISS | Desarrollo paso a paso

(09-07-2014 03:33 AM)mardukx Wrote:  +2 de reputation men sigue asi

Dale. Ahi estoy mirando el tema de la distancia entre miembros del party. Si se alejan mucho el iss cree que no tienen buff y se pone a bufear como loco hasta que se queda sin mp.

Obvio que si configuras el GUI con Follow activo, esto no pasa.. pero por las dudas hay que darle una condicion de "distancia maxima" para evitar esto.
09-07-2014 05:44 AM
Find all posts by this user Quote this message in a reply
13dk13 Offline
VIP Member
***

Posts: 259
Joined: Apr 2012
Reputation: 9
Version: 1.4.2.142
Post: #8
RE: Script: Tiny ISS | Desarrollo paso a paso

Buena, ya estas considerando abrir L2Tower en la escuela ?

[Image: 11_discovery.jpg]

jaja era broma bien por los tutoriales
09-08-2014 16:55 PM
Find all posts by this user Quote this message in a reply
alku Offline
Amber Basilisk
*

Posts: 35
Joined: Oct 2013
Reputation: 0
Version: 1.4.2.142
Post: #9
RE: Script: Tiny ISS | Desarrollo paso a paso

no me funciona con el ISS Spectral dancer
que tengo que cambiarle ?
09-08-2014 17:54 PM
Find all posts by this user Quote this message in a reply
alberyan Offline
Zaken's Royal Guard
*

Posts: 52
Joined: Oct 2012
Reputation: 0
Version: 1.4.2.142
Post: #10
RE: Script: Tiny ISS | Desarrollo paso a paso

(09-08-2014 17:54 PM)alku Wrote:  no me funciona con el ISS Spectral dancer
que tengo que cambiarle ?
manten la estructura y solo cambia el id de la skill y la descripcion.
09-08-2014 22:34 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Script: Healer | Desarrollo paso a paso rORUMI 29 17,267 06-25-2022 05:33 AM
Last Post: chinoxpichu1990
Heart Busco Script/Find Script brianheick 3 4,011 07-15-2013 04:55 AM
Last Post: Faraon



User(s) browsing this thread: 1 Guest(s)