Okay so I wanted to make a bot to do very simple functions in a battle. Like a sending a message. So far, nothing works. Can someone tell me --extremely clearly-- what I'm supposed to do? I know JavaScript well enough, but I don't know much Java. (I have no idea which language I'm supposed to use. Some say Java, others say Javascript -_-) I decided to begin at level zero and enabled Scripts Window in plugin manager. In the 'Battle Scripts' tab, I pasted this: battle.battleMessage(battle.id, "Good Luck"); ...it didn't work. I thought it was lacking a trigger, and did this: onBeginTurn(turn) { if(turn==1) battle.battleMessage(battle.id, "Good Luck"); } and that too didn't work. I understood the onSendOut() is triggered at the start of the battle, but I'm getting a but confused about the variables, so I opted for a simpler event instead. So help? What am I doing wrong? Which language am I supposed to use?
Declare them as functions (This is javascript) and encapsulate. Copy this in to help you get started. Code (javascript): ({ onBeginTurn : function(turn) { battle.battleMessage(battle.id, "turn"); }, onTierNotification : function (tier) { battle.battleMessage(battle.id, "hello"); battle.battleMessage(battle.id, client.windowActive()); } });