Transportation that *ahem* moves
Moderators: Haplo, Lead Developers
Transportation that *ahem* moves
As it stands, you never ever see a boat at sea, or a silt strider en rout. I dont know if is feesable to do it but I think its possible.
Making Silt Striders move between locations, and having boats sail to their destinations. Make it optional to take the boat....i'll explane better
set the boats men and the strider men to give you the time of the next departure (and perhaps ETA's too), and the option just to be instantly moved (with the regular time laps).
Or, have at the time of depature, you jump in to the strider, or board the boat, and once your with in the right zone, you are opened into a dialouge that askes you for payment. then the thing leaves. you could jump off early, or if your sneaky maby even slip on the outside or stowaway on a ship.
This could add major depth to the game, possiblity of marytime guilds, pirates, ect.
any thoughts. Personaly I cant see it hapening, but it is possible. I see boats being more possible because you have less in the way in the aspect of tarrain.
also might make sense for the fishing villages to have small vesseles at sea.
Making Silt Striders move between locations, and having boats sail to their destinations. Make it optional to take the boat....i'll explane better
set the boats men and the strider men to give you the time of the next departure (and perhaps ETA's too), and the option just to be instantly moved (with the regular time laps).
Or, have at the time of depature, you jump in to the strider, or board the boat, and once your with in the right zone, you are opened into a dialouge that askes you for payment. then the thing leaves. you could jump off early, or if your sneaky maby even slip on the outside or stowaway on a ship.
This could add major depth to the game, possiblity of marytime guilds, pirates, ect.
any thoughts. Personaly I cant see it hapening, but it is possible. I see boats being more possible because you have less in the way in the aspect of tarrain.
also might make sense for the fishing villages to have small vesseles at sea.
I've always thought this would be a great idea. You arrive late to watch the boat sailing without you,or arrive to find the silt strider is already full. Makes it appear that the world isn't just there to serve you but continues in your absence. Also opens up quest possibilities, defend a boat at sea from pirates,kidnap a siltstrider passenger before he reaches his destination,ambush a smuggling party as they row ashore or wreck a ship on rocks by disabling a lighthouse. Moving transport opens up hundreds of possibilities but takes a ton of script to achieve it.
I found this neat mod that has travelling merchants between certain locations. If this can be done with mechants, it can be done with striders and boats. Here is the link and here is the very long script from it. The scripting is excellent. All obstacles were covered. It was made by someone named GhanBuriGhan.
[url]http://thelys.mwsource.com/index.php?morrowindmods=True&authorpage=GhanBuriGhan#Traveling%20Merchants[/url]
Begin _HB_guar_handler
;Script to make Mine Caravan travel between mines and Caldera
;****************remember to remove debug messages!*******************
short state ; main state variable for sequential walk
short returnstate ; 0: travels to Caldera, 1: travels to the mines
short doonce
short rescue ; state variable for rescue script
short daymineshutdown
short wait_caldera
float timer ; timer used for loitering etc.
float timeout ; used to check for idle NPC to recover script if necessary
float timeout2 ; timer for stalled script rescue.
short savestate
short nodistcheck
; talking about travel
AddTopic, "travel at night"
; *********************Debug messages
if (HB_Debug == 1 )
float debugtimer
set debugtimer to ( debugtimer + GetSecondsPassed )
if ( debugtimer >= 3 )
MessageBox " Debug: state = %.0f savestate = %.0f returnstate = %.0f rescue = %.0f nodistcheck = %.0f timer = %.2f timeout2 = %.2f Gamehour = %.2f", state, savestate, returnstate, rescue, nodistcheck, timer, timeout2, GameHour
set debugtimer to 0
endif
endif
if ( menumode == 1) ; if menu is open don't process
return
endif
; *******Manual reset
if ( HB_reset == 1)
set rescue to 6
set state to 9999
set savestate to 9999
set nodistcheck to 1
set HB_reset to 0
endif
; *************** Stalled Script rescue - recovers script after leaving a cell or resting
If ( Player -> GetDistance, HB_mine_guar_handler< 5000 ); should be smaller then AI distance or it doesnt work
if (GetCurrentAIPackage == -1)
; MessageBox "Debug Message: AiPackage is -1 at state = %.0f", state
set timeout to ( timeout + GetSecondsPassed )
if ( timeout >= 2)
if (state != 9999 ) ; don't mess while trying to reunite caravan
; MessageBox "Debug: rescue stalled script"
set state to (state - 10) ; stall will occur at AIPAckageDone - jump to wander again.
set timeout to 0
endif
endif
else
set timeout to 0
endif
endif
if ( state == 9999 )
if ( Player -> GetDistance, HB_mine_guar_handler < 5000 )
if (GetCurrentAIPackage == -1)
; MessageBox "Debug Message: AiPackage is -1 at state = %.0f", state
set timeout to ( timeout + GetSecondsPassed )
if ( timeout >= 60)
; MessageBox "Debug: rescue stalled script"
HB_mine_guar_handler -> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0
HB_guar_pack_mine1 -> AIWander 1000, 0, 0, 0,0,10,0
HB_guar_pack_mine2 -> AIWander 1000, 0, 0, 0,0,10,0
HB_Caravan_Guard -> AIWander 1000, 0, 0 , 0,10,0,0,10,5,0,0
set rescue to 7 ; reset caravan
set timeout to 0
endif
endif
else
set timeout to 0
endif
endif
if ( state <= -10 ) ; stallrescue failed
set rescue to 8
set state to 9999
set savestate to 9999
set nodistcheck to 1
endif
;********************* recover script to reset script when caravan gets separated - i am proud of this one...
; if you want to do caravans yourself you WILL NEED to put a version of this in.
; It takes care of separation problems that happen when the player fasttravels or sleeps
; in the viscinity of a travelling caravan.
;***************************************************** begin rescue code*****************************
if ( nodistcheck == 0 )
if ( rescue == 0 ) ; when rescue isnt allready active
if ( HB_mine_guar_handler-> GetDistance, HB_guar_pack_mine2 > 1500 ) ; in case they get separated - guar gets stuck
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 > 2 ) ;allow caravan 7 seconds to catch up
set timeout2 to 0
set rescue to 1; start rescue process
set savestate to 0 ; reset savestate if rescue was called before
endif
endif
else
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine2 < 800 )
if ( HB_guar_pack_mine1 -> GetDistance, HB_guar_pack_mine2 < 700 )
set timeout2 to 0
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set rescue to 0
if (returnstate == 0 )
if ( rescue < 4 )
set state to savestate - 10
elseif ( rescue < 6 )
set state to savestate - 30
else
set state to savestate - 50
endif
elseif ( returnstate == 1 )
if ( rescue < 4 )
set state to savestate - 10
elseif (rescue < 6 )
set state to savestate + 10
else
set state to savestate + 30
endif
endif
endif
endif
endif
endif ; nodistcheck
;**********try to reunite caravan by walking back if that doesnt work reset to starting positions
;**********The above distance checks will jump in and out of this code
if ( rescue == 1 )
if ( GetCurrentAIPackage == 1) ; travel AI
set savestate to state ; save state when entering rescue
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ) ; stage one, wait a moment to be sure he is on "wait for AI"
if (state == savestate)
set state to 9999 ; don't go anywhere else
set rescue to 2
set timeout2 to 0
else
set savestate to state
set timeout2 to 0
endif
endif
endif
elseif ( rescue == 2 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( HB_guar_pack_mine2 -> GetDistance, HB_guar_pack_mine1 > 800 )
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
if ( returnstate == 0 )
set state to ( savestate - 30 ) ; then go back to last point
elseif (returnstate == 1)
set state to ( savestate + 10 )
endif
set rescue to 3
elseif ( rescue == 3 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.2 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 1 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 6 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 4 ; on more back
set timeout2 to 0
endif
elseif ( rescue == 4 )
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine1 > 600 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( returnstate == 0 )
set state to ( savestate - 50 ) ; then go back to point before last
elseif (returnstate == 1)
set state to ( savestate + 30 )
endif
set rescue to 5
elseif ( rescue == 5 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 2 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 7 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 6 ; to reset
set timeout2 to 0
endif
elseif ( rescue == 6 )
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine1 > 600 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( returnstate == 0 )
set state to ( savestate - 70 ) ; then go back to point before last
elseif (returnstate == 1)
set state to ( savestate + 50 )
endif
set rescue to 7
elseif ( rescue == 7 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 2 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 7 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 8 ; to reset
set timeout2 to 0
endif
elseif ( rescue == 8 ); stage three and four - if nothing helps, reset the whole thing
HB_mine_guar_handler-> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0
HB_Caravan_Guard -> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0 ; Stop any other AI
HB_guar_pack_mine2 -> AIWander 1000, 0, 0, 0,0,10,0,
HB_guar_pack_mine1 -> AIWander 1000, 0, 0, 0,0,10,0,
set timer to 0
set rescue to 9
elseif ( rescue == 9 )
if ( Player -> GetDistance, HB_guar_pack_mine2 > 5000 ) ; set a number of conditions to avoid player seeing them vanish
if ( Player -> GetDistance, HB_mine_guar_handler> 5000 )
if ( Player -> GetDistance, HB_Invisible_Marker_darani > 5000 )
; Then reset actors to starting positions:
; MessageBox "Debug: Caravan reset"
HB_mine_guar_handler -> Position -19700, 26220,1216, 90
HB_guar_pack_mine1 -> Position -19986, 26223,1160, 90
HB_guar_pack_mine2 -> Position -20433, 26183,1146, 90
HB_Caravan_Guard -> Position -20749, 26160,1243, 90
if ( HB_guar_pack_mine2 -> GetHealth <= 0 )
HB_guar_pack_mine2 -> Resurrect
endif
if ( HB_guar_pack_mine1 -> GetHealth <= 0 )
HB_guar_pack_mine1 -> Resurrect
endif
if ( HB_Caravan_Guard -> GetHealth <= 0 )
HB_Caravan_Guard -> Resurrect
endif
;then reset all variables to starting positions
set rescue to 0
set returnstate to 0
set doonce to 0
set timeout2 to 0
set timer to 0
set savestate to 0
set nodistcheck to 0
endif
endif
endif
endif ; end of rescue elseifs
;********************************************* end of rescue code******************************
; ******************* This one starts in the middle of his trip, so set starting conditions here:
if ( doonce == 0) ; initiate AI
If ( Player -> GetDistance, HB_mine_guar_handler < 6000 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set state to 350
set doonce to 1
endif
endif
;******************* Time schedule check
if ( state == -5 )
if ( GameHour > 16 )
set state to -1 ; if its too late, stay in for the night
elseif ( GameHour < 6 )
set state to -1 ; if its too late, stay in for the night
elseif ( GameHour < 16 )
if ( Gamehour > 6 )
set returnstate to 0 ;turn around
set state to 30
endif
endif
; ******************wait the night
elseif ( state == -1)
SetHello 30
AIWander, 300, 5, 0, 60, 20, 20, 20
HB_guar_pack_mine1 -> AIWander, 0, 0, 0, 10, 0, 10, 5
HB_guar_pack_mine2 -> AIWander, 0, 0, 0, 5, 10, 5, 5
set state to -2
elseif ( state == -2)
if ( GameHour < 16 )
if ( GameHour > 6 )
set state to -5 ; if its morning, start the tour again
endif
endif
;********************* some loitering
elseif ( state == 10 )
SetHello 30
AIWander 512, 1, 0, 0, 0, 30, 20, 10, 0,0,0 ; take a break, do business
HB_Caravan_Guard -> AIWander 50, 0, 0, 0,20,5,50,0,5,0,0
set state to (state + 10)
elseif ( state == 20 )
set timer to (timer + GetSecondsPassed)
if ( timer > 60) ;he's done with his loitering
HB_guar_pack_mine1 -> AddItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> AddItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine1 -> RemoveItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> RemoveItem, misc_com_wood_cup_01, 5
set timer to 0 ;reset for next round
set state to -5 ; check wait
endif
;******************* He beginns his trip
elseif ( state == 30 )
SetHello 20
AITravel -21977, 15425, 2005 ;coords point mine entrance
set state to (state + 10)
elseif ( state == 40)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 50)
SetHello 0
AITravel -21683, 15956, 2040 ;coords point of origin -15
set state to (state + 10)
elseif ( state == 60)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
HB_guar_pack_mine1 -> AITravel, -21389, 15817, 2243
HB_guar_pack_mine2 -> AITravel, -21871, 16167, 2203
HB_Caravan_Guard -> AItravel -20965, 15997, 2194
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 70)
AITravel -21516, 16412, 2110 ;coords point -14
set state to (state + 10)
elseif ( state == 80)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
PlaySound3D, "HB_Whistle"
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
set state to (state + 10)
endif
endif
elseif ( state == 90 )
AITravel -20720, 16566, 2170 ;coords point -13
set state to (state + 10)
elseif ( state == 100 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set nodistcheck to 1
set state to (state - 30)
elseif (returnstate == 0)
set nodistcheck to 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set state to (state + 10)
endif
endif
elseif ( state == 110 )
AITravel -20274, 17643, 2433 ;coords point of origin -12. ridge above mine
set state to (state +10)
elseif ( state == 120 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 130 )
AITravel -20274, 19302, 2227 ; new coords point -11
set State to (state +10)
elseif ( state == 140 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 150 )
AITravel -21003, 20206, 1926 ; new coords point -10
set State to (state +10)
elseif ( state == 160 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 170 )
AITravel -23839, 22319, 1346 ; new coords point -9
set state to (state +10)
elseif ( state == 180 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 190 )
AITravel -23839, 22319, 1346 ; new coords point -8
set state to (state +10)
elseif ( state == 200 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 210 )
AITravel -23839, 22319, 1346 ; new coords point -7
set state to (state +10)
elseif ( state == 220 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 230 )
AITravel -24560, 22585, 1346 ;point -6
set state to (state +10)
elseif ( state == 240 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 250 )
AITravel -25048, 23100, 1468 ;point -5
set state to (state +10)
elseif ( state == 260 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 270 )
AITravel -24652, 24623, 1351 ; new coords -4
set state to (state +10)
elseif ( state == 280 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 290 )
AITravel -23402, 25744, 1367 ; new coords point -3
set state to (state +10)
elseif ( state == 300 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 310 )
AITravel -22326, 25804, 1321 ; new coords point -2
set state to (state +10)
elseif ( state == 320 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 330 )
AITravel -21707, 26167, 1367 ; new coords point -1
set state to (state +10)
elseif ( state == 340 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
;***********************************************this is from where he starts!!!!!
elseif ( state == 350 )
AITravel -19700, 26220, 1216 ; new coords point 0, path where handlers stands
set state to (state +10)
elseif ( state == 360 )
if ( GetAIPackageDone == 1 ) ;he's at point 0
if (returnstate == 1)
set state to ( state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 370 )
AITravel -19090, 26003, 1242 ; new coords point 1
set state to (state +10)
elseif ( state == 380 )
if ( GetAIPackageDone == 1 ) ;he's at point 1
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 390 )
AITravel -18642, 25834, 1266 ; new coords point 2
set State to (state +10)
elseif ( state == 400 )
if ( GetAIPackageDone == 1 ) ;he's at point 2
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 410 )
AITravel -18063, 25683, 1265 ; new coords point 3
set State to (state +10)
elseif ( state == 420 )
if ( GetAIPackageDone == 1 ) ;he's reached the point 3
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 430 )
AITravel -16625, 25701, 1327
set state to (state +10)
elseif ( state == 440 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 450 )
AITravel -16170, 25313, 1349
set state to (state +10)
elseif ( state == 460 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 470 )
AITravel -16010, 24735, 1373
set state to (state +10)
elseif ( state == 480 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 490 )
AITravel -14873, 23190, 1389
set state to (state +10)
elseif ( state == 500 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0 ; this is for when travelling back
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 510 )
AITravel -14294, 22432, 1483 ;new coords outside portal
set state to (state +10)
elseif ( state == 520 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set nodistcheck to 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0 ; this is for when travelling back
set state to (state - 30)
elseif (returnstate == 0)
set nodistcheck to 1
set state to (state + 10)
endif
endif
elseif ( state == 530 )
AITravel -13434, 22041, 1640 ;in front of portal
set state to (state + 10)
elseif ( state == 540 )
if ( GetAIPackageDone == 1 ) ;he's reached portal
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 550 )
AITravel -12938, 21522, 1646 ;inside portal
set state to (state + 10)
elseif ( state == 560 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
HB_Caravan_Guard -> AItravel -13627, 21817, 1591
HB_guar_pack_mine1 -> AITravel -12521, 21217, 1618
set state to (state + 10)
endif
endif
elseif ( state == 570 )
AITravel -12963, 21043, 1637 ;on street in Caldera
set state to (state + 10)
elseif ( state == 580 )
if ( GetAIPackageDone == 1 ) ;he's reached portal
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
HB_guar_pack_mine2 -> AITravel -12471, 21629, 1661
set state to (state + 10)
endif
endif
elseif ( state == 590 )
AIWander 500, 0, 0, 10, 0, 20, 0, 5, 20, 5, 0 ; hanging out
set state to (state + 10)
elseif ( state == 600 )
set timer to (timer + GetSecondsPassed)
;***** This serves to keep the Caravan in Caldera for approx. 30 days
;***** after the player has completed the disrupt Caldera mines quest:
if (GetJournalIndex, HR_CalderaDisrupt >= 50) ; ***head slave freed or quest finished
if ( daymineshutdown == 0 ) ; ***a do-once condition
HB_guar_pack_mine1 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_raw_ebony_01, 10
set daymineshutdown to Day ;****store the day
endif
if ((daymineshutdown + 30 ) <= Day )
set timer to 0 ; ***if timer is reset here, the following condition will not be fulfilled and the caravan should stay
set wait_caldera to 1 ; *** used to give guar handler a special dialogue while waiting
endif
endif
if timer > 5
HB_Caravan_Guard -> AIWander 0, 0, 0, 10, 0, 5, 0, 5, 0
endif
if ( timer > 60) ;he's done with his loitering
set wait_caldera to 0
HB_guar_pack_mine1 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine1 -> AddItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> AddItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> AddItem, misc_com_wood_cup_01, 5
set timer to 0 ;reset for next round
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
;********************** check status , currently active
elseif ( state == 610 )
if ( GameHour >17 )
set state to -3 ; if its too late, stay for the night
elseif ( GameHour < 5 )
set state to -3 ; if its too early also stay for the night
elseif ( GameHour < 17 ) ; if its not too late or in the morning...
if ( Gamehour > 5 )
set returnstate to 1 ;turn around
set state to (state + 10 ) ; continue walking
endif
endif
elseif ( state == 620 )
AITravel -12963, 21043, 1637 ;new coords point just inside portal
set state to (state + 10)
elseif ( state == 630 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state + 10)
endif
endif
elseif ( state == 640 )
AITravel -12830, 21398, 1621
PlaySound3D, "HB_Whistle"
set state to (state + 10)
elseif ( state == 650 )
if ( GetAIPackageDone == 1 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
if (returnstate == 1)
set state to (state + 10)
endif
endif
elseif ( state == 660)
AITravel -12830, 21398, 1621
set state to (state + 10)
elseif ( state == 670)
if ( GetAIPackageDone == 1 )
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
if (returnstate == 1)
set state to 570
endif
endif
; ****************** wait the night
elseif ( state == -3 )
SetHello 0
HB_guar_pack_mine1 -> AIWander, 0, 0, 0, 5, 0, 10, 5
HB_guar_pack_mine2 -> AIWander, 0, 0, 0, 5, 10, 5, 0
HB_Caravan_Guard -> AIWander, 50, 0, 0, 0, 0, 10, 0, 5, 10, 5, 0
AIWander 600, 0, 0, 10, 0, 20, 0, 5, 20, 5, 0
set state to -4
elseif ( state == -4 )
if ( GameHour < 17 )
if ( GameHour > 5 )
set returnstate to 1
set timer to 0 ; just to be safe
set state to 610 ; in the morning, start the tour again
endif
endif
endif ;this is end of big elseifs
end _HB_guar_handler
[url]http://thelys.mwsource.com/index.php?morrowindmods=True&authorpage=GhanBuriGhan#Traveling%20Merchants[/url]
Begin _HB_guar_handler
;Script to make Mine Caravan travel between mines and Caldera
;****************remember to remove debug messages!*******************
short state ; main state variable for sequential walk
short returnstate ; 0: travels to Caldera, 1: travels to the mines
short doonce
short rescue ; state variable for rescue script
short daymineshutdown
short wait_caldera
float timer ; timer used for loitering etc.
float timeout ; used to check for idle NPC to recover script if necessary
float timeout2 ; timer for stalled script rescue.
short savestate
short nodistcheck
; talking about travel
AddTopic, "travel at night"
; *********************Debug messages
if (HB_Debug == 1 )
float debugtimer
set debugtimer to ( debugtimer + GetSecondsPassed )
if ( debugtimer >= 3 )
MessageBox " Debug: state = %.0f savestate = %.0f returnstate = %.0f rescue = %.0f nodistcheck = %.0f timer = %.2f timeout2 = %.2f Gamehour = %.2f", state, savestate, returnstate, rescue, nodistcheck, timer, timeout2, GameHour
set debugtimer to 0
endif
endif
if ( menumode == 1) ; if menu is open don't process
return
endif
; *******Manual reset
if ( HB_reset == 1)
set rescue to 6
set state to 9999
set savestate to 9999
set nodistcheck to 1
set HB_reset to 0
endif
; *************** Stalled Script rescue - recovers script after leaving a cell or resting
If ( Player -> GetDistance, HB_mine_guar_handler< 5000 ); should be smaller then AI distance or it doesnt work
if (GetCurrentAIPackage == -1)
; MessageBox "Debug Message: AiPackage is -1 at state = %.0f", state
set timeout to ( timeout + GetSecondsPassed )
if ( timeout >= 2)
if (state != 9999 ) ; don't mess while trying to reunite caravan
; MessageBox "Debug: rescue stalled script"
set state to (state - 10) ; stall will occur at AIPAckageDone - jump to wander again.
set timeout to 0
endif
endif
else
set timeout to 0
endif
endif
if ( state == 9999 )
if ( Player -> GetDistance, HB_mine_guar_handler < 5000 )
if (GetCurrentAIPackage == -1)
; MessageBox "Debug Message: AiPackage is -1 at state = %.0f", state
set timeout to ( timeout + GetSecondsPassed )
if ( timeout >= 60)
; MessageBox "Debug: rescue stalled script"
HB_mine_guar_handler -> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0
HB_guar_pack_mine1 -> AIWander 1000, 0, 0, 0,0,10,0
HB_guar_pack_mine2 -> AIWander 1000, 0, 0, 0,0,10,0
HB_Caravan_Guard -> AIWander 1000, 0, 0 , 0,10,0,0,10,5,0,0
set rescue to 7 ; reset caravan
set timeout to 0
endif
endif
else
set timeout to 0
endif
endif
if ( state <= -10 ) ; stallrescue failed
set rescue to 8
set state to 9999
set savestate to 9999
set nodistcheck to 1
endif
;********************* recover script to reset script when caravan gets separated - i am proud of this one...
; if you want to do caravans yourself you WILL NEED to put a version of this in.
; It takes care of separation problems that happen when the player fasttravels or sleeps
; in the viscinity of a travelling caravan.
;***************************************************** begin rescue code*****************************
if ( nodistcheck == 0 )
if ( rescue == 0 ) ; when rescue isnt allready active
if ( HB_mine_guar_handler-> GetDistance, HB_guar_pack_mine2 > 1500 ) ; in case they get separated - guar gets stuck
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 > 2 ) ;allow caravan 7 seconds to catch up
set timeout2 to 0
set rescue to 1; start rescue process
set savestate to 0 ; reset savestate if rescue was called before
endif
endif
else
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine2 < 800 )
if ( HB_guar_pack_mine1 -> GetDistance, HB_guar_pack_mine2 < 700 )
set timeout2 to 0
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set rescue to 0
if (returnstate == 0 )
if ( rescue < 4 )
set state to savestate - 10
elseif ( rescue < 6 )
set state to savestate - 30
else
set state to savestate - 50
endif
elseif ( returnstate == 1 )
if ( rescue < 4 )
set state to savestate - 10
elseif (rescue < 6 )
set state to savestate + 10
else
set state to savestate + 30
endif
endif
endif
endif
endif
endif ; nodistcheck
;**********try to reunite caravan by walking back if that doesnt work reset to starting positions
;**********The above distance checks will jump in and out of this code
if ( rescue == 1 )
if ( GetCurrentAIPackage == 1) ; travel AI
set savestate to state ; save state when entering rescue
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ) ; stage one, wait a moment to be sure he is on "wait for AI"
if (state == savestate)
set state to 9999 ; don't go anywhere else
set rescue to 2
set timeout2 to 0
else
set savestate to state
set timeout2 to 0
endif
endif
endif
elseif ( rescue == 2 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( HB_guar_pack_mine2 -> GetDistance, HB_guar_pack_mine1 > 800 )
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
if ( returnstate == 0 )
set state to ( savestate - 30 ) ; then go back to last point
elseif (returnstate == 1)
set state to ( savestate + 10 )
endif
set rescue to 3
elseif ( rescue == 3 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.2 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 1 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 6 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 4 ; on more back
set timeout2 to 0
endif
elseif ( rescue == 4 )
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine1 > 600 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( returnstate == 0 )
set state to ( savestate - 50 ) ; then go back to point before last
elseif (returnstate == 1)
set state to ( savestate + 30 )
endif
set rescue to 5
elseif ( rescue == 5 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 2 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 7 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 6 ; to reset
set timeout2 to 0
endif
elseif ( rescue == 6 )
if ( HB_mine_guar_handler -> GetDistance, HB_guar_pack_mine1 > 600 )
HB_guar_pack_mine1 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
endif
HB_guar_pack_mine2 -> AIWander 200, 0, 0, 0,0,0,0 ; maybe this helps getting unstuck
if ( returnstate == 0 )
set state to ( savestate - 70 ) ; then go back to point before last
elseif (returnstate == 1)
set state to ( savestate + 50 )
endif
set rescue to 7
elseif ( rescue == 7 )
set timeout2 to ( timeout2 + GetSecondsPassed )
if ( timeout2 >= 0.5 ); wait a little
set state to 9999 ; don't go anywhere else
endif
if ( timeout >= 2 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
endif
if ( timeout2 >= 7 ) ; if this is true he cant reach the point he tries to reach or its not close enough
set rescue to 8 ; to reset
set timeout2 to 0
endif
elseif ( rescue == 8 ); stage three and four - if nothing helps, reset the whole thing
HB_mine_guar_handler-> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0
HB_Caravan_Guard -> AIWander 1000, 0, 0 , 0,10,0,10,10,5,0,0 ; Stop any other AI
HB_guar_pack_mine2 -> AIWander 1000, 0, 0, 0,0,10,0,
HB_guar_pack_mine1 -> AIWander 1000, 0, 0, 0,0,10,0,
set timer to 0
set rescue to 9
elseif ( rescue == 9 )
if ( Player -> GetDistance, HB_guar_pack_mine2 > 5000 ) ; set a number of conditions to avoid player seeing them vanish
if ( Player -> GetDistance, HB_mine_guar_handler> 5000 )
if ( Player -> GetDistance, HB_Invisible_Marker_darani > 5000 )
; Then reset actors to starting positions:
; MessageBox "Debug: Caravan reset"
HB_mine_guar_handler -> Position -19700, 26220,1216, 90
HB_guar_pack_mine1 -> Position -19986, 26223,1160, 90
HB_guar_pack_mine2 -> Position -20433, 26183,1146, 90
HB_Caravan_Guard -> Position -20749, 26160,1243, 90
if ( HB_guar_pack_mine2 -> GetHealth <= 0 )
HB_guar_pack_mine2 -> Resurrect
endif
if ( HB_guar_pack_mine1 -> GetHealth <= 0 )
HB_guar_pack_mine1 -> Resurrect
endif
if ( HB_Caravan_Guard -> GetHealth <= 0 )
HB_Caravan_Guard -> Resurrect
endif
;then reset all variables to starting positions
set rescue to 0
set returnstate to 0
set doonce to 0
set timeout2 to 0
set timer to 0
set savestate to 0
set nodistcheck to 0
endif
endif
endif
endif ; end of rescue elseifs
;********************************************* end of rescue code******************************
; ******************* This one starts in the middle of his trip, so set starting conditions here:
if ( doonce == 0) ; initiate AI
If ( Player -> GetDistance, HB_mine_guar_handler < 6000 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set state to 350
set doonce to 1
endif
endif
;******************* Time schedule check
if ( state == -5 )
if ( GameHour > 16 )
set state to -1 ; if its too late, stay in for the night
elseif ( GameHour < 6 )
set state to -1 ; if its too late, stay in for the night
elseif ( GameHour < 16 )
if ( Gamehour > 6 )
set returnstate to 0 ;turn around
set state to 30
endif
endif
; ******************wait the night
elseif ( state == -1)
SetHello 30
AIWander, 300, 5, 0, 60, 20, 20, 20
HB_guar_pack_mine1 -> AIWander, 0, 0, 0, 10, 0, 10, 5
HB_guar_pack_mine2 -> AIWander, 0, 0, 0, 5, 10, 5, 5
set state to -2
elseif ( state == -2)
if ( GameHour < 16 )
if ( GameHour > 6 )
set state to -5 ; if its morning, start the tour again
endif
endif
;********************* some loitering
elseif ( state == 10 )
SetHello 30
AIWander 512, 1, 0, 0, 0, 30, 20, 10, 0,0,0 ; take a break, do business
HB_Caravan_Guard -> AIWander 50, 0, 0, 0,20,5,50,0,5,0,0
set state to (state + 10)
elseif ( state == 20 )
set timer to (timer + GetSecondsPassed)
if ( timer > 60) ;he's done with his loitering
HB_guar_pack_mine1 -> AddItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> AddItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine1 -> RemoveItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> RemoveItem, misc_com_wood_cup_01, 5
set timer to 0 ;reset for next round
set state to -5 ; check wait
endif
;******************* He beginns his trip
elseif ( state == 30 )
SetHello 20
AITravel -21977, 15425, 2005 ;coords point mine entrance
set state to (state + 10)
elseif ( state == 40)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 50)
SetHello 0
AITravel -21683, 15956, 2040 ;coords point of origin -15
set state to (state + 10)
elseif ( state == 60)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
HB_guar_pack_mine1 -> AITravel, -21389, 15817, 2243
HB_guar_pack_mine2 -> AITravel, -21871, 16167, 2203
HB_Caravan_Guard -> AItravel -20965, 15997, 2194
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 70)
AITravel -21516, 16412, 2110 ;coords point -14
set state to (state + 10)
elseif ( state == 80)
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
PlaySound3D, "HB_Whistle"
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
set state to (state + 10)
endif
endif
elseif ( state == 90 )
AITravel -20720, 16566, 2170 ;coords point -13
set state to (state + 10)
elseif ( state == 100 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set nodistcheck to 1
set state to (state - 30)
elseif (returnstate == 0)
set nodistcheck to 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0
set state to (state + 10)
endif
endif
elseif ( state == 110 )
AITravel -20274, 17643, 2433 ;coords point of origin -12. ridge above mine
set state to (state +10)
elseif ( state == 120 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 130 )
AITravel -20274, 19302, 2227 ; new coords point -11
set State to (state +10)
elseif ( state == 140 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 150 )
AITravel -21003, 20206, 1926 ; new coords point -10
set State to (state +10)
elseif ( state == 160 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 170 )
AITravel -23839, 22319, 1346 ; new coords point -9
set state to (state +10)
elseif ( state == 180 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 190 )
AITravel -23839, 22319, 1346 ; new coords point -8
set state to (state +10)
elseif ( state == 200 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 210 )
AITravel -23839, 22319, 1346 ; new coords point -7
set state to (state +10)
elseif ( state == 220 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 230 )
AITravel -24560, 22585, 1346 ;point -6
set state to (state +10)
elseif ( state == 240 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 250 )
AITravel -25048, 23100, 1468 ;point -5
set state to (state +10)
elseif ( state == 260 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 270 )
AITravel -24652, 24623, 1351 ; new coords -4
set state to (state +10)
elseif ( state == 280 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 290 )
AITravel -23402, 25744, 1367 ; new coords point -3
set state to (state +10)
elseif ( state == 300 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 310 )
AITravel -22326, 25804, 1321 ; new coords point -2
set state to (state +10)
elseif ( state == 320 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 330 )
AITravel -21707, 26167, 1367 ; new coords point -1
set state to (state +10)
elseif ( state == 340 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
;***********************************************this is from where he starts!!!!!
elseif ( state == 350 )
AITravel -19700, 26220, 1216 ; new coords point 0, path where handlers stands
set state to (state +10)
elseif ( state == 360 )
if ( GetAIPackageDone == 1 ) ;he's at point 0
if (returnstate == 1)
set state to ( state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 370 )
AITravel -19090, 26003, 1242 ; new coords point 1
set state to (state +10)
elseif ( state == 380 )
if ( GetAIPackageDone == 1 ) ;he's at point 1
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 390 )
AITravel -18642, 25834, 1266 ; new coords point 2
set State to (state +10)
elseif ( state == 400 )
if ( GetAIPackageDone == 1 ) ;he's at point 2
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( State == 410 )
AITravel -18063, 25683, 1265 ; new coords point 3
set State to (state +10)
elseif ( state == 420 )
if ( GetAIPackageDone == 1 ) ;he's reached the point 3
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 430 )
AITravel -16625, 25701, 1327
set state to (state +10)
elseif ( state == 440 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 450 )
AITravel -16170, 25313, 1349
set state to (state +10)
elseif ( state == 460 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 470 )
AITravel -16010, 24735, 1373
set state to (state +10)
elseif ( state == 480 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 490 )
AITravel -14873, 23190, 1389
set state to (state +10)
elseif ( state == 500 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0 ; this is for when travelling back
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 510 )
AITravel -14294, 22432, 1483 ;new coords outside portal
set state to (state +10)
elseif ( state == 520 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set nodistcheck to 0
HB_Caravan_Guard -> AIFollow HB_guar_pack_mine2, 0, 0, 0, 0 ; this is for when travelling back
set state to (state - 30)
elseif (returnstate == 0)
set nodistcheck to 1
set state to (state + 10)
endif
endif
elseif ( state == 530 )
AITravel -13434, 22041, 1640 ;in front of portal
set state to (state + 10)
elseif ( state == 540 )
if ( GetAIPackageDone == 1 ) ;he's reached portal
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
elseif ( state == 550 )
AITravel -12938, 21522, 1646 ;inside portal
set state to (state + 10)
elseif ( state == 560 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
HB_Caravan_Guard -> AItravel -13627, 21817, 1591
HB_guar_pack_mine1 -> AITravel -12521, 21217, 1618
set state to (state + 10)
endif
endif
elseif ( state == 570 )
AITravel -12963, 21043, 1637 ;on street in Caldera
set state to (state + 10)
elseif ( state == 580 )
if ( GetAIPackageDone == 1 ) ;he's reached portal
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
HB_guar_pack_mine2 -> AITravel -12471, 21629, 1661
set state to (state + 10)
endif
endif
elseif ( state == 590 )
AIWander 500, 0, 0, 10, 0, 20, 0, 5, 20, 5, 0 ; hanging out
set state to (state + 10)
elseif ( state == 600 )
set timer to (timer + GetSecondsPassed)
;***** This serves to keep the Caravan in Caldera for approx. 30 days
;***** after the player has completed the disrupt Caldera mines quest:
if (GetJournalIndex, HR_CalderaDisrupt >= 50) ; ***head slave freed or quest finished
if ( daymineshutdown == 0 ) ; ***a do-once condition
HB_guar_pack_mine1 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_raw_ebony_01, 10
set daymineshutdown to Day ;****store the day
endif
if ((daymineshutdown + 30 ) <= Day )
set timer to 0 ; ***if timer is reset here, the following condition will not be fulfilled and the caravan should stay
set wait_caldera to 1 ; *** used to give guar handler a special dialogue while waiting
endif
endif
if timer > 5
HB_Caravan_Guard -> AIWander 0, 0, 0, 10, 0, 5, 0, 5, 0
endif
if ( timer > 60) ;he's done with his loitering
set wait_caldera to 0
HB_guar_pack_mine1 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine2 -> RemoveItem, ingred_raw_ebony_01, 10
HB_guar_pack_mine1 -> AddItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> AddItem, ingred_bread_01, 10
HB_guar_pack_mine2 -> AddItem, misc_com_wood_cup_01, 5
set timer to 0 ;reset for next round
if (returnstate == 1)
set state to (state - 30)
elseif (returnstate == 0)
set state to (state + 10)
endif
endif
;********************** check status , currently active
elseif ( state == 610 )
if ( GameHour >17 )
set state to -3 ; if its too late, stay for the night
elseif ( GameHour < 5 )
set state to -3 ; if its too early also stay for the night
elseif ( GameHour < 17 ) ; if its not too late or in the morning...
if ( Gamehour > 5 )
set returnstate to 1 ;turn around
set state to (state + 10 ) ; continue walking
endif
endif
elseif ( state == 620 )
AITravel -12963, 21043, 1637 ;new coords point just inside portal
set state to (state + 10)
elseif ( state == 630 )
if ( GetAIPackageDone == 1 )
if (returnstate == 1)
set state to (state + 10)
endif
endif
elseif ( state == 640 )
AITravel -12830, 21398, 1621
PlaySound3D, "HB_Whistle"
set state to (state + 10)
elseif ( state == 650 )
if ( GetAIPackageDone == 1 )
HB_guar_pack_mine1 -> AIFollow HB_mine_guar_handler, 0, 0, 0, 0
if (returnstate == 1)
set state to (state + 10)
endif
endif
elseif ( state == 660)
AITravel -12830, 21398, 1621
set state to (state + 10)
elseif ( state == 670)
if ( GetAIPackageDone == 1 )
HB_guar_pack_mine2 -> AIFollow HB_guar_pack_mine1, 0, 0, 0, 0
if (returnstate == 1)
set state to 570
endif
endif
; ****************** wait the night
elseif ( state == -3 )
SetHello 0
HB_guar_pack_mine1 -> AIWander, 0, 0, 0, 5, 0, 10, 5
HB_guar_pack_mine2 -> AIWander, 0, 0, 0, 5, 10, 5, 0
HB_Caravan_Guard -> AIWander, 50, 0, 0, 0, 0, 10, 0, 5, 10, 5, 0
AIWander 600, 0, 0, 10, 0, 20, 0, 5, 20, 5, 0
set state to -4
elseif ( state == -4 )
if ( GameHour < 17 )
if ( GameHour > 5 )
set returnstate to 1
set timer to 0 ; just to be safe
set state to 610 ; in the morning, start the tour again
endif
endif
endif ;this is end of big elseifs
end _HB_guar_handler
- Majra
- Developer Emeritus
- Posts: 1871
- Joined: Fri Jan 16, 2004 3:23 am
- Location: Darvulk Haven Elsweyr
- Contact:
I think the issue with boats though is that the NPC's start falling off... I think someone said the solution to that is to make a collision box that surrounds the npc, and make the collision box follow the same script as the boat... that way the NPC wont glide away
R:6 I:22 N:30
Screw it, I'm back for sweet sweet TR
Uldar Gerzae: Expect no dodgeballs out of my arse. Though if something were to shoot out of me nether regions it mgiht be wise to dodge it all the same
Screw it, I'm back for sweet sweet TR
Uldar Gerzae: Expect no dodgeballs out of my arse. Though if something were to shoot out of me nether regions it mgiht be wise to dodge it all the same
-
- Developer
- Posts: 811
- Joined: Thu Aug 21, 2003 10:56 am
- Location: Dreamland
To have a 'pathed' silt-strider we would have to re-animate it to have a walk. I think that you could use an almost identical script for a moving boat if you made it as a creature with a WalkForward script, but I don't know if you could have NPC's on it.
A lot of the effect could be done through questing and journal based interaction. Someone tells you that pirates will be attacking a ship at a certain time in a certain place. Then you have all of the statics and NPC's present at the appropriate times (like the Ordinators fighting the cultists, with a journal entry dependency).
I didn't think we were using the silt-strider on the mainland, as they are a creature that is dependent on Vvardenfells abnormal geography to flourish.
Vorrheis
A lot of the effect could be done through questing and journal based interaction. Someone tells you that pirates will be attacking a ship at a certain time in a certain place. Then you have all of the statics and NPC's present at the appropriate times (like the Ordinators fighting the cultists, with a journal entry dependency).
I didn't think we were using the silt-strider on the mainland, as they are a creature that is dependent on Vvardenfells abnormal geography to flourish.
Vorrheis
-
- Developer
- Posts: 811
- Joined: Thu Aug 21, 2003 10:56 am
- Location: Dreamland
-
- Developer
- Posts: 811
- Joined: Thu Aug 21, 2003 10:56 am
- Location: Dreamland
One thing that I have wondered about is how will the game react to the player being on a moving object. As far as I know there is no point in witch you are on a object that moves. will the charecter be standing on the same spot on the mode of transportation, or will he remain stationary to the world and when he gets hit by a railing pulled with the object?
We should talk to JDGBolt about this, jdgbolt(is jdg a guy or girl?) was making a ship that you can sail. It's been done, but this is unique. you can go inside and out of the cabin and the boat will follow a course of its own, you can takr npcs and items on the deck and they move with you. When he/she releases the boat(or maybe before) we could maybe coroborate with jdgbolt to script travel like the boat.
I think that the boat/strider should leave when you pay for travel service and no other boats/striders move, it would kill FPS to have dynamically moving forms of transport going all over the world.
I think that the boat/strider should leave when you pay for travel service and no other boats/striders move, it would kill FPS to have dynamically moving forms of transport going all over the world.
"There is no dark side of the moon really. Matter of fact, it's all dark."
- Majra
- Developer Emeritus
- Posts: 1871
- Joined: Fri Jan 16, 2004 3:23 am
- Location: Darvulk Haven Elsweyr
- Contact:
that would be awesome for ocean cells, and harbors, showing moving ships would be insanely cool
we should definetly try to woo this awesome modder
we should definetly try to woo this awesome modder
R:6 I:22 N:30
Screw it, I'm back for sweet sweet TR
Uldar Gerzae: Expect no dodgeballs out of my arse. Though if something were to shoot out of me nether regions it mgiht be wise to dodge it all the same
Screw it, I'm back for sweet sweet TR
Uldar Gerzae: Expect no dodgeballs out of my arse. Though if something were to shoot out of me nether regions it mgiht be wise to dodge it all the same
I take some pride in the fact that i came up with something that seems to be taking to other members:)
In retrospect I agree that having vessels moving all the time would suck up CPU power like.....nothing that I should say on a public forum. But it would be nice to see them once in a while do their route.
For boats maby use only the major route, and make them simple, like Ebonheart to the mianland for food and supplies. ect.
I also think it would be interetsing if their some merchents or regular people made trips around....sorta see some faces at the local corner club in various regions.
In retrospect I agree that having vessels moving all the time would suck up CPU power like.....nothing that I should say on a public forum. But it would be nice to see them once in a while do their route.
For boats maby use only the major route, and make them simple, like Ebonheart to the mianland for food and supplies. ect.
I also think it would be interetsing if their some merchents or regular people made trips around....sorta see some faces at the local corner club in various regions.
-
- Developer
- Posts: 811
- Joined: Thu Aug 21, 2003 10:56 am
- Location: Dreamland
I think it would be great if a boat at a certain dock just makes 1 trip a day, maybe two, which you'll have to take to get somewhere else. It can easily be figured out how to make it run at a certain time once it is figured out how to make it move at all.
This way you haveto get to the boat at a certain time, if not, you'll have to wait for it to return.
This way you haveto get to the boat at a certain time, if not, you'll have to wait for it to return.