So, I've been trying to learn how the player form works and learning how to incorporate it in my scripts. This is my first question so far.
Simba Code:
comboBoxLabels := ['Bank Type', 'Bank Preset'];
comboBoxDefaults := ['BANK_BOOTH', 'BANK_BUTTON_PRESET_2'];
setLength(comboBoxItems, length(comboBoxLabels));
comboBoxItems[0] := ['BANK_NPC_BLUE', 'BANK_NPC_GREY', 'BANK_NPC_GREEN', 'BANK_NPC_DRAYNOR', 'BANK_BOOTH', 'BANK_GE', 'BANK_CHEST_SW', 'BANK_CHEST_SHANTAY', 'BANK_CHEST_DUEL', 'BANK_CHEST_CW', 'BANK_CHEST_GROTTO', 'BANK_TABLE_BURTHORPE', 'BANK_CHEST_LUMBRIDGE', 'BANK_CHEST_PRIFDDINAS', 'BANK_CHEST_BARB_OUTPOST'];
comboBoxItems[1] := ['BANK_BUTTON_PRESET_1', 'BANK_BUTTON_PRESET_2'];
I want to incorporate those into lines like bankscreen.open(whichever bank is picked), and bankScreen.clickButton(whichever preset is picked). I looked around in other scripts to see what other people were doing for it, and saw multiple ways which it was done. most of them (using one way or the other) convert the result into numbers (0-13) for banks, which I now know correspond to the banks in the order they are listed in the include, or it is done manually where it converts
Simba Code:
'BANK_BOOTH'to BANK_BOOTH
, and the same thing was done with presets except the numbers were (3-4). I know that the form is supposed to work with custom records, as the scripts that I've looked at have done. I was just wondering if there was a way to convert it automatically, like there is strToInt, but to remove the ' '.