bknight2602 Grandmaster Cheater
Reputation: 0
Joined: 08 Oct 2012 Posts: 590
|
Posted: Mon Apr 20, 2020 8:13 am Post subject: Timer not working |
|
|
| Code: |
function IncBtlExpTo99(sender)
addresslist = getAddressList()
btlexp1_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 1 Exp In Battle");
btlexp1 = memoryrecord_getValue(btlexp1_address);
memoryrecord_setValue(btlexp1_address, 99);
btlexp2_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 2 Exp In Battle");
btlexp2 = memoryrecord_getValue(btlexp2_address);
memoryrecord_setValue(btlexp2_address, 99);
btlexp3_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 3 Exp In Battle");
btlexp3 = memoryrecord_getValue(btlexp3_address);
memoryrecord_setValue(btlexp3_address, 99);
btlexp4_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 4 Exp In Battle");
btlexp4 = memoryrecord_getValue(btlexp4_address);
memoryrecord_setValue(btlexp4_address, 99);
btlexp5_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 5 Exp In Battle");
btlexp5 = memoryrecord_getValue(btlexp5_address);
memoryrecord_setValue(btlexp5_address, 99);
btlexp6_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 6 Exp In Battle");
btlexp6 = memoryrecord_getValue(btlexp6_address);
memoryrecord_setValue(btlexp6_address, 99);
btlexp7_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 7 Exp In Battle");
btlexp7 = memoryrecord_getValue(btlexp7_address);
memoryrecord_setValue(btlexp7_address, 99);
btlexp8_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 8 Exp In Battle");
btlexp8 = memoryrecord_getValue(btlexp8_address);
memoryrecord_setValue(btlexp8_address, 99);
btlexp9_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 9 Exp In Battle");
btlexp9 = memoryrecord_getValue(btlexp9_address);
memoryrecord_setValue(btlexp9_address, 99);
btlexp10_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 10 Exp In Battle");
btlexp10 = memoryrecord_getValue(btlexp10_address);
memoryrecord_setValue(btlexp10_address, 99);
btlexp11_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC 11 Exp In Battle");
btlexp11 = memoryrecord_getValue(btlexp11_address);
memoryrecord_setValue(btlexp11_address, 99);
btlexpa2_address = addresslist_getMemoryRecordByDescription(addresslist, "Hero ATC Ally 2 Exp In Battle");
btlexpa2 = memoryrecord_getValue(btlexpa2_address);
memoryrecord_setValue(btlexpa2_address, 99);
print("Battle Exp. inc. to 99")
end;--IncBtlExpTo99()
--
self.tbtl = createTimer(nil, false)
self.tbtl.onTimer = IncBtlExpTo99
self.tbtl.Interval = 500;
self.tbtl.Enable = false
--
self.update_btlexp = createButton(self.form);
self.update_btlexp.Caption = 'Inc. Battle Exp To 99 (Battles ONLY)';
self.update_btlexp.height = 35;
self.update_btlexp.left = 84;
self.update_btlexp.top = 137;
self.update_btlexp.width = 250;
self.update_btlexp.onClick = function (sender)
self.tbtl.Enable = true
end;--function (sender)
|
What I'm attempting to accomplish is to have a timer but only have it run once the button is selected.
Two questions what is the correct syntax for a print statement to check status of a timer? As the function never runs what needs to change to make it work?
|
|