User talk:Raziel23x

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

I am currently working on a project which I wrote the Articles in category "Scripting" Health_Regeneration_over_Time and Soulgem_Scripting to help others who want to learn how this is accomplished. I am still learning how to script and rely heavily on this wiki to find the answers to how to do what I want to do scripting wise.


--Raziel23x 23:24, 9 August 2007 (EDT)

Regarding your MessageBox question[edit source]

Raziel, you should know better. Please check the Community Portal occasionally - we've decided we don't want questions of this type on the Wiki. They're not really about modding in general, they're about your specific mod. Use the ESF CS Forum instead.
Dragoon Wraith TALK 11:17, 24 August 2007 (EDT)

In case you want a script that does pretty much what you want, here it is:
ScriptName AAResetStats

short ARSButton
short ARSButton2
short ARSButton3
short ARSStep
short ARSMenu
short Assults
short HorsesStolen
short HoursSlept
short HoursWaited
short IngredientsEaten
short ItemsPickPocketed
short ItemsStolen
short Lockpicks
short LockpicksBroken
short LBounty
short Murder
short PotionsMade
short Prison
short SoulsTrapped
short StoresInvestedIn
short TrainSess
short Trespasses

Begin ScriptEffectStart

set Prison to GetPCMiscStat 0 * -1 ;resets Days in Prison to 0
;1 ;Days Passed
;2 ;Skill Increases
set TrainSess to GetPCMiscStat 3 * -1 ;resets Training Sessions to 0
set LBounty to GetPCMiscStat 4 * -1 ;resets Largest Bounty to 0
;5 ;Creatures Killed
;6 ;People Killed
;7 ;Places Discovered
set Lockpicks to GetPCMiscStat 8 * -1 ;resets Locks Picked to 0
set LockpicksBroken to GetPCMiscStat 9 * -1 ;resets LockPicks Broken to 0
set SoulsTrapped to GetPCMiscStat 10 * -1 ;resets Souls Trapped to 0
set IngredientsEaten to GetPCMiscStat 11 * -1 ;resets Ingredients Eaten to 0
set PotionsMade to GetPCMiscStat 12 * -1 ;resets Potions Made to 0
;13 ;Oblivion Gates Shut
;14 ;Horses Owned  
;15 ;Houses Owned
set StoresInvestedIn to GetPCMiscStat 16 * -1 ;resets Training Sessions to 0
;17 ;Books Read
;18 ;Skill Books Read
;19 ;Artifacts Found 
set HoursSlept to GetPCMiscStat 20 * -1 ;resets Hours Slept to 0
set HoursWaited to GetPCMiscStat 21 * -1 ;resets Hours Waited to 0
;22 ;Days As A Vampire
;23 ;Last Day As Vampire
;24 ;People Fed On
;25 ;Jokes Told
;26 ;Diseases Contracted 
;27 ;Nirnroots Found
set ItemsStolen to GetPCMiscStat 28 * -1 ;resets Items Stolen to 0
set ItemsPickPocketed to GetPCMiscStat 29 * -1 ;resets Items Pickpocketed to 0
set Trespasses to GetPCMiscStat 30 * -1 ;resets Trespasses to 0
set Assults to GetPCMiscStat 31 * -1 ;resets assults back to 0
set Murder to GetPCMiscStat 32 * -1 ;resets Murder to 0
set HorsesStolen to GetPCMiscStat 33 * -1 ;resets Horses Stolen to 0
set ARSStep to 1

End

Begin ScriptEffectUpdate

	if ARSStep == 1
 		Messagebox "What do you want to reset?", "Assaults", "Days in Prison", "Fame", "Horses Stolen", "Hours Slept", "Hours Waited", "Infamy", "Ingredients Eaten", "Next Page", "Quit"
		set ARSStep to 2
		set ARSButton to GetButtonPressed
	endif

	If ARSStep == 2
		set ARSButton to GetButtonPressed
		if ARSButton == 0
			ModPCMiscStat 31 Assults
			message "Your Assult count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 1
			ModPCMiscStat 0 Prison
			message "Your Days in Prison count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 2
			SetPCFame 0 ;resets Fame to 0
			message "Your Fame has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 3
			ModPCMiscStat 33 HorsesStolen
			message "Your Horses Stolen Count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 4
			ModPCMiscStat 20 HoursSlept
			message "Your Hours Slept Count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 5
			ModPCMiscStat 21 HoursWaited
			message "Your Hours Waited Count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 6
			SetPCInfamy 0 ;resets Infamy back to 0
			message "Your Infamy has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton == 7
			ModPCMiscStat 11 IngredientsEaten
			message "Your Ingredients Eaten count has been reset back to   0"
			set ARSStep to 0
		elseif ARSButton == 8
			set ARSStep to 3
		elseif ARSButton == 9
			set ARSStep to 0
		endif
	endif

	If ARSStep == 3
		Messagebox "What do you want to reset?", "Items Pickpocketed", "Items  Stolen", "Largest Bounty", "Locks Picked", "Lockpicks Broken", "Murders", "Potions Made", "Souls Trapped", "Next Page", "Quit"
		set ARSStep to 4
		set ARSButton2 to GetButtonPressed
	Endif
	
	If ARSStep == 4
		set ARSButton2 to getbuttonpressed
		if ARSButton2 == 0
			ModPCMiscStat 29 ItemsPickPocketed
			message "Your Items Pickpocketed count has been reset  back to 0"
			set ARSStep to 0
		elseif ARSButton2 == 1
			ModPCMiscStat 28 ItemsStolen
			message "Your Items Stolen count has been reset back  to 0"
			set ARSStep to 0
		elseif ARSButton2 == 2
			ModPCMiscStat 4 LBounty
			message "Your Largest Bounty count has been reset  back to 0"
			set ARSStep to 0
		elseif ARSButton2 == 3
			ModPCMiscStat 8 Lockpicks
			message "Your Locks Picked count has been reset back  to 0"
			set ARSStep to 0
		elseif ARSButton2 == 4
			ModPCMiscStat 9 LockpicksBroken
			message "Your LockPicks Broken count has been reset  back to 0"
			set ARSStep to 0
		elseif ARSButton2 == 5
			ModPCMiscStat 32 Murder
;			set IsPCAMurderer to 0 ;resets IsPCAMurderer back  to  0 <-- Breaks Oblivion, Crash to desktop...
			message "Your murder count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton2 == 6
			ModPCMiscStat 12 PotionsMade
			message "Your Potions Made count has been reset back  to 0"
			set ARSStep to 0
		elseif ARSButton2 == 7
			ModPCMiscStat 10 SoulsTrapped
			message "Your Souls Trapped count has been reset back  to 0"
			set ARSStep to 0
 		elseif ARSButton2 == 8
			set ARSStep to 5
		elseif ARSButton2 == 9
			set ARSStep to 0
		endif
	endif
 	
 	If ARSStep == 5
 		Messagebox "What do you want to reset?", "Stores Invested In", "Training Sessions", "Trespasses", "Quit"
		set ARSStep to 6
		set ARSButton3 to GetButtonPressed
	endif
	
	If ARSStep == 6
		set ARSButton3 to getbuttonpressed
		if ARSButton3 == 0
			ModPCMiscStat 16 StoresInvestedIn
			message "Your Stores Invested In count has been reset back to  0" 
			set ARSStep to 0
		elseif ARSButton3 == 1
			ModPCMiscStat 3 TrainSess 
			message "Your Training Sessions count has been reset back to  0"
			set ARSStep to 0
		elseif ARSButton3 == 2
			ModPCMiscStat 30 Trespasses
			message "Your Trespasses count has been reset back to 0"
			set ARSStep to 0
		elseif ARSButton3 == 3
			set ARSStep to 0
		endif
	endif
End
Additionally, you should use the ScriptEffectUpdate block since this is apparently a spell. While the gamemode does end on spell expiration (apparently), it is still better form to use this block in a spell. And make sure that there is a duration of at least a few seconds for the spell (else it just stops before getting to the next menu).
If you are going to ask a scripting question, I would suggest asking it on your page, if anyplace. I think that might be ok with DragoonWraith and it wouldn't clutter up the wiki questions section (although the forums are a better location for scripting questions). Once you have an answer then you can always erase it from your page which is a whole lot easier than deleting an article since none of us can do it, it requires a sysop.
--ShadowDancer 11:33, 24 August 2007 (EDT)


Created a personal Wiki [Oblivion Texturing Tutorial Wiki]