
hola a todos
si soy yo Adram y hoy aportaré algo:

me imagino que esa será su reacción
pero este es el aporte:
Habilidades con "Cargas"
¿a que te refieres con "cargas"?
bueno, tomemos como ejemplo que al
usar una habilidad 5 veces esta se agota por un breve momento.
Detonadores:
[gui] Tabla Hash
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set HashCharge = (Last created hashtable)
-------- ----------------- espacio de separación --------------------------------------------- --------
Set CargasMaximas = 4
-------- ----------------- espacio de separación --------------------------------------------- --------
-------- ----------------- si las cargas llegan a "X" número --------------------------------------------- --------
-------- ----------------- tendran el siguiente color --------------------------------------------- --------
-------- ----------------- plomo --------------------------------------------- --------
Set Colores[0] = |cffc8c8c8
-------- -----------------amarillo --------------------------------------------- --------
Set Colores[1] = |cffffff00
-------- ----------------- naranja --------------------------------------------- --------
Set Colores[2] = |cffffa500
-------- -----------------naranja oscuro

--------------------------------------------- --------
Set Colores[3] = |cffff4500
-------- -----------------Rojo pasion --------------------------------------------- --------
Set Colores[4] = |cffff0000
-------- ----------------- espacio de separación --------------------------------------------- --------
-------- ----------------- ahora crearemos el simbolo (texto) de las cargas --------------------------------------------- --------
-------- ----------------- tambien depende del número de cargas --------------------------------------------- --------
Set TextoCargas[0] = (Colores[0] + I I I I |r)
Set TextoCargas[1] = (Colores[1] + (I |r + (Colores[0] + I I I |r)))
Set TextoCargas[2] = (Colores[2] + (I I |r + (Colores[0] + I I |r)))
Set TextoCargas[3] = (Colores[3] + (I I I |r + (Colores[0] + I |r)))
Set TextoCargas[4] = (Colores[4] + I I I I |r)
-------- ----------------- espacio de separación --------------------------------------------- --------
-------- ----------------- espacio de separación --------------------------------------------- --------
Set TiempoRecarga = 5.00
-------- ----------------- espacio de separación --------------------------------------------- --------
Set CargasIniciales = 1
[/gui]
[gui]
Deto1
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Inner Fire
Actions
Set UnidadL = (Learning Hero)
Custom script: set udg_HeroeKey = GetHandleId(udg_UnidadL)
-------- ----------------- espacio de separación --------------------------------------------- --------
Hashtable - Save (CargasActuales + CargasIniciales) as 0 of HeroeKey in HashCharge
Hashtable - Save Timer as 2 of HeroeKey in HashCharge
-------- ----------------- espacio de separación --------------------------------------------- --------
Unit Group - Add UnidadL to GruposU
Trigger - Turn on Deto 1 loop
-------- ----------------- espacio de separacion --------------------------------------------- --------
[/gui]
[gui]
Deto 1 loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in GruposU and do (Actions)
Loop - Actions
Set UnidadesDentro = (Picked unit)
Custom script: set udg_UnidadesDentroKey = GetHandleId(udg_UnidadesDentro)
Set CargasActuales = (Load 0 of UnidadesDentroKey from HashCharge)
Set Timer = (Load 2 of UnidadesDentroKey from HashCharge)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is alive) Equal to True
Then - Actions
Floating Text - Destroy (Load (Key Texto) of UnidadesDentroKey in HashChargeIf the label is not found, this function returns NULL.)
Floating Text - Create floating text that reads TextoCargas[CargasActuales] above UnidadesDentro with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Hashtable - Save Handle Of(Last created floating text) as (Key Texto) of UnidadesDentroKey in HashCharge
Set Enemigos = (All enemies of (Owner of UnidadesDentro))
Floating Text - Hide (Last created floating text) for Enemigos
Custom script: call DestroyForce(udg_Enemigos)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Timer Greater than or equal to TiempoRecarga
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CargasActuales Less than CargasMaximas
Then - Actions
Hashtable - Save (CargasActuales + 1) as 0 of UnidadesDentroKey in HashCharge
Else - Actions
Hashtable - Save (Timer x 0.00) as 2 of UnidadesDentroKey in HashCharge
Else - Actions
Hashtable - Save (Timer + 0.04) as 2 of UnidadesDentroKey in HashCharge
Else - Actions
Floating Text - Destroy (Load (Key Texto) of UnidadesDentroKey in HashChargeIf the label is not found, this function returns NULL.)
Hashtable - Save CargasIniciales as 0 of UnidadesDentroKey in HashCharge
[/gui]
[gui]
Deto 2
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Inner Fire
Actions
Set CasterC = (Triggering unit)
Custom script: set udg_CasterCKey = GetHandleId(udg_CasterC)
Set CargasActuales = (Load 0 of CasterCKey from HashCharge)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CargasActuales Greater than 0
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
CargasActuales Greater than 0
Then - Actions
Hashtable - Save (CargasActuales - 1) as 0 of CasterCKey in (Last created hashtable)
Else - Actions
Else - Actions
Set NivelCura = (Level of Cura for CasterC)
Unit - Remove Cura from CasterC
Unit - Add Cura to CasterC
Unit - Set level of Cura for CasterC to NivelCura
Game - Display to (All players) the text: No hay cargas
[/gui]
Imágenes:
- Spoiler:
-
Creditos:
- Esto es una adaptación de esto
Descargar:
Dame Click
Comenta para descargar