Talk:Mining tutorial

From the Oblivion ConstructionSet Wiki
Revision as of 20:43, 13 March 2008 by imported>Redturner (→‎A none working script!!!)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A none working script!!![edit source]

Leon_852 The scripts that you put on that page don't work. Could you please go through the scripts and improve them. Sorry to be so pickey!!

Redturner I would really like it if someone could post something on the anvil part, I'm currently working on a item combining machine but I'm having problems making it work.Thanks...

Dwayne I am currently working in an anvil script, please explain your item combiner? I just started work on the anvil script about 5 minutes ago, I should have it done by tomorrow. I will post the finished script on the main page. I was working in a "machine" to make weapons, armor, and arrows when I went to this article to see how I should make a process to mine the ore. I will put a link to my finished mod with the item maker when I am done with it.

Here is a simple anvil script, it is untested so I have no idea if it works. I might get around to testing it later. I had to insert a page break in one location, lines 13 and 14 (not counting blank lines) should be one line and it should not have the text saying I had to insert a page break. Once I test this, I will put it on the main page. Here it is

scn AnvilIronLongSwordScript

short choosing
short choice

Begin OnActivate
set choosing to -1
End

Begin Gamemode

	if (choosing == ))
		return
	elseif (choosing == -1)
;You may substitute any item name
;add in how many pieces of iron you want it to take to make the item
		messagebox "Would you like to make an Iron Longsword?
It will take xx pieces of iron." "Yes" "No" ;this should be on the above line
		set choosing to 1
	elseif (choosing == 1)
		set choise ot get button pressed
;you replace the 1 with how many pieces of iron you want it to take to make the item
		if (choice == 0)
			if (player.getitemcount iron) >= 1
				player.removeitem iron 1
				player.additem weapironlongsword
;instead of weapironlongsword, add the item you wan thte anvil to make
			else
				set choosing to 0
				message "You don't have enough iron!"
			endif
		elseif (choice == 1)
			set choosing to 0
		endif
	endif
end

Redturner Well,I have just finished the item combiner script thanks to some help I recieved on the Bethesda forums.It works quite well and exchanges the materials (Ore and wolfpelts) for an item (Claws of the Wolf).I'll post it here for you to view,but if you'd like to use it you must either change the material from "0101ORE" to something that you can actually find,or make an item with that ID.Same with the reward item.I would really appreciate a working anvil script and it would be nice if I could get a actual blunt weapon that was a pickaxe.

 scriptname 0itemcombiner
 
 short button
 short controlvar
 
 begin onactivate
   messagebox "What item would you like to create?", "Claws of The Wolf", "Steel Sting", "Nothing"
   set controlvar to 1
 end
 
 begin gamemode
   if controlvar == 1
     set button to getbuttonpressed
     if button > -1
       set controlvar to 2
     endif
   endif
   if controlvar == 2
     if button == 0
       if player.getitemcount 0101ore >= 3 && player.getitemcount wolfpelt01 >= 2 && 
         player.getitemcount gold001 >= 500
         message "Congradulations, item created!"
         message " "
         message " "
         player.removeitem 0101ore 3
         player.removeitem wolfpelt01 2
         player.removeitem gold001 400
         player.additem 123furIT 1
       else
         message "Insufficient materials for item creation."
       endif
       set controlvar to 0
     elseif button == 1
       if player.getitemcount 0101ore >= 3 && player.getitemcount welkyndstone >=2 && player.getitemcount gold001 >= 500
         message "Congradulations, item created!"
         message " "
         message " "
         player.removeitem 0101ore 3
         player.removeitem welkyndstone 2
         player.removeitem gold001 500
         player.additem 001eny 1
       else
         message "Insufficient materials for item creation."
       endif
       set controlvar to 0
     else
       message "Action Cancelled."
       set controlvar to 0
     endif
   endif
 end

Dwayne I finished my item maker script but it said it exceeded the length limit at line 806 and it was 1238 lines long (Yes, I had a headache when I was done with it). I also finished my training script to call up whatever creature you want, what level you want it, and how many you want to fight. I decided I am just going to break up my really long script by cutting out the first menu asking if you want a weapon, armor, or arrows. I will have three different scripts for different items. I will see if I can make a pickaxe for you. My item maker was basically a more complex version of what you made. At least your script works though, as soon as I complete my script, I will post it here. Redturner That would be most appreciated.I have been pretty much inactive on my modding lately but have just started work on a new mod,it will utilize this item combiner on a larger scale...((hopefully))