RealmCrafter Wiki
Register
Advertisement

Created by Taz.

Using "RC_Core.rcm"
; Tazgame
 ; Date/Time: 7:52:52 PM on 2/27/2009
; By Tazco on NADDAZ
; need to fix the amount of iron chest making choice, it hangs on the dialog option screen when you pick 1, 2, 5 chests

Function Main()
	Player = Actor()

    
         ;find Anvil and see if its in range to use it.
    AnvilName$ = "Anvil"
    Target% = FindActor(AnvilName, 3) ;type 2 look through npcs
    
       IsClose3# = ActorDistance(Target, Player)
      
       IsClose% = IsClose3

    
         If (Target = 0)
            OutPut(Player, "This zone does not have a Anvil.")
            Return
        EndIf
     
         If (IsClose > 10)
            OutPUt(Player, "You need to find a Anvil to smelt weapons and armor.")
            Return
        EndIf
     
     
     
     
     
     
 	chatbox = OpenDialog(Player, Target, "Smelting", 418)
 	DialogOutPut(Player, chatbox, "Do you want to craft weapons or armor?", 102, 255, 255)
 	Smeltinglvl% = Attribute(Player, "Smelting")
 	
 
          SoundChance% = Rand(1, 2)
         If (SoundChance = 1)
            PlaySound(Player, 169, 1)
         Elseif (SoundChance = 2)
            PlaySound(Player, 170, 1) 
         EndIf
 
 Makeitemresult = DialogInput(Player, chatbox, "Smelt Armor,Smelt Weapons,Smelt Misc Items,Close") ; See changes to DialogInput command.
 
 
 If (Makeitemresult = 1)  ;Make armor script
 	CloseDialog(Player, chatbox)
  	ThreadExecute("Skill_Smelting_Armor", "Main", Player, 0) ;send xp amount to the smelting scripts

ElseIf(Makeitemresult = 2) ;make weapons sends to weapons smelting script
 		CloseDialog(Player, chatbox)
		ThreadExecute("Skill_Smelting_Weapons", "Main", Player, 0) ;send xp amount to the smelting scripts
ElseIf (Makeitemresult = 3) ;make misc smelting items EG axe head arrow heads ect...
         CloseDialog(Player, ChatBox)
        ThreadExecute("Skill_Smelting_Misc", "Main", Player, 0) ;send xp amount to the smelting scripts
  	
 ElseIf(Makeitemresult = 4) ;end first choice make bars, armor, weapons and misc
   CloseDialog(Player, chatbox)
  Return
 EndIf
 
 Return
 
 End Function
Advertisement