[gui] Recibir SkillPoint
Acontecimientos
Unidad - A unit owned by Jugador 1 (rojo) Gana un nivel
Unidad - A unit owned by Jugador 2 (azul) Gana un nivel
Unidad - A unit owned by Jugador 3 (teja) Gana un nivel
Unidad - A unit owned by Jugador 4 (morado) Gana un nivel
Unidad - A unit owned by Jugador 5 (amarillo) Gana un nivel
Unidad - A unit owned by Jugador 6 (naranja) Gana un nivel
Unidad - A unit owned by Jugador 7 (verde) Gana un nivel
Unidad - A unit owned by Jugador 8 (rosa) Gana un nivel
Unidad - A unit owned by Jugador 9 (Gris) Gana un nivel
Unidad - A unit owned by Jugador 10 (azul claro) Gana un nivel
Unidad - A unit owned by Jugador 11 (verde oscuro) Gana un nivel
Condiciones
Acciones
Set SP_Max[(Player number of (Owner of (Triggering unit)))] = (SP_Max[(Player number of (Owner of (Triggering unit)))] + 5)
Jugador - Add 5 to (Owner of (Triggering unit)) Madera actual
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
(Level of Magia SP - Ladron for Player_Heroes[(Player number of (Owner of (Triggering unit)))]) Igual a 1
Entonces: Acciones
Set Spell_SPGAIN[(Player number of (Owner of (Triggering unit)))] = (Spell_SPGAIN[(Player number of (Owner of (Triggering unit)))] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Spell_SPGAIN[(Player number of (Owner of (Triggering unit)))] Igual a 2
Entonces: Acciones
Set SP_Max[(Player number of (Owner of (Triggering unit)))] = (SP_Max[(Player number of (Owner of (Triggering unit)))] + 1)
Jugador - Add 1 to (Owner of (Triggering unit)) Madera actual
Set Spell_SPGAIN[(Player number of (Owner of (Triggering unit)))] = 0
Otros: Acciones
Otros: Acciones
[/gui]
Todo ese detonador puedes reducirlo a:
[gui] Recibir SkillPoint
Acontecimientos
Unidad - Any Unit Gana un nivel
Condiciones
Acciones
Jugador - Add 5 to (Owner of (Triggering unit)) Madera actual
[/gui]
Y agregará la madera. Luego
[gui]Introducir x Texto
Acontecimientos
Jugador - Jugador 1 (rojo) types a chat message containing - as Una subcadena
Jugador - Jugador 2 (azul) types a chat message containing - as Una subcadena
Jugador - Jugador 3 (teja) types a chat message containing - as Una subcadena
Jugador - Jugador 4 (morado) types a chat message containing - as Una subcadena
Jugador - Jugador 5 (amarillo) types a chat message containing - as Una subcadena
Jugador - Jugador 6 (naranja) types a chat message containing - as Una subcadena
Jugador - Jugador 7 (verde) types a chat message containing - as Una subcadena
Jugador - Jugador 8 (rosa) types a chat message containing - as Una subcadena
Jugador - Jugador 9 (Gris) types a chat message containing - as Una subcadena
Jugador - Jugador 10 (azul claro) types a chat message containing - as Una subcadena
Jugador - Jugador 11 (verde oscuro) types a chat message containing - as Una subcadena
Condiciones
Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Or - Any (Conditions) are true
Condiciones
(Substring((Entered chat string), 2, 5)) Igual a Agi
(Substring((Entered chat string), 2, 5)) Igual a AGI
(Substring((Entered chat string), 2, 5)) Igual a agi
Entonces: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
((Triggering player) Madera actual) Mayor que o igual a (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
(Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))))) Mayor que 0
Entonces: Acciones
Jugador - Add (0 - (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))) to (Triggering player) Madera actual
Héroe - Modify Agilidad of Player_Heroes[(Player number of (Triggering player))]: Añadir (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
Otros: Acciones
Otros: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Or - Any (Conditions) are true
Condiciones
(Substring((Entered chat string), 2, 5)) Igual a Fue
(Substring((Entered chat string), 2, 5)) Igual a fue
(Substring((Entered chat string), 2, 5)) Igual a FUE
Entonces: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
((Triggering player) Madera actual) Mayor que o igual a (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
(Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))))) Mayor que 0
Entonces: Acciones
Jugador - Add (0 - (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))) to (Triggering player) Madera actual
Héroe - Modify Fuerza of Player_Heroes[(Player number of (Triggering player))]: Añadir (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
Otros: Acciones
Otros: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
Or - Any (Conditions) are true
Condiciones
(Substring((Entered chat string), 2, 5)) Igual a Int
(Substring((Entered chat string), 2, 5)) Igual a INT
(Substring((Entered chat string), 2, 5)) Igual a int
Entonces: Acciones
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si: Condiciones
((Triggering player) Madera actual) Mayor que o igual a (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
(Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))))) Mayor que 0
Entonces: Acciones
Jugador - Add (0 - (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))) to (Triggering player) Madera actual
Héroe - Modify Inteligencia of Player_Heroes[(Player number of (Triggering player))]: Añadir (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
Otros: Acciones
Otros: Acciones
[/gui]
Jugador - Jugador 1 (rojo) types a chat message containing - as Una subcadena
Esto define el comando que se usa "- as" en el caso.
(Substring((Entered chat string), 2, 5))
Esta función la ves mucho en los If. Son los lugares donde escribes "agi", "int" o "fue" para agregar los atributos.
((Triggering player) Madera actual) Mayor que o igual a (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
Esta condición sirve para determinar si el número colocado es menor o igual que la madera(para no sobrepasarse)
(Integer((Substring((Entered chat string), 6, (Length of (Entered chat string)))) esa función es el número colocado.