Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def chooseRandomItem(qty=1)
- #Item Groups
- groups = [
- :MEDICINE,
- :POKEBALL,
- :EVOLUTION,
- :UTILITY
- ]
- #Array of items
- commonMeds = [
- :POTION,
- :BURNHEAL,
- :AWAKENING
- ]
- commonBalls = [
- :POKEBALL,
- :NESTBALL,
- :NETBALL
- ]
- commonEvo = [
- :STRAWBERRYSWEET,
- :WATERSTONE,
- :FIRESTONE,
- :THUNDERSTONE,
- :LEAFSTONE
- ]
- commonUtil = [
- :REPEL
- ]
- uncommonMeds = [
- :SUPERPOTION,
- :ANTIDOTE,
- :PARALYZEHEAL,
- :FULLHEAL
- ]
- uncommonBalls = [
- :GREATBALL,
- :DIVEBALL,
- :HEALBALL,
- :DUSKBALL
- ]
- uncommonEvo = [
- :METALCOAT,
- :KINGSROCK,
- :REAPERCLOTH,
- :CHIPPEDPOT,
- :CRACKEDPOT,
- :LINKCABLE,
- :LEADERSCREST,
- :MASTERPIECETEACUP,
- :UNREMARKABLETEACUP,
- :MOONSTONE,
- :SUNSTONE,
- :ICESTONE
- ]
- uncommonUtil = [
- :SUPERREPEL
- ]
- epicMeds = [
- :HYPERPOTION,
- :ICEHEAL
- ]
- epicBalls = [
- :ULTRABALL,
- :QUICKBALL,
- :REPEATBALL
- ]
- epicEvo = [
- :DEEPSEATOOTH,
- :DEEPSEASCALE,
- :OVALSTONE,
- :GALARICACUFF,
- :GALARICAWREATH,
- :SCROLLOFWATERS,
- :SCROLLOFDARKNESS
- ]
- epicUtil = [
- :MAXREPEL
- ]
- legendaryMeds = [
- :MAXPOTION,
- :FULLRESTORE
- ]
- legendaryBalls = [
- :MASTERBALL
- ]
- legendaryEvo = [
- :SWEETAPPLE,
- :DRAGONSCALE,
- :UPGRADE,
- :DUBIOUSDISK,
- :PROTECTOR,
- :ELECTRIZER,
- :MAGMARIZER,
- :RAZORFANG,
- :RAZORCLAW,
- :PRISMSCALE,
- :WHIPPEDDREAM,
- :SACHET,
- :TARTAPPLE,
- :SWEETAPPLE,
- :BLACKAUGURITE,
- :PEATBLOCK,
- :AUSPICIOUSARMOR,
- :MALICIOUSARMOR,
- :SYRUPAPPLE,
- :DAWNSTONE,
- :DUSKSTONE,
- :SHINYSTONE
- ]
- #Randomly select Group
- itemtype = rand(4)
- itemrarity = rand(10)
- if itemtype == 1
- if itemrarity < 1
- pbMessage(_INTL("You received a Legendary Medicine loot drop!"))
- pbReceiveItem(legendaryMeds[rand(0...legendaryMeds.length)],qty)
- elsif itemrarity <2
- pbMessage(_INTL("You received an Epic Medicine loot drop!"))
- pbReceiveItem(epicMeds[rand(0...epicMeds.length)],qty)
- elsif itemrarity <4
- pbMessage(_INTL("You received an Uncommon Medicine loot drop!"))
- pbReceiveItem(uncommonMeds[rand(0...uncommonMeds.length)],qty)
- else
- pbMessage(_INTL("You received a Common Medicine loot drop!"))
- pbReceiveItem(commonMeds[rand(0...commonMeds.length)],qty)
- end
- elsif itemtype == 2
- if itemrarity < 1
- pbMessage(_INTL("You received a Legendary Pokeball loot drop!"))
- pbReceiveItem(legendaryBalls[rand(0...legendaryBalls.length)],qty)
- elsif itemrarity < 2
- pbMessage(_INTL("You received an Epic Pokeball loot drop!"))
- pbReceiveItem(epicBalls[rand(0...epicBalls.length)],qty)
- elsif itemrarity < 4
- pbMessage(_INTL("You received an Uncommon Pokeball loot drop!"))
- pbReceiveItem(uncommonBalls[rand(0...uncommonBalls.length)],qty)
- else
- pbMessage(_INTL("You received a Common Pokeball loot drop!"))
- pbReceiveItem(commonBalls[rand(0...commonBalls.length)],qty)
- end
- elsif itemtype == 3
- if itemrarity < 1
- pbMessage(_INTL("You received a Legendary Evolution loot drop!"))
- pbReceiveItem(legendaryEvo[rand(0...legendaryEvo.length)],qty)
- elsif itemrarity < 2
- pbMessage(_INTL("You received an Epic Evolution loot drop!"))
- pbReceiveItem(epicEvo[rand(0...epicEvo.length)],qty)
- elsif itemrarity < 4
- pbMessage(_INTL("You received an Uncommon Evolution loot drop!"))
- pbReceiveItem(uncommonEvo[rand(0...uncommonEvo.length)],qty)
- else
- pbMessage(_INTL("You received a Common Evolution loot drop!"))
- pbReceiveItem(commonEvo[rand(0...commonEvo.length)],qty)
- end
- else #itemtype == 4
- if itemrarity < 2
- pbMessage(_INTL("You received an Epic Utility loot drop!"))
- pbReceiveItem(epicUtil[rand(0...epicUtil.length)],qty)
- elsif itemrarity < 4
- pbMessage(_INTL("You received an Uncommon Utility loot drop!"))
- pbReceiveItem(uncommonUtil[rand(0...uncommonUtil.length)],qty)
- else
- pbMessage(_INTL("You received a Common Utility loot drop!"))
- pbReceiveItem(commonUtil[rand(0...commonUtil.length)],qty)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement