Jump to content

Photo

Timer Script, need help


  • Please log in to reply
25 replies to this topic

#1
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts
Hi all,

I'm trying to create a timer script that they have spent 3 days, add a topic, and go to the next quest stage, but I'm having problems ... Can someone help?


if ( GetStage aa1 == 6 ) && ( doOnceX == 0 ) 
               		Set StartDay to GameDay
					set state to 0
					set FinishDay to (StartDay +3)
					addtopic 1
                         set doOnceX to 1
                    endif

if ( doOnceX == 1 )  && ( Gameday >= FinishDay ) 
					Setstage 1aa 7
					set state to 1
     				addtopic 2
					set doonceX to 2              		
endif





Please, help me :)

#2
Maskar

Maskar

    Resident poster

  • Members
  • PipPipPipPipPip
  • 2,981 posts
You should use GameDaysPassed rather than GameDay, as GameDay is the day of the month and will go wrong when you enter a new month.

#3
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts

You should use GameDaysPassed rather than GameDay, as GameDay is the day of the month and will go wrong when you enter a new month.


Hi, first of all, thank you very much, I understand what you mean, but I dont know how to do it.

#4
fg109

fg109

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,244 posts
Just replace wherever you have "GameDay" with "GameDaysPassed"...

I don't know if that's really how your script looks or if you just put in random names for the variables and stuff, but on the first part you have "GetStage aa1" and the second part you have "SetStage 1aa". Also, if that's the only place you have the "state" variable, is it really necessary?

#5
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts

Just replace wherever you have "GameDay" with "GameDaysPassed"...

I don't know if that's really how your script looks or if you just put in random names for the variables and stuff, but on the first part you have "GetStage aa1" and the second part you have "SetStage 1aa". Also, if that's the only place you have the "state" variable, is it really necessary?


Hi!
There are random names, and the "state" variable is for a topic condition. I test it and comment it. Thanks!

#6
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts
It works! Thanks!

#7
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts

It works! Thanks!


Sorry, but I was wrong, it didn´t work well....

Now, I have this:

if ( GetStage aa1 == 6 ) && ( doOnceX == 0 ) 
                        Set StartDay to GameDaysPassed
 							 
                                        set state to 0
                                        set FinishDay to (StartDay +3)
                                        addtopic 1
             set doOnceX to 1
                    endif

if ( doOnceX == 1 )  && ( GameDaysPassed >= FinishDay ) 
                                        Setstage aa1 7
                                        set state to 1
                             addtopic 2
                                        set doonceX to 2                        
endif


Edited by Wyrm1331, 11 March 2011 - 07:51 AM.


#8
fg109

fg109

    Faithful poster

  • Members
  • PipPipPipPip
  • 1,244 posts
Maybe you can try changing it to (StartDay + 3). I know that spacing matters in the if statements, so it probably matters for that too.

If that's not the problem, exactly what is happening when you try to use the script?

#9
Wyrm1331

Wyrm1331

    Enthusiast

  • Members
  • PipPip
  • 108 posts

Maybe you can try changing it to (StartDay + 3). I know that spacing matters in the if statements, so it probably matters for that too.

If that's not the problem, exactly what is happening when you try to use the script?


I'm gonna change it and test it and then i will let you know.

when i test it, after three days nothing happens, any window appears and it goes on in stage 6

#10
subtanker

subtanker

    Enthusiast

  • Supporter
  • PipPip
  • 191 posts
hey i can't help but notice that startday and finishday are in purple, which leads me to believe that they may be phrases the game has saved for a specific use. you could try using a variable named Sday instead of startday and Fday instead of Finishday

Edited by subtanker, 11 March 2011 - 08:03 PM.





Page loaded in: 1.401 seconds