Shadow-King
Reisender
Also das mit dem Dialogen klappt soweit, nur das mit der Queststage und dem verschwinden klappt nicht. :?
scn NoUseScript
Begin OnActivate
if isActionRef player == 1
; ich glaube das muss man haben damit das script klappt
if player.GetLevel <= 5
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell01 player
elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell02 player
elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell03 player
elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell04 player
elseif ( player.GetLevel >= 21 ) && (player.GetLevel <= 25 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell05 player
elseif ( player.GetLevel >= 26 ) && (player.GetLevel <= 30 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell06 player
elseif ( player.GetLevel >= 31 ) && (player.GetLevel <= 35 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell07 player
elseif ( player.GetLevel >= 36 ) && (player.GetLevel <= 40 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell08 player
elseif ( player.GetLevel >= 41 ) && (player.GetLevel <= 45 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell09 player
elseif player.GetLevel >= 46
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell10 player
endif
endif
End
Only certain types of objects appear to serve as valid targets. Actors and activators work, but when some other object types, such as Items, are supplied for the Target parameter, the spell projectile will travel down the negative y-axis rather than in the direction of the target.
scn SEOrderPriest1ResurrectSCRIPT
float resurrectTimer ; used to time resurrection
short resurrecting ; set to 1 when when dead and resurrecting
; set to 2 when really dead (obelisk is shut down)
short SpellRemove ; flag for if spell is removed because spell removal is not immediate
ref myParent ; parent obelisk
ref mySelf ; myself
begin OnLoad
set myParent to GetParentRef
set mySelf to GetSelf
if resurrecting == 1
; I'm not really dead
pms SEPriestResurrectShader
endif
; make sure he doesn't drop his staff when he dies
equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies
end
begin OnDeath
end
[B]begin OnActivate
if isActionRef player == 1
; I'm not really dead
if resurrecting == 1
; don't touch me, I'm ELECTRIFIED!
[COLOR="Red"]; move marker to player and cast from it -- hack because dead actors can't cast spells[/COLOR]
[COLOR="Lime"] SEOrderPriestCastingMarker.moveto player
SEOrderPriestCastingMarker.cast[/COLOR] StandardShockDamageTarget1Novice player[/B]
else
Activate
endif
else
Activate
endif
end
begin gamemode
; don't run script if disabled or really dead
if getdisabled == 1 || resurrecting == 2
return
endif
if resurrecting == 0
if getDead == 1
; NOTE: priest faction used to indicate that obelisk is deactivated
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0
; I'm not really dead
pms SEPriestResurrectShader
set resurrecting to 1
set resurrectTimer to SEOrderPriestResurrectTimer
else
; I'm really dead
setownership
set resurrecting to 2
endif
endif
endif
if resurrecting == 1
if resurrectTimer > 0
set resurrectTimer to resurrectTimer - getsecondsPassed
else
sms SEPriestResurrectShader
; NOTE: priest faction used to indicate that obelisk is deactivated
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0
set resurrecting to 0
; start resurrection
pme REAN
; myParent.cast StandardShockDamageTarget1Novice mySelf
resurrect 1
; reequip staff
equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies
else
set resurrecting to 2
endif
endif
endif
; add power if obelisk is active, remove it if inactive
if myParent != 0
; if I have the spell, and obelisk is deactivated, remove it
if SpellRemove == 0 && myParent.isOwner SEOrderPriestFaction == 1
pme RFLC
Set SpellRemove to 1
; TODO: modify model?
; while we're at it, check package to see if I should be going to Find obelisk
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getitemcount SEOrderPriestWidget == 0
additem SEOrderPriestWidget 1
modav aggression -100
evp
else
stopcombat
endif
endif
endif
; if I don't have the spell, and obelisk is activated, add it
elseif SpellRemove == 1 && myParent.isOwner SEOrderPriestFaction == 0 && getdead == 0
pme RFLC
Set SpellRemove to 0
; TODO: modify model?
; while we're at it, check package to see if I'm still on the Find obelisk
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 1
evp
endif
endif
endif
end
begin OnHit
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
evp
else
; 20% chance to drop out of combat and go for the obelisk with each hit
if getrandompercent <= 20
stopcombat
endif
endif
endif
end
begin OnStartCombat
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
evp
endif
endif
end
DeinNpc.Cast DeinZauber DeinNpc
Begin ScriptEffectStart
disable
end
PlayMagicEffectVisuals REHE, Duration (optional)
Shadownpc4.cast Verschwindespell Shadownpc4
Setstage 1Shadowquest 100
2. Das Result-Script ist:
Das erste macht er ja noch aber das zweite nicht mehr.Code:Shadownpc4.cast Verschwindespell Shadownpc4 Setstage 1Shadowquest 100
Wie bekomme ich jetzt die Stage erhöht?
Sagen wir mal ich hätte mich verguckt und der XMarker ist doch das falsche Objekt - wie kann ich das dann beheben?
scn NoUseScript
Begin OnActivate Player
if player.GetLevel <= 5
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell01 player
elseif ( player.GetLevel >= 6 ) && ( player.GetLevel <= 10 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell02 player
elseif ( player.GetLevel >= 11) && ( player.GetLevel <= 15 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell03 player
elseif ( player.GetLevel >= 16 ) && ( player.GetLevel <= 20 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell04 player
elseif ( player.GetLevel >= 21 ) && (player.GetLevel <= 25 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell05 player
elseif ( player.GetLevel >= 26 ) && (player.GetLevel <= 30 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell06 player
elseif ( player.GetLevel >= 31 ) && (player.GetLevel <= 35 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell07 player
elseif ( player.GetLevel >= 36 ) && (player.GetLevel <= 40 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell08 player
elseif ( player.GetLevel >= 41 ) && (player.GetLevel <= 45 )
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell09 player
elseif player.GetLevel >= 46
NoUseMarker.MoveTo Player
NoUseMarker.cast NoUseSpell09 player
endif
endif
End
scn SEOrderPriest1ResurrectSCRIPT
float resurrectTimer ; used to time resurrection
short resurrecting ; set to 1 when when dead and resurrecting
; set to 2 when really dead (obelisk is shut down)
short SpellRemove ; flag for if spell is removed because spell removal is not immediate
ref myParent ; parent obelisk
ref mySelf ; myself
begin OnLoad
set myParent to GetParentRef
set mySelf to GetSelf
if resurrecting == 1
; I'm not really dead
pms SEPriestResurrectShader
endif
; make sure he doesn't drop his staff when he dies
equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies
end
begin OnDeath
end
begin OnActivate
if isActionRef player == 1
; I'm not really dead
if resurrecting == 1
; don't touch me, I'm ELECTRIFIED!
; move marker to player and cast from it -- hack because dead actors can't cast spells
SEOrderPriestCastingMarker.moveto player
SEOrderPriestCastingMarker.cast StandardShockDamageTarget1Novice player
else
Activate
endif
else
Activate
endif
end
begin gamemode
; don't run script if disabled or really dead
if getdisabled == 1 || resurrecting == 2
return
endif
if resurrecting == 0
if getDead == 1
; NOTE: priest faction used to indicate that obelisk is deactivated
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0
; I'm not really dead
pms SEPriestResurrectShader
set resurrecting to 1
set resurrectTimer to SEOrderPriestResurrectTimer
else
; I'm really dead
setownership
set resurrecting to 2
endif
endif
endif
if resurrecting == 1
if resurrectTimer > 0
set resurrectTimer to resurrectTimer - getsecondsPassed
else
sms SEPriestResurrectShader
; NOTE: priest faction used to indicate that obelisk is deactivated
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 0
set resurrecting to 0
; start resurrection
pme REAN
; myParent.cast StandardShockDamageTarget1Novice mySelf
resurrect 1
; reequip staff
equipItem SEObeliskPriestStaff01 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff02 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff03 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff04 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff05 1 ; so he doesn't drop it when he dies
equipItem SEObeliskPriestStaff06 1 ; so he doesn't drop it when he dies
else
set resurrecting to 2
endif
endif
endif
; add power if obelisk is active, remove it if inactive
if myParent != 0
; if I have the spell, and obelisk is deactivated, remove it
if SpellRemove == 0 && myParent.isOwner SEOrderPriestFaction == 1
pme RFLC
Set SpellRemove to 1
; TODO: modify model?
; while we're at it, check package to see if I should be going to Find obelisk
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getitemcount SEOrderPriestWidget == 0
additem SEOrderPriestWidget 1
modav aggression -100
evp
else
stopcombat
endif
endif
endif
; if I don't have the spell, and obelisk is activated, add it
elseif SpellRemove == 1 && myParent.isOwner SEOrderPriestFaction == 0 && getdead == 0
pme RFLC
Set SpellRemove to 0
; TODO: modify model?
; while we're at it, check package to see if I'm still on the Find obelisk
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 1
evp
endif
endif
endif
end
begin OnHit
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
evp
else
; 20% chance to drop out of combat and go for the obelisk with each hit
if getrandompercent <= 20
stopcombat
endif
endif
endif
end
begin OnStartCombat
if myParent != 0 && myParent.isOwner SEOrderPriestFaction == 1
if getiscurrentpackage SEOrderPriestActivateObelisk1 == 0
evp
endif
endif
end