Battlemage
Neuankömmling
Dann muss ich ja noch einen Fehler gemacht haben. Och mann, ich bin zu dumm für diese Welt.
Ok, vielleicht geht das so einfacher, das ist mein script:
Bitte sucht zuerst fehler in den Befehlen und erst, wenn ihr da keine findet, in der Rechnung.
Ich danke euch für eure Hilfe.
mfG Battlemage
Ok, vielleicht geht das so einfacher, das ist mein script:
scriptname "heilen"
Begin ScriptEffectStart
float health
float maxhealth
float magicka
float need
float skill
float value
set health to [player]GetActorValue Health
set maxhealth to [player]GetBaseActorValue Health
set magicka to [player]GetActorValue Magicka
set skill to [player]GetActorValue Restoration
if skill >= 100
set skill to 100
endif
set need to maxhealth - health
set need to need^1.3
set need to need*1.28
set value to skill*0.00858
set value to 1 - value
set need to need*value
if need <= magicka
set value to magicka - need
set health to maxhealth
endif
elseif need > magicka
set value to magicka / value
set value to value / 1.28
set magicka to value
set skill to magicka - 32768
set skill to skill^1.3
if skill > value
set magicka to magicka - 32768
endif
set skill to magicka - 16384
set skill to skill^1.3
if skill > value
set magicka to magicka - 16384
endif
set skill to magicka - 8192
set skill to skill^1.3
if skill > value
set magicka to magicka - 8192
endif
set skill to magicka - 4096
set skill to skill^1.3
if skill > value
set magicka to magicka - 4096
endif
set skill to magicka - 2048
set skill to skill^1.3
if skill > value
set magicka to magicka - 2048
endif
set skill to magicka - 1024
set skill to skill^1.3
if skill > value
set magicka to magicka - 1024
endif
set skill to magicka - 512
set skill to skill^1.3
if skill > value
set magicka to magicka - 512
endif
set skill to magicka - 256
set skill to skill^1.3
if skill > value
set magicka to magicka - 256
endif
set skill to magicka - 128
set skill to skill^1.3
if skill > value
set magicka to magicka - 128
endif
set skill to magicka - 64
set skill to skill^1.3
if skill > value
set magicka to magicka - 64
endif
set skill to magicka - 32
set skill to skill^1.3
if skill > value
set magicka to magicka - 32
endif
set skill to magicka - 16
set skill to skill^1.3
if skill > value
set magicka to magicka - 16
endif
set skill to magicka - 8
set skill to skill^1.3
if skill > value
set magicka to magicka - 8
endif
set skill to magicka - 4
set skill to skill^1.3
if skill > value
set magicka to magicka - 4
endif
set skill to magicka - 2
set skill to skill^1.3
if skill > value
set magicka to magicka - 2
endif
set skill to magicka - 1
set skill to skill^1.3
if skill > value
set magicka to magicka - 1
endif
set health to health + magicka
set value to 0
endif
SetActorValue Health health
SetActorValue Magicka value
end
Begin ScriptEffectStart
float health
float maxhealth
float magicka
float need
float skill
float value
set health to [player]GetActorValue Health
set maxhealth to [player]GetBaseActorValue Health
set magicka to [player]GetActorValue Magicka
set skill to [player]GetActorValue Restoration
if skill >= 100
set skill to 100
endif
set need to maxhealth - health
set need to need^1.3
set need to need*1.28
set value to skill*0.00858
set value to 1 - value
set need to need*value
if need <= magicka
set value to magicka - need
set health to maxhealth
endif
elseif need > magicka
set value to magicka / value
set value to value / 1.28
set magicka to value
set skill to magicka - 32768
set skill to skill^1.3
if skill > value
set magicka to magicka - 32768
endif
set skill to magicka - 16384
set skill to skill^1.3
if skill > value
set magicka to magicka - 16384
endif
set skill to magicka - 8192
set skill to skill^1.3
if skill > value
set magicka to magicka - 8192
endif
set skill to magicka - 4096
set skill to skill^1.3
if skill > value
set magicka to magicka - 4096
endif
set skill to magicka - 2048
set skill to skill^1.3
if skill > value
set magicka to magicka - 2048
endif
set skill to magicka - 1024
set skill to skill^1.3
if skill > value
set magicka to magicka - 1024
endif
set skill to magicka - 512
set skill to skill^1.3
if skill > value
set magicka to magicka - 512
endif
set skill to magicka - 256
set skill to skill^1.3
if skill > value
set magicka to magicka - 256
endif
set skill to magicka - 128
set skill to skill^1.3
if skill > value
set magicka to magicka - 128
endif
set skill to magicka - 64
set skill to skill^1.3
if skill > value
set magicka to magicka - 64
endif
set skill to magicka - 32
set skill to skill^1.3
if skill > value
set magicka to magicka - 32
endif
set skill to magicka - 16
set skill to skill^1.3
if skill > value
set magicka to magicka - 16
endif
set skill to magicka - 8
set skill to skill^1.3
if skill > value
set magicka to magicka - 8
endif
set skill to magicka - 4
set skill to skill^1.3
if skill > value
set magicka to magicka - 4
endif
set skill to magicka - 2
set skill to skill^1.3
if skill > value
set magicka to magicka - 2
endif
set skill to magicka - 1
set skill to skill^1.3
if skill > value
set magicka to magicka - 1
endif
set health to health + magicka
set value to 0
endif
SetActorValue Health health
SetActorValue Magicka value
end
Ich danke euch für eure Hilfe.
mfG Battlemage