RPG Mods.com
September 09, 2010, 04:07:22 AM*

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Please review the site rules, located here.
Advanced search  
Pages: [1]   Go Down
  Print  
Author Topic: Script for commssion chest  (Read 261 times)
tvb
Newbie

Offline Offline

Posts: 2


« on: October 29, 2009, 01:20:17 PM »


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). First script I wrote only half worked. I have also added a non carryable light to the chest.

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
Logged
Baratheon79
Administrator
Sr. Member
*
Offline Offline

Posts: 395



WWW
« Reply #1 on: October 29, 2009, 05:13:05 PM »

In order for this to work, you'll have to do it with a global script. The script can be called via dialog or using a script attached to the chest (I assume you'll want it to only start running at a certain point in your mod).

If you haven't already done so, I'd suggest getting the guide "Morrowind Scripting for Dummies" (probably available on either TES Nexus or Planet Scrolls, or both). I've got a printed copy of it in a binder that I still refer to occasionally, albeit a rather old version (from back when GhanBuriGhan was still updating it).

Also, as this topic belongs in the TES Construction Set board, I'm moving it there. Smile
« Last Edit: October 29, 2009, 05:16:25 PM by Baratheon79 » Logged

tvb
Newbie

Offline Offline

Posts: 2


« Reply #2 on: October 30, 2009, 12:52:31 AM »

Sorry for putting the post in teh wrong place.

Thanks for the advice, read the section on globals and startscripts in "dialogue for dummies" last night and it says the same thing you have (also now that I have been struggling with the problem for a few days and tried various things during that time it made more sense this time around) so will try to set this up via the dialogue section.

Thanks again,
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc
B l a c k - R a i n V.2 by C r i p ~ Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC XHTML | CSS   

Page created in 0.115 seconds with 34 queries.