Squiso е безплатен, мощен инструмент за автоматизация, който ви позволява да персонализирате своя поток в Twitch с помощта на прости скриптове.
Как да принудите стриймъра да стреля с оръжието си с Twitch Channel Points
Този пример за скрипт слуша Twitch Channel Point Reward, изкупува и след това симулира действия с мишката и клавиатурата, за да принуди стримерите да стрелят с оръжието си и да хвърлят граната в игрите.
Гледайте видеото
Пример за скрипт
import com.squiso.*;
import com.squiso.exception.*;
import com.squiso.scripting.*;
import com.squiso.scripting.data.*;
import com.squiso.keyboard.*;
import com.squiso.twitch.*;
import com.squiso.datatypes.*;
import com.squiso.utils.*;
import com.squiso.sysinfo.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
    
    @Override
    public void onTwitchChannelPointRedeem(OnTwitchChannelPointRedeemData data, API api) throws SquisoException {
        // If the reward that got redeemed is called "Shoot Gun"
        if (data.getRewardName().equals("Shoot Gun")) {
            // Wait 5 seconds (5000ms)
            api.sleep(5000);
            // Hold down the left mouse button for 2 seconds
            api.mouseButtonLeftPress(2000);
        }
        // If the reward that got redeemed is called "Throw Grenade"
        if (data.getRewardName().equals("Throw Grenade")) {
            // Wait 5 seconds (5000ms)
            api.sleep(5000);
            // Press the G key
            api.keyPress(KeyboardKey.G);
            // Wait a second again
            api.sleep(1000);
            // Throw the grenade
            api.mouseButtonLeftPress();
        }
    }
}
    