Jump to content

[LE] someone please fix this script


Recommended Posts

sorry for my bad english,

i like to recreate Equilibrium spell, and have this some syntax problem, can somebody fix it please?

 

;while magicka under 100% and health above 50%

while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) AND (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)

 

;damage health by 10 point per second and heal magicka by 10 point per second

Game.GetPlayer().DamageAV("Health", 10)
Game.GetPlayer().RestoreAV("Health", 10)

delay 1 second ;<= i dont know this script

endWhile

Link to comment
Share on other sites

Change your "AND" to &&. I don't think "AND" will work.

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile
Edited by Grospolina
Link to comment
Share on other sites

 

Change your "AND" to &&. I don't think "AND" will work.

 

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

 

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile

thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax

Link to comment
Share on other sites

Indeed, I second the magic effect suggestion.

 

 

Change your "AND" to &&. I don't think "AND" will work.

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile

thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax

 

WaitMenuMode is for time spent in the a menu, which is otherwise not counted. It appears not all menus pause game time though.

WaitGameTime is for time spent in the game(not real time) and is not counted in menus.

Wait is real time spent and is not counted in menus.

Edited by Rasikko
Link to comment
Share on other sites

sorry for my bad english,

i like to recreate Equilibrium spell, and have this some syntax problem, can somebody fix it please?

 

;while magicka under 100% and health above 50%

while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) AND (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)

 

;damage health by 10 point per second and heal magicka by 10 point per second

Game.GetPlayer().DamageAV("Health", 10)

Game.GetPlayer().RestoreAV("Health", 10)

delay 1 second ;<= i dont know this script

endWhile

 

 

 

Change your "AND" to &&. I don't think "AND" will work.

 

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

 

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile

 

 

 

 

Change your "AND" to &&. I don't think "AND" will work.

 

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

 

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile

thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax

 

 

 

You should be able to accomplish all of the desired effects listed here without needing any scripting at all, just use of conditions on the magic effects of the spell.

 

 

Indeed, I second the magic effect suggestion.

 

 

Change your "AND" to &&. I don't think "AND" will work.

 

To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours).

 

;while magicka under 100% and health above 50%
while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1)
    ;damage health by 10 point per second and heal magicka by 10 point per second

    Game.GetPlayer().DamageAV("Health", 10)
    Game.GetPlayer().RestoreAV("Health", 10)

    Utility.Wait(1.0)
endWhile

thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax

 

WaitMenuMode is for time spent in the a menu, which is otherwise not counted. It appears not all menus pause game time though.

WaitGameTime is for time spent in the game(not real time) and is not counted in menus.

Wait is real time spent and is not counted in menus.

 

 

Note: None of the above Wait effects will pause the game, just that particular script's execution.

 

yes it work, thanks anyone, i add new kudos to everybody,

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...