im trying to make a script to keep track of how much gold i deposit throughout the day.
the problem is the comma in the deposit amount is messing it up...i've tried messing with
the replace function and didnt get anywhere (im a newb).
<trigger
enabled="y"
match="*You deposit * coins in the bank."
send_to="12"
sequence="100"
>
as long as the amount i deposit doesn't have a comma, it works fine.
(my attempts to mess with Replace aren't shown here...they failed and yours
will most likely work :P)
this is why i didnt show what i attempted...it lacks a comma. just seemed like an incomplete sentence to me. i only cross-posted in case people didnt check JScript section anymore.
Results for both vars gold and dumb (triggering the script 3 times in a row):
01000 gold deposited.
1000 gold deposited.
5121000 gold deposited.
1000 gold deposited.
51210001000 gold deposited.
1000 gold deposited.
i've tried so many other ways and different setups than that but none
yielded what i wanted. im sure whatever im doing wrong is something small
and idiotic on my part.
Your second example was concatenating strings, so for example if you started with 20 coins, and got another 20 you would end up with 2020 coins. If you change it to an integer it works:
is there any way for plugins to work without triggers being enabled?
always wondered if i could ever have the "Enable Triggers"
box unchecked and have the plugin triggers still work.