SunakazeKun
SunakazeKun | Aurum
- 30
- Posts
- 10
- Years
- Germany
- Seen May 12, 2023
This works like Coins used for Slot machines. Currently I'm working on the Message Box that shows the amount of Battle Points while talking to an NPC. The amount is stored in $PokemonGlobal.bpoints. Don't forget to credit me!
New Script:
Settings
Put this under the line MAXCOINS = 99999.
PokemonDebug
Put this under the line commands.add("setcoins",_INTL("Set Coins")).
Put this under the line Kernel.pbMessage(_INTL("You now have {1} Coins.",$PokemonGlobal.coins)).
New Script:
Code:
#===============================================================================
# * Battle Points by Aurum / SunakazeKun
#===============================================================================
# * Global Metadata
#===============================================================================
class PokemonGlobalMetadata
attr_accessor :bpoints
def initialize
@bpoints = 0
end
end
#===============================================================================
# * Point Card Item
#===============================================================================
ItemHandlers::UseFromBag.add(:POINTCARD,proc{|item|
Kernel.pbMessage(_INTL("Battle Points:\n{1}",$PokemonGlobal.bpoints))
next 1 # Continue
})
ItemHandlers::UseInField.add(:POINTCARD,proc{|item|
Kernel.pbMessage(_INTL("Battle Points:\n{1}",$PokemonGlobal.bpoints))
next 1 # Continue
})
Put this under the line MAXCOINS = 99999.
Code:
MAXBPOINTS = 99999
Put this under the line commands.add("setcoins",_INTL("Set Coins")).
Code:
commands.add("setbpoints",_INTL("Set Battle Points"))
Code:
elsif cmd=="setbpoints"
params=ChooseNumberParams.new
params.setRange(0,MAXBPOINTS)
params.setDefaultValue($PokemonGlobal.bpoints)
$PokemonGlobal.bpoints=Kernel.pbMessageChooseNumber(
_INTL("Set the player's Battle Point amount."),params)
Kernel.pbMessage(_INTL("You now have {1} Battle Points.",$PokemonGlobal.bpoints))
Last edited: