Ich habe ein größeres Script Problem. Habe es zwar schon in anderen Foren probiert, aber da konnte mir niemand helfen.
Was ich will: Man soll von einem Turm aus einen Mann (Lierius Dubus) beobachten können. Der Mann soll die Treppe hochschleichen, sich umsehen, im Türramen verschwinden (er wird dann disabelt), und an einer anderen Tür wieder auftauchen (dort wird er wieder enablet). Er steht dann auf einer Brücke und soll zur Mitte der Brücke gehen. Gleichzeitig soll auch ein anderer NPC (Andunis), der am anderen Ende der Brücke steht auch zur Mitte gehen und sich quasi mit ihm treffen. Danach gehen beide wieder zu ihrem ausgangspunkt zurück. Der Spieler steht dabei, wie schon erwähnt auf einem Turm. Eine Falltür dient dabei als Auslöser für den Script. Auf der Falltür liegt folgender Script:
code: Begin MoonS_Wander_LD
short distancecheck
short travelstate
float timer
If ( travelstate == -1 )
Return
Endif
If ( MenuMode == 1 )
Return
Endif
If ( GetJournalIndex "NF_MoonS" != 25 )
Return
Endif
if ( distancecheck == 0 )
if ( GetDistance Player > 512 )
return
endif
endif
If ( travelstate == 0 )
If ( Gamehour < 22 )
If ( GameHour > 4 )
Return
Endif
Endif
Set travelstate to 1
Set distancecheck to 1
MessageBox "TIME AND DISTANCE OK. WALK AFTER 3 SEK!"
elseif ( travelstate == 1 )
if ( GetJournalIndex "NF_MoonS" = 25 )
set Dubustravel to 1
set travelstate to 2
"Lierius Dubus"->AddItem "light_com_torch_moonS" 1
MessageBox "STATE 1 -- SCRIPT RUNNING"
endif
elseif ( travelstate == 2 )
set timer to timer + GetSecondsPassed
if ( timer > 3 )
"Lierius Dubus"->Equip "light_com_torch_moonS"
"Lierius Dubus"->AiTravel 152569, 202904, 359 ;upstairs
set travelstate to 3
endif
elseif ( travelstate == 3 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 4
MessageBox "SHOULD BE UPSTAIRS"
endif
elseif ( travelstate == 4 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 3 )
"Lierius Dubus"->ForceSneak
"Lierius Dubus"->AiTravel 152829, 202913, 359 ;turn around
set travelstate to 5
endif
elseif ( travelstate == 5 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 6
MessageBox "TURNED RIGHT"
endif
elseif ( travelstate == 6 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->ClearForceSneak
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 3 )
"Lierius Dubus"->ForceSneak
"Lierius Dubus"->AiTravel 152800, 202267, 620 ;upstairs again
set travelstate to 7
endif
elseif ( travelstate == 7 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 8
"Lierius Dubus"->Face 152689, 202293
MessageBox "SHOULD BE UPSTAIS AGAIN AND FACE THE KEEP"
endif
elseif ( travelstate == 8 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->ClearForceSneak
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 3 )
"Lierius Dubus"->ForceSneak
"Lierius Dubus"->AiTravel 153029, 202244, 620 ;to the T-Corner
set travelstate to 9
endif
elseif ( travelstate == 9 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 10
MessageBox "SHOULD BE AT T-CORNER"
endif
elseif ( travelstate == 10 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->ClearForceSneak
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 3 )
"Lierius Dubus"->ForceSneak
"Lierius Dubus"->AiTravel 153017, 201457, 620 ;along the Wall
set travelstate to 11
endif
elseif ( travelstate == 11 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 12
MessageBox "SHOULD BE AT WALL"
endif
elseif ( travelstate == 12 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->ClearForceSneak
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 3 )
"Lierius Dubus"->ForceSneak
"Lierius Dubus"->AiTravel 153017, 200623, 620 ;goes to door
set travelstate to 13
endif
elseif ( travelstate == 13 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 14
MessageBox "SHOULD BE AT DOOR"
endif
elseif ( travelstate == 14 )
"Lierius Dubus"->ClearForceSneak
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
"Lierius Dubus"->disable ;disable
"Lierius Dubus"->PositionCell 152994, 200027, 858, 0, "Festung der Nachtfalter-Legion"
set travelstate to 15
elseif ( travelstate == 15 )
Set timer to timer + GetSecondsPassed
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 4 )
"Lierius Dubus"->enable
"Lierius Dubus"->AiTravel 152992, 199606, 858 ;goes to middle of the bridge
set travelstate to 16
endif
elseif ( travelstate == 16 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 17
Set Dubustravel to 2
MessageBox "SHOULD BE AT MIDBRIDGE. FACE THE KEEP AND WAIT."
endif
elseif ( travelstate == 17 )
set timer to timer + GetSecondsPassed
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 8 )
"Lierius Dubus"->AiTravel 152994, 200027, 858 ;goes back to upper door
set travelstate to 18
endif
elseif ( travelstate == 18 )
if ( "Lierius Dubus"->GetAiPackageDone == 1 )
set timer to 0
set travelstate to 19
MessageBox "SHOULD BE BACK AT UPPER DOOR"
endif
elseif ( travelstate == 19 )
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
"Lierius Dubus"->disable ;disable
"Lierius Dubus"->PositionCell 153017, 200623, 620, 10800, "Festung der Nachtfalter-Legion"
set travelstate to 20
elseif ( travelstate == 20 )
Set timer to timer + GetSecondsPassed
"Lierius Dubus"->AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 5 )
"Lierius Dubus"->enable
"Lierius Dubus"->AiTravel 153017, 201457, 620 ;back to the wall
set travelstate to 21
endif
elseif ( travelstate == 21 )
set dubustravel to 3
set travelstate to -1
endif
End MoonS_Wander_LD
Auf Lierius Dubus liegt zusätzlich noch folgender Script:
code: begin MoonS_disable
If ( MenuMode == 1 )
Return
Endif
If ( getJournalIndex "NF_MoonS" = 0 )
"Lierius dubus"->disable
endif
If ( getJournalIndex "NF_MoonS" > 0 )
"Lierius dubus"->enable
endif
end MoonS_disable
Dieser Script liegt auf Andunis. Die Variable "dubustravel" ist natürlich eine Global :
code: Begin MoonS_Andunis
short state
float timer
short doonce
If ( MenuMode == 1 )
Return
Endif
If ( state == -1 )
Return
Endif
If ( dubustravel == 2 )
If ( donce == 0 )
set state to 1
set doonce to 1
Endif
Endif
If ( state == 1 )
AiWander 0 0 0 0 0 0 0 0 0
AiTravel 152992, 199500, 858 ;middle of the Bridge
set state to 2
Journal "NF_MoonS" 30
endif
elseif ( state == 2 )
if ( GetAiPackageDone == 1 )
set state to 3
MessageBox "ANDUNIS AT THE MIDDLE"
endif
elseif ( state == 3 )
Set timer to timer + GetSecondsPassed
AiWander 0 0 0 0 0 0 0 0 0
if ( timer > 4 )
AiTravel 152989, 199149, 858 ;back to the Door
set state to 4
endif
elseif ( state == 4 )
if ( GetAiPackageDone == 1 )
set state to 5
set timer to 0
MessageBox "ANDUNIS AT THE DOOR"
endif
elseif ( state == 5 )
set state to -1
endif
End MoonS_Andunis
Und wo ist nun das Problem? Gut: Dubus geht zwar die Treppe hoch, verschwindet in der Tür und kommt ober wieder heraus, doch er will einfach nicht zur Mitte der Brücke gehen und sich mit Andunis treffen. 
Woran könnte es liegen?
__________________ ___________________________________
|