Need a timer script to tax the player every X amount of time

Post » Fri May 04, 2012 4:18 am

I would appreciate it if i could receive help regarding how to make a timer script for x amount of days to tax the players Gold Account. If the player doesn't have above a certain amount funds then the tax isn't done until the player's money goes above the minimum boundary. I would like the script re-occurring. I would like it to be triggered permanently when talking to a particular chosen NPC.
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am

Post » Fri May 04, 2012 8:56 am

Make iTaxGLOB and fTaxTimerGLOB, then attach the below to TaxQuestQUST...
ScriptName TaxQuestSCPTBegin GameMode	If (GameDaysPassed > fTaxTimerGLOB)		If (Player.GetItemCount Gold001 >= iTaxGLOB)			Player.RemoveItem Gold001 iTaxGLOB			StopQuest TaxQuestQUST		EndIf			EndIfEnd
...and in your NPC's INFO result slot, plug in something like...
Set iTaxGLOB to # ; # = Gold to take in however many daysSet fTaxTimerGLOB to (GameDaysPassed + #) ; # = Number of days to wait'StartQuest TaxQuestQUST

In Oblivion and the Fallouts, an INFO's result script can't access remote variables, so that's why the globals...

http://cs.elderscrolls.com/index.php/Special_variables is maintained by the engine and checking it, for something like this, is easier and 'cheaper' than setting up a normal timer.
User avatar
katsomaya Sanchez
 
Posts: 3368
Joined: Tue Jun 13, 2006 5:03 am

Post » Fri May 04, 2012 4:27 am

I put what you said into a script and it said mismatched begin/end block for begin GameMode. I only put what you said in the text box.
User avatar
louise fortin
 
Posts: 3327
Joined: Wed Apr 04, 2007 4:51 am

Post » Fri May 04, 2012 8:19 am

That because the Endif is a typo and it should be just End.

However, it looks like this isn't quite what you're asking for. It runs whenever you talk to the NPC, checks if the tax is due, and removes it. But it won't run again until the next time you talk to the tax-man. Can you confirm that you want the taxation to start with the conversation, but then repeat automatically on a schedule, or have I got it wrong?

In my opinion, it would be even better if the NPC came looking for you when the tax was next due, but that would take a bit more scripting, and an AI package or two.
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Fri May 04, 2012 8:01 am

yeah the prolonged taxing that begins when you talk to an NPC for the first time, it's for a housing mod.
User avatar
Lloyd Muldowney
 
Posts: 3497
Joined: Wed May 23, 2007 2:08 pm

Post » Fri May 04, 2012 3:25 am

What am i to do then?
User avatar
carla
 
Posts: 3345
Joined: Wed Aug 23, 2006 8:36 am


Return to IV - Oblivion