Jump to content

Refill Container Script


Nibel8

Recommended Posts

what should i add to make script run each week ?

if possible it should refill IF quantity of those items are <10

Scn aaaShadyDealerAddItemSCP1

BEGIN GameMode
if GetDayOfWeek == 0 && 2 || 4 && 5 ;additem 2 times per week due strange disappearing every 2 days
	aaaBaseShadyDelaerStore.addItem 105000050 10
	aaaBaseShadyDelaerStore.addItem 19999999999999 10
else
      if GetDayOfWeek == 6 ;we dont want 99999 items after 99 weaks,dont we ?
         aaaBaseShadyDelaerStore.RemoveAllItems
endif
    endif
END

it's still kinda...weird.all items are removed not on 6 day,but every 2-3 days,so i use 0 && 2 || 4 && 5 instead of just 0 and that suck :wallbash:

Note:

this script triggered by Quest

http://img88.imageshack.us/img88/7539/11ef.png

should i use Quest Condition ?

 

PS: http://www.thenexusforums.com/index.php?/topic/418659-duplicate-instead-of-addchange/ :rolleyes:

Edited by Nibel8
Link to comment
Share on other sites

The "strange disappearances" after two days might be because you set that particular container [Not persistent] and [Not respawn]. Though I do find it strange that the items are lost and not reset to its initial quantity. Anyway, maybe you could use this script. You can simply change the variable duration to any number you like to adjust the number of days before respawning.

 

Keep in mind that this is a quest script. Make sure this is attached to the script. And make sure the container is persistent (and NOT respawn, if you want this item to be the only thing respawning OR if you want it to respawn every week, not every 2-3 days). If you set it to respawn, the below script is defunct but your container would respawn items every 2-3 days.

 

Here goes:

scn QuestScript

float initDay;
float duration;			;//Remember to set this to 6 or 7 somewhere

BEGIN GameMode
set duration to 6;	;//This is not very good. Better to set this in the dialog or smthn.
if GetGameDaysPassed - initDay >= duration
	aaaBaseShadyDelaerStore.RemoveAllItems
	aaaBaseShadyDelaerStore.addItem <Item> 10
           	aaaBaseShadyDelaerStore.addItem <Item> 10
	<More Item lines here if need be>
	set initDay to GetGameDaysPassed
endif
END

Edited by Glenstorm
Link to comment
Share on other sites

set duration to 6;	;//This is not very good. Better to set this in the dialog or smthn.

 

Expression cannot begin or end with an operation©Script Validator

geck says:

SCRIPTS:script 'aaaShadyDealerAddItemSCP3',line 8:

Syntax Error.Unknown Command 'GetGameDaysPassed'.

 

Line 8:

if GetGameDaysPassed - initDay >= duration

Edited by Nibel8
Link to comment
Share on other sites

set duration to 6;	;//This is not very good. Better to set this in the dialog or smthn.

 

Expression cannot begin or end with an operation©Script Validator

geck says:

SCRIPTS:script 'aaaShadyDealerAddItemSCP3',line 8:

Syntax Error.Unknown Command 'GetGameDaysPassed'.

 

Line 8:

if GetGameDaysPassed - initDay >= duration

 

Crap its GameDaysPassed not GetGameDaysPassed. I confused it with GetSecondsPassed. Sorry about that :biggrin:. I don't get whats wrong with the duration line though. That's pretty standard. Try removing the comment (everything including and after //. It's very unlikely this would fix it coz the duration variable declaration also got a comment and it didn't throw up an error. Fix the typo in the function and compile it again, maybe its just a derived error.

Edited by Glenstorm
Link to comment
Share on other sites

iv been thinking...wouldn't it be easier to add items to Leveled item list with script,and put that empty list in to container with "Respawn" option ?so container will respawn all added items without scripts with 999999 lines :psyduck:
Link to comment
Share on other sites

iv been thinking...wouldn't it be easier to add items to Leveled item list with script,and put that empty list in to container with "Respawn" option ?so container will respawn all added items without scripts with 999999 lines :psyduck:

 

Read my post earlier. The script I posted is only useful IF you want the container items to respawn with a custom interval (say every week). If you simply want it to refill itself from time to time you don't even need a leveled list. Just put all the stuff in the container and tick the "Respawn" checkbox. This will refill the container every 2-3 days.

Link to comment
Share on other sites

Just put all the stuff in the container a

i doubt,that 50 esp files agree with you :biggrin:

if i could just put them all in container,i wouldn't need script

Edited by Nibel8
Link to comment
Share on other sites

Just put all the stuff in the container a

i doubt,that 50 esp files agree with you :biggrin:

if i could just put them all in container,i wouldn't need script

 

I'm not kidding. You don't need scripting to set a container to respawn. There is a checkbox in the container dialog, called "Respawn" simply check that and it should refill the container every other day. I just tested this out on my Mobile Auto-sorter mod and it works as expected. I waited for about 4 days before I saw the reset.

Link to comment
Share on other sites

I'm not kidding. You don't need scripting to set a container to respawn. There is a checkbox in the container dialog, called "Respawn" simply check that and it should refill the container every other day. I just tested this out on my Mobile Auto-sorter mod and it works as expected. I waited for about 4 days before I saw the reset.

50 esp's still dont agree with you...

didn't you know,that esp OVERRIDE container item list !from 50 esp's only 1 will work.

only 2 solutions are:

scripts (which im doing atm)

and container per ESP i.e. 50 containers...i doubt,that merchant support more than 1 container.more over,where i will put them ?

Edited by Nibel8
Link to comment
Share on other sites

  • Recently Browsing   0 members

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