[REQz] Forge Smelting Script

Post » Wed Aug 18, 2010 12:27 pm

I wasn't sure whether to post this in the CS forum or the Mods forum, so please move this to the appropriate area if I've misplaced it.

Onward to the main topic. I like the ability given in OOO to melt down metal items into nugget form, but it seems a bit out of place to do so at any time, and anywhere, as long as you have a hammer. What I'd like to do is remove that script and replace it with a script to be put on forges, that would allow the player to melt down the nuggets after activating a forge with the script attached.

This would be primarily for personal use, but I'm not sure how to write such a script, so here I am. I've included the script from OOO as a reference since this is what the script I have in mind would be based on.

If I've done something inappropriate by posting the code here, please let me know and I'll remove it.

Spoiler
ScriptName Aasilvernugget3;Scripted by Dewshine and Lollerich. References GPLockpickFileScript by Scruggs, BoneGrindScript by NVShacker, and AALEATHERTOOL by Axebaneshort buttonshort statefloat timerbegin onEquip 	set state to 1endBegin MenuMode 1002	if state == 0			return	endif	if state == 1		messageBox "This metal object will yield 3 silver nuggets. Would you like to melt this metal object down?",  "Yes", "No"		set state to 2		endif		if state == 2		Set button to GetButtonPressed		if button > -1			set state to 3		endif	endif	if state == 3		if button > -1 			if player.getItemCount RepairHammer > 0 				Set State to 4			else				messageBox "You need a Repair Hammer to melt this down."				Set state to 0			endif		endif	endif	if state == 4		If button == 0			player.AddItem Gem0SilverNugget 3			set state to 5			set timer to 10		elseif button == 1			set state to 0		endif	endif	If state == 5		if (timer > 0)  	  		set timer to timer - 1 		else			RemoveMe   	 	endif	endifend

User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Thu Aug 19, 2010 12:10 am

I don't have a clue how to do this, but I know CRAFT has something like it, so you might want to check out how they implemented it.
User avatar
Jaki Birch
 
Posts: 3379
Joined: Fri Jan 26, 2007 3:16 am


Return to IV - Oblivion