Help please,
I am trying to write a script that will add gold to a chest every month on a given day (to represent commisions on business transactions in game).
This is what I have written and only the first half works on the first 20th day of the first month after that nothing is added to the chest in susequent months.
I tried adding items, removing items and various combinations of the two but it wont work. I tried adding a light into the shest and still nothing.
begin "tvb_commission_chest"
short done
if ( MenuMode == 1 )
return
endif
if ( Day == 20 )
if ( done == 0 )
additem "Gold_001" 1000
set done to 1
endif
endif
if ( Day >= 21 )
if ( Day <= 19 )
if ( done == 1 )
set done to 0
endif
endif
endif
end
Got some help and the re-worked script looks like this ( It works but only if you are in the same cell at the time the money is paid i.e the Day )
Do I need to make this a global script? and if so how do I set that up?
begin "tvb_commission_chest"
short done
if ( MenuMode == 1 )
return
endif
if ( Day == 20 )
if ( done == 0 )
additem "Gold_001" 1000
set done to 1
MessageBox "Your commission has been deposited in your chest"
endif
endif
if ( done == 1 )
if ( Day >= 21 )
set done to 0
elseif ( Day <= 19 )
set done to 0
endif
endif
end
Script for a chest
Moderators: Haplo, Lead Developers
This would be better asked here:
http://www.bethsoft.com/bgsforums/index.php?showforum=11
or here:
http://www.bethsoft.com/bgsforums/index.php?showforum=12
but not here.
http://www.bethsoft.com/bgsforums/index.php?showforum=11
or here:
http://www.bethsoft.com/bgsforums/index.php?showforum=12
but not here.
Forum Administrator & Data Files Manager
[06/19/2012 04:15AM] +Cat table stabbing is apparently a really popular sport in morrowind
[August 29, 2014 04:05PM] <+Katze> I am writing an IRC bot! :O
[August 29, 2014 04:25PM] *** Katze has quit IRC: Z-Lined
[06/19/2012 04:15AM] +Cat table stabbing is apparently a really popular sport in morrowind
[August 29, 2014 04:05PM] <+Katze> I am writing an IRC bot! :O
[August 29, 2014 04:25PM] *** Katze has quit IRC: Z-Lined