i need around 2 scripts..anyone want to help me?

Old and generally outdated discussions, with the rare hidden gem. Enter at your own risk.

Moderators: Haplo, Lead Developers

Locked
User avatar
Nairb
Developer
Posts: 260
Joined: Sat Jan 24, 2004 2:29 am
Location: Northen OH

i need around 2 scripts..anyone want to help me?

Post by Nairb »

i am building a city, and i need some scripts for the shops and other stuff. i need a script that inables a object from 11:00 PM to 5:00 AM. i also need a script that boosts the players sneak from 11:00PM to 5:00 AM. i need another script that has a shop keeper "sleep" when there shop close. and, i aslso need a script that makes time locks.
Hold on sec, my keyboard is sliding off the desk, i gotta catch it b4 it jnkgdnldnl
RaJevir
Member
Posts: 101
Joined: Mon Sep 22, 2003 4:41 am
Location: Usually Tel Ouada, otherwise, try Elsweyr

Post by RaJevir »

Begin EnableDisableObject

short state

if (state == 0)
Disable
set state to 2 ; Prepare the object
endif

if (state == 1)
if (GameHour >= 23)
Disable
set state to 1
endif
endif

if (state == 2)
if (GameHour >= 11)
Enable
endif
endif

End EnableDisableObject
"Scrib specimen number two escaped from its pen today. Again. I shall have to find some other way to limit its mobility, as building higher walls seems to have little effect" -Mistress Rathra
Anonymous

Post by Anonymous »

Elathia has created a script that does everything you mentioned except for the boost sneak part.
User avatar
Congo
Member
Posts: 15
Joined: Sun Oct 19, 2003 11:03 am
Location: Balmora
Contact:

Post by Congo »

begin sneakModifier

short playerSneak
float change
short doOnce1
short doOnce2

if (GameHour >= 23)
if (doOnce1 == 0)
set playerSneak to getSneak
set change to playerSneak * 0.05
SetSneak to playerSneak + change
set doOnce1 to 1
set doOnce2 to 0
endif
endif

if (GameHour >= 5)
if (doOnce2 == 0)
SetSneak playerSneak
set doOnce2 to 1
set doOnce1 to 0
endif
endif

end sneakModifier

this should increase the players sneak by 5% from 11:00P.M. to 5:00A.M. To increase the percentage change the 0.05 in line 11. take the percent you want and move the decimal over to the left two places. I haven't tested this, but it should work.
RaJevir
Member
Posts: 101
Joined: Mon Sep 22, 2003 4:41 am
Location: Usually Tel Ouada, otherwise, try Elsweyr

Post by RaJevir »

You might want to add a check whether the player is in an exterior cell or not.
"Scrib specimen number two escaped from its pen today. Again. I shall have to find some other way to limit its mobility, as building higher walls seems to have little effect" -Mistress Rathra
Locked