FANDOM


Created by Taz

Using "RC_Core.rcm"
; Date/Time: 7:19:49 PM on 10/7/2010
; By Naddaz on TAZCO
;Basic loot script, giving items to player.
;Change give item to items that you have in your editor.

Function Main()

 ItemID% = Rand(1, 5) ; change the second # if you want to have more possible items to drop

If(ItemID = 1)

		GiveItem(Player, "Bear Meat")
		OutPut(Player, "You have recived Bear Meat", 0, 200, 45)
	
ElseIf(ItemID = 2)
     Itemchance% = Rand(1, 2) ;Chance to recive item, player gets bones if number does not match

	If (Itemchance = 2)
		GiveItem(Player, "Bear Fang")
		OutPut(Player, "You have recived a Bear Fang", 0, 200, 45)
	Else
		GiveItem(Player, "Bear Hide")
		OutPut(Player, "You have recived a Bear Hide ", 0, 200, 45)
      Endif
 
 Elseif(ItemID = 3)
      Itemchance% = Rand(1, 4) ;Chance to recive item, player gets bones if number does not match

	If (Itemchance = 2)
		GiveItem(Player, "Bear Meat")
		OutPut(Player, "You have recived a Bear Meat", 0, 200, 45)
	Else
		GiveItem(Player, "Bear Hide")
		OutPut(Player, "You have recived a Bear Hide ", 0, 200, 45)
      Endif
 
 Elseif(ItemID = 4)
       Itemchance% = Rand(1, 4) ;Chance to recive item, player gets bones if number does not match

	If (Itemchance = 3)
		GiveItem(Player, "Bear Hide")
		OutPut(Player, "You have recived a Bear Hide ", 0, 200, 45)
	Else
		GiveItem(Player, "Health Potion")
		OutPut(Player, "You have recived a Health Potion", 0, 200, 45)
      Endif
 
 Elseif(ItemID = 5)
       Itemchance% = Rand(1, 55) ;Chance to recive item, player gets bones if number does not match

	If (Itemchance = 3)
		GiveItem(Player, "Bear Hide")
		OutPut(Player, "You have recived Bear Hide", 0, 200, 45)
	Else
		GiveItem(Player, "Bear Meat")
		OutPut(Player, "You have recived Bear Meat", 0, 200, 45)
      Endif
 
 EndIf
 
 
 
    G = Rand(5414,5620) ; minimum and maximum amount of gold that can be dropped
   Output(Player, "Obtained " + G + " Copper")
   ChangeMoney(Player, G)

DoEvents (2000)



End Function