Jump to content

Script Help Needed


XN0X0neX

Recommended Posts

Okay so I noticed a problem in a script im using for teleportation.It works yes but small / annoying problem.Say i Activate the object that opens up the places to teleport to. Well I decide to click never mind and not go anywhere.Well if I pause the game and save it, once its done saving the first page of the teleportation menu pops up without me activating the object heres the lines of code down to the end of the first page.What variable if causing this to happen?

 

 

Begin XN0XTeleFromHomeX

short XCounterX
short button

If ( MenuMode == 1 )
Return
endif

If ( OnActivate = 1)
Set XCounterX to 2
endif

If ( XCounterX == 0 )
Set XCounterX to 0
Return
endif

If ( XCounterX == 2 )
Set XCounterX to 3
Messagebox "Where would you like to travel?" "Towns" "Guilds" "Camps" "Telvanni VIllages" "Never Mind"
endif

If ( XCounterX == 3 )
Set button to getbuttonpressed
If ( button == 0 )
Set XCounterX to 4
Messagebox "Which Town?" "Caldera" "Pelagiad" "Ald'Ruhn" "Balmora" "Vivec" "Seyda Neen" "Maar Gan" "Page 2" "Main Menu"
elseIf ( button == 1 )
Set XCounterX to 5
Messagebox "What Guild?" "Fighter's Guild" "Mages Guild" "Main Menu"
elseif ( Button == 2 )
Set XCounterX to 9
Messagebox "What Camp?" "Ahemmusa Camp" "Zainab Camp" "Urshilaku Camp" "Main Menu"
elseif ( Button == 3 )
Set XCounterX to 12
Messagebox "Which Tel Tower?" "Tel Aruhn" "Tel Branora" "Tel Fyr" "Tel Mora" "Tel Uvirith" "Tel Vos" "Main Menu"
elseif ( Button == 3 )
Set XCounterX to 0
endif
endif

If ( XCounterX == 4 )
set button to getbuttonpressed
If ( button == 0 )
Player->PositionCell -10383, 17050, 1347, 0, "Caldera"
set XCounterX to 0
Elseif ( button == 1 )
Player->PositionCell 2507, -56048, 1570, 0, "Pelagiad"
set XCounterX to 0
elseif ( button == 2 )
Player->PositionCell -17088, 52737, 1920, 0, "Ald-ruhn"
set XCounterX to 0
elseif ( button == 3 )
Player->PositionCell -21282, -17752, 956, 0, "Balmora"
set XCounterX to 0
elseif ( button == 4 )
Set XCounterX to 10
messagebox "What part of Vivec?" "Vivec" "Vivec, Rendoran" "Vivec, St.Olms" "Vivec, Arena" "Vivec, Hlaalu" "Vivec, Telvanni" "Vivec, St.Delyn" "Vivec, Foreign Quarter" "Towns"
elseif ( button == 5 )
Player->PositionCell -11239, -73981, 120, 0, "Seyda Neen"
set XCounterX to 0
elseif ( button == 6 )
Player->PositionCell -22366, 100144, 2524, 0, "Maar Gan"
set XCounterX to 0
elseif ( button == 7 )
set XCounterX to 8
Messagebox "Which Town?" "Sadrith Mora" "Ebonheart" "Dagon Fel" "Vos" "Ald Velothi" "Suran" "Gnaar Mok" "Page 1" "Page 3"
elseif ( button == 8 )
set XCounterX to 2
messagebox "Where would you like to travel?" "Towns" "Guilds" "Camps" "Tel Tower's" "Never Mind"
endif
endif

Edited by XN0X0neX
Link to comment
Share on other sites

  • Recently Browsing   0 members

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