Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

How to Properly use .activate();

Joined
May 6, 2015
Messages
16
Prayers are working fine for me on that setup, you are using the normal spellbook correct? Also, I'm not familiar with what you're talking about in your last sentence.
Yes, I'm using the normal spellbook. For me, it opens the prayer window and then doesn't select a prayer.
Code:
package com.designdecay.barrows;

import com.runemate.game.api.script.framework.task.Task;
import com.runemate.game.api.rs3.local.hud.Powers;

public class Fight extends Task {
   
    @Override
    public boolean validate() {
         return true;
    }
    @Override
    public void execute() {
        Powers.Prayer.PROTECT_FROM_MELEE.toggles();
    }
}

If you have both an on hand and off hand magic weapon equipped it will ask you this what to set the spell for.
https://i.imgur.com/s98oVds.png

Can you confirm what the proper behavior is for .isSelected();?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Yes, I'm using the normal spellbook. For me, it opens the prayer window and then doesn't select a prayer.
Code:
package com.designdecay.barrows;

import com.runemate.game.api.script.framework.task.Task;
import com.runemate.game.api.rs3.local.hud.Powers;

public class Fight extends Task {
  
    @Override
    public boolean validate() {
         return true;
    }
    @Override
    public void execute() {
        Powers.Prayer.PROTECT_FROM_MELEE.toggles();
    }
}

If you have both an on hand and off hand magic weapon equipped it will ask you this what to set the spell for.
https://i.imgur.com/s98oVds.png

Can you confirm what the proper behavior is for .isSelected();?
The prayer class doesn't have an isSelected, if you're referring to the magic class then it simply verifies if the spell is selected. By selected, I'm referring to the white border around certain spells once they're enabled.

Regarding the method, it's toggle() not toggles() to start. Beyond that, it'll immediately return false if you don't have the required level, but if it's opening the window it means it's going beyond that so I'm not sure what the issue is. Are all prayers not working or is it only the one you're trying to use. Also confirm you're using prayers and not curses or vice versa.

Regarding that interface... loan me an account and I'll look into it.
 
Top