Jump to content

Combining Scripts


Grabstein

Recommended Posts

Hey, all. Is there a way to combined multiple scripts that are not adding or subtracting from inventory or spell listings? My two scripts, right now, are

ScN gDepthsEdgeLevelScript

 

Ref BladeRef

float damageOldValue

float damageRelValue

float damageNewValue

float healthOldValue

float healthRelValue

float healthNewValue

float reachOldValue

float reachRelValue

float reachNewValue

float speedOldValue

float speedRelValue

float speedNewValue

float damageNewValueTEST

float healthNewValueTEST

float reachNewValueTEST

float speedNewValueTEST

float chargeNewValueTEST

float rechargeFactorOldValue

float rechargeFactorRelValue

float rechargeFactorNewValue

short usesOldValue

short usesRelValue

short usesNewValue

short chargePerUse

Short PlayerLevel

Short UpdateLevel

 

Ref PlayerRef

Ref EnchRef

 

Begin OnAdd {BladeRef}

 

If PlayerLevel < 2

Set UpdateLevel to 1

Set EnchRef to gDepthsEdge01

Set DamageNewValue to 3

Set HealthNewValue to DamageNewValue * 100

Set RechargeFactorNewValue to 1.1

Set UsesNewValue to 5

Set ChargePerUse to 15

 

ElseIf PlayerLevel < 3

Set UpdateLevel to 2

Set EnchRef to gDepthsEdge02

Set DamageNewValue to 6

Set HealthNewValue to DamageNewValue * 200

Set RechargeFactorNewValue to 1.2

Set UsesNewValue to 10

Set ChargePerUse to 30

 

ElseIf PlayerLevel < 4

Set UpdateLevel to 3

Set EnchRef to gDepthsEdge03

Set DamageNewValue to 9

Set HealthNewValue to DamageNewValue * 300

Set RechargeFactorNewValue to 1.3

Set UsesNewValue to 15

Set ChargePerUse to 45

[...]

Endif

End

 

Begin OnAdd {PlayerRef}

 

Set BladeRef to gDepthsEdge

PlayerRef.SetAttackDamage DamageNewValue BladeRef

PlayerRef.SetObjectHealth HealthNewValue BladeRef

PlayerRef.SetWeaponReach ReachNewValue BladeRef

PlayerRef.SetWeaponSpeed SpeedNewValue BladeRef

PlayerRef.SetEnchantment EnchRef BladeRef

End

 

 

and

ScN gDepthsEdgeSummoningScript

 

Ref Self

 

Begin OnAdd

Self.AddItem gDepthsEdge 1

Self.EquipItem gDepthsEdge

End

 

Begin OnUnequip

Set Self to GetSelf

Disable

RemoveMe

End

 

 

 

I've successfully put magical effect scripts together, using a quest script. However, I'm not quite sure how to do that for object scripts. I've not been able to find anything, really, on it. Don't know if I'm just looking for the wrong terminology. When I *did* try to just add lines from one to the other, I got some weird effects like always being "in combat" without being able to move and having a copy of the sword being added every second...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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