Jump to content

Quick Quest API Help!


imancity

Recommended Posts

1) I'm not sure if I am using it incorrectly, but I was trying to use the getQuest().isComplete/isStarted as criteria for moving onto other parts, but it seems even though I have it talk to the NPC only when !getQuest().isStarted(...), it still keeps talking to her.

 

2) For cutscenes during Quests, how do I make it so the player doesn't spam click the NPC (like a conditional sleep while cutscene goes on).

 

Thanks! :D

Link to comment
Share on other sites

Really? sad.png damn it. I was so excited when I saw the options lmfao. Hmm.. it seemed to recognize a Quest.isComplete from an earlier part of my script tho?

I have no idea how it behaves but I wouldn't rely on that. Other people told me it's not working. I don't personally use anything in OSBot's Quests classes.

  • Like 1
Link to comment
Share on other sites

 

you could use something like this:

public enum Quests {
 QUEST(0);

 private int configValue;

 public int getConfigValue() {
 return configValue;
 }

 public boolean isStarted(Quests quest, MethodProvider api) {
 return api.getConfigs(quest.getConfigValue()) != 0;
 }
}

 

Could you possibly explain what that is doing? I'm having trouble reading it :/

 

Link to comment
Share on other sites

/**
 * Created by Sinatra_PC on 06/01/2016.
 */
public enum QuestsAPI { /*Thanks dogerina*/
    TUTORIAL_ISLAND(406, true),
    ABYSS_SUBQUEST(492),
    BLACK_KNIGHTS_FORTRESS(130, true), // 4
    COOKS_ASSISTANT(29, true), // 2
    DEMON_SLAYER(222, true), // 2561 3
    DORICS_QUEST(31, true), // 199
    DRAGON_SLAYER(176, true), // 10
    ERNEST_THE_CHICKEN(32, true), // 3
    GOBLIN_DIPLOMACY(62, true), // 6
    IMP_CATCHER(160, true), // 2
    THE_KNIGHTS_SWORD(122, true), // 7
    PIRATES_TREASURE(160, true), // 2
    PRINCE_ALI_RESCUE(273, true), // 110
    THE_RESTLESS_GHOST(107, true), // 5
    ROMEO_AND_JULIET(144, true),
    RUNE_MYSTERIES(63, true), // 6
    SHEAP_SHEARER(179, true), //
    SHIELD_OF_ARRAV(145, true), //logged 146 too, might be different for gang
    VAMPIRE_SLAYER(178, true),
    WITCHS_POTION(67, true),
    ANIMAL_MAGNETISM(939),
    ANOTHER_SLICE_OF_HAM(997),
    BETWEEN_A_ROCK(433),
    BIG_CHOMPY_BIRD_HUNTING(293),
    BIOHAZARD(68),
    CABIN_FEVER(655),
    CLOCK_TOWER(10),
    COLD_WAR(968),
    CONTACT(964),
    CREATURE_OF_FENKENSTRAIN(399),
    DARKNESS_OF_HALLOWVALE(869),
    DEATH_PLATEAU(314),
    DEATH_TO_THE_DORGESHUUN(794),
    DESERT_TREASURE(440),
    DEVIOUS_MINDS(622),
    THE_DIGSITE(131),
    DREAM_MENTOR(1003),
    DRUIDIC_RITUAL(80),
    DWARF_CANNON(69), //wrong
    EADGARS_RUSE(335),
    EAGLES_PEAK(934),
    ELEMENTAL_WORKSHOP_I(299),
    ELEMENTAL_WORKSHOP_II(896),
    ENAKHRAS_LAMENT(641),
    ENLIGHTENTED_JOURNEY(912),
    THE_EYES_OF_GLOUPHRIE(844),
    FAIRYTALE_I(671),
    FAIRYTALE_II(810),
    FAMILY_CREST(148),
    THE_FEUD(435),
    FIGHT_ARENA(17),
    FISHING_CONTEST(11),
    FORGETTABLE_TALE(521),
    THE_FREMMENIK_ISLES(970),
    THE_FREMMENIK_TRIALS(347),
    GARDEN_OF_TRANQUILITY(188),
    GERTRUDES_CAT(180),
    GHOSTS_AHOY(408),
    THE_GIANT_DWARF(482),
    THE_GOLEM(437),
    THE_GRAND_TREE(150),
    THE_GREAT_BRAIN_ROBBERY(980),
    GRIM_TALES(1016),
    THE_HAND_IN_THE_SAND(635),
    HAUNTED_MINE(382),
    HAZEEL_CULT(223),
    HEROES_QUEST(188),
    HOLY_GRAIL(5),
    HORROR_FROM_THE_DEEP(351),
    ICTHLARINS_LITTLE_HELPER(445),
    IN_AID_OF_THE_MYREQUE(705),
    IN_SEARCH_OF_THE_MYREQUE(387),
    JUNGLE_POTION(175),
    KINGS_RANSOM(1049),
    LEGENDS_QUEST(139),
    LOST_CITY(147),
    THE_LOST_TRIBE(465),
    LUNAR_DIPLOMACY(823),
    MAKING_HISTORY(604),
    MERLINS_CRYSTAL(14),
    MONKS_FRIEND(30),
    MONKEY_MADNESS(365),
    MOUNTAIN_DAUGHTER(423),
    MOURNINGS_END_PART_I(517),
    MOURNINGS_END_PART_II(574),
    MURDER_MYSTERY(192),
    MY_ARMS_BIG_ADVENTURE(905),
    NATURE_SPIRIT(307),
    OBSERVATORY_QUEST(112),
    OLAFS_QUEST(994),
    ONE_SMALL_FAVOUR(416),
    PLAGUE_CITY(165),
    PRIEST_IN_PERIL(302),
    RAG_AND_BONE_MAN(714),
    RAT_CATCHERS(607),
    RECIPE_FOR_DISASTER(69),//will need to get the index for each subquest
    RECRUITMENT_DRIVE(496),
    REGICIDE(328),
    ROVING_ELVES(402),
    ROYAL_TROUBLE(730),
    RUM_DEAL(600),
    SCORPION_CATCHER(76),
    SEA_SLUG(159),
    SHADES_OF_MORTTON(339),
    SHADOW_OF_THE_STORM(602),
    SHEEP_HERDER(60),
    SHILO_VILLAGE(116),
    THE_SLUG_MENACE(874),
    A_SOULS_BANE(709),
    SPIRITS_OF_THE_ELID(616),
    SWAN_SONG(723),
    TAI_BWO_WANNAI_TRIO(320),
    A_TAIL_OF_TWO_CATS(568),
    TEARS_OF_GUTHIX(499),
    TEMPLE_OF_IKOV(26),
    THRONE_OF_MISCELLANIA(359),
    THE_TOURIST_TRAP(197),
    TOWER_OF_LIFE(977),
    TREE_GNOME_VILLAGE(111),
    TRIBAL_TOTEM(200),
    TROLL_ROMANCE(385),
    TROLL_STRONGHOLD(317),
    UNDERGROUND_PASS(161), //logged 161 and 162
    WANTED(571),
    WATCHTOWER(212),
    WATERFALL_QUEST(65),
    WHAT_LIES_BELOW(499),
    WITCHS_HOUSE(226),
    ZOGRE_FLESH_EATERS(455);
    
    int getConfigValue;
    boolean isF2P;

    QuestsAPI(int config) {
        this.getConfigValue = config;
    }

    QuestsAPI(int config, boolean isF2P) {
        this.getConfigValue = config;
        this.isF2P = isF2P;
    }
    
    

    public boolean isStarted(QuestsAPI quest, MethodProvider api) {
return api.getConfigs().get(quest.getConfigValue()) != 0;
}
    
    public int getConfigValue(){
        return this.getConfigValue;
    }
    
}

1) I'm not sure if I am using it incorrectly, but I was trying to use the getQuest().isComplete/isStarted as criteria for moving onto other parts, but it seems even though I have it talk to the NPC only when !getQuest().isStarted(...), it still keeps talking to her.

 

2) For cutscenes during Quests, how do I make it so the player doesn't spam click the NPC (like a conditional sleep while cutscene goes on).

 

Thanks! biggrin.png

 

 

2) For cutscenes during Quests, how do I make it so the player doesn't spam click the NPC (like a conditional sleep while cutscene goes on).

 

 

if condition && npc isnt null {

talkToNPC

new Conditional Sleep(x ms){

return -> getDialogues().inDialogue() || getDialogues().isPendingOption;

}.sleep;

 

simple way to do that

1) I'm not sure if I am using it incorrectly, but I was trying to use the getQuest().isComplete/isStarted as criteria for moving onto other parts, but it seems even though I have it talk to the NPC only when !getQuest().isStarted(...), it still keeps talking to her.

 

2) For cutscenes during Quests, how do I make it so the player doesn't spam click the NPC (like a conditional sleep while cutscene goes on).

 

Thanks! biggrin.png

 

 

Edited by Christopher
  • Like 1
Link to comment
Share on other sites

/**
 * Created by Sinatra_PC on 06/01/2016.
 */
public enum QuestsAPI { /*Thanks dogerina*/
    TUTORIAL_ISLAND(406, true),
    ABYSS_SUBQUEST(492),
    BLACK_KNIGHTS_FORTRESS(130, true), // 4
    COOKS_ASSISTANT(29, true), // 2
    DEMON_SLAYER(222, true), // 2561 3
    DORICS_QUEST(31, true), // 199
    DRAGON_SLAYER(176, true), // 10
    ERNEST_THE_CHICKEN(32, true), // 3
    GOBLIN_DIPLOMACY(62, true), // 6
    IMP_CATCHER(160, true), // 2
    THE_KNIGHTS_SWORD(122, true), // 7
    PIRATES_TREASURE(160, true), // 2
    PRINCE_ALI_RESCUE(273, true), // 110
    THE_RESTLESS_GHOST(107, true), // 5
    ROMEO_AND_JULIET(144, true),
    RUNE_MYSTERIES(63, true), // 6
    SHEAP_SHEARER(179, true), //
    SHIELD_OF_ARRAV(145, true), //logged 146 too, might be different for gang
    VAMPIRE_SLAYER(178, true),
    WITCHS_POTION(67, true),
    ANIMAL_MAGNETISM(939),
    ANOTHER_SLICE_OF_HAM(997),
    BETWEEN_A_ROCK(433),
    BIG_CHOMPY_BIRD_HUNTING(293),
    BIOHAZARD(68),
    CABIN_FEVER(655),
    CLOCK_TOWER(10),
    COLD_WAR(968),
    CONTACT(964),
    CREATURE_OF_FENKENSTRAIN(399),
    DARKNESS_OF_HALLOWVALE(869),
    DEATH_PLATEAU(314),
    DEATH_TO_THE_DORGESHUUN(794),
    DESERT_TREASURE(440),
    DEVIOUS_MINDS(622),
    THE_DIGSITE(131),
    DREAM_MENTOR(1003),
    DRUIDIC_RITUAL(80),
    DWARF_CANNON(69), //wrong
    EADGARS_RUSE(335),
    EAGLES_PEAK(934),
    ELEMENTAL_WORKSHOP_I(299),
    ELEMENTAL_WORKSHOP_II(896),
    ENAKHRAS_LAMENT(641),
    ENLIGHTENTED_JOURNEY(912),
    THE_EYES_OF_GLOUPHRIE(844),
    FAIRYTALE_I(671),
    FAIRYTALE_II(810),
    FAMILY_CREST(148),
    THE_FEUD(435),
    FIGHT_ARENA(17),
    FISHING_CONTEST(11),
    FORGETTABLE_TALE(521),
    THE_FREMMENIK_ISLES(970),
    THE_FREMMENIK_TRIALS(347),
    GARDEN_OF_TRANQUILITY(188),
    GERTRUDES_CAT(180),
    GHOSTS_AHOY(408),
    THE_GIANT_DWARF(482),
    THE_GOLEM(437),
    THE_GRAND_TREE(150),
    THE_GREAT_BRAIN_ROBBERY(980),
    GRIM_TALES(1016),
    THE_HAND_IN_THE_SAND(635),
    HAUNTED_MINE(382),
    HAZEEL_CULT(223),
    HEROES_QUEST(188),
    HOLY_GRAIL(5),
    HORROR_FROM_THE_DEEP(351),
    ICTHLARINS_LITTLE_HELPER(445),
    IN_AID_OF_THE_MYREQUE(705),
    IN_SEARCH_OF_THE_MYREQUE(387),
    JUNGLE_POTION(175),
    KINGS_RANSOM(1049),
    LEGENDS_QUEST(139),
    LOST_CITY(147),
    THE_LOST_TRIBE(465),
    LUNAR_DIPLOMACY(823),
    MAKING_HISTORY(604),
    MERLINS_CRYSTAL(14),
    MONKS_FRIEND(30),
    MONKEY_MADNESS(365),
    MOUNTAIN_DAUGHTER(423),
    MOURNINGS_END_PART_I(517),
    MOURNINGS_END_PART_II(574),
    MURDER_MYSTERY(192),
    MY_ARMS_BIG_ADVENTURE(905),
    NATURE_SPIRIT(307),
    OBSERVATORY_QUEST(112),
    OLAFS_QUEST(994),
    ONE_SMALL_FAVOUR(416),
    PLAGUE_CITY(165),
    PRIEST_IN_PERIL(302),
    RAG_AND_BONE_MAN(714),
    RAT_CATCHERS(607),
    RECIPE_FOR_DISASTER(69),//will need to get the index for each subquest
    RECRUITMENT_DRIVE(496),
    REGICIDE(328),
    ROVING_ELVES(402),
    ROYAL_TROUBLE(730),
    RUM_DEAL(600),
    SCORPION_CATCHER(76),
    SEA_SLUG(159),
    SHADES_OF_MORTTON(339),
    SHADOW_OF_THE_STORM(602),
    SHEEP_HERDER(60),
    SHILO_VILLAGE(116),
    THE_SLUG_MENACE(874),
    A_SOULS_BANE(709),
    SPIRITS_OF_THE_ELID(616),
    SWAN_SONG(723),
    TAI_BWO_WANNAI_TRIO(320),
    A_TAIL_OF_TWO_CATS(568),
    TEARS_OF_GUTHIX(499),
    TEMPLE_OF_IKOV(26),
    THRONE_OF_MISCELLANIA(359),
    THE_TOURIST_TRAP(197),
    TOWER_OF_LIFE(977),
    TREE_GNOME_VILLAGE(111),
    TRIBAL_TOTEM(200),
    TROLL_ROMANCE(385),
    TROLL_STRONGHOLD(317),
    UNDERGROUND_PASS(161), //logged 161 and 162
    WANTED(571),
    WATCHTOWER(212),
    WATERFALL_QUEST(65),
    WHAT_LIES_BELOW(499),
    WITCHS_HOUSE(226),
    ZOGRE_FLESH_EATERS(455);
    
    int getConfigValue;
    boolean isF2P;

    QuestsAPI(int config) {
        this.getConfigValue = config;
    }

    QuestsAPI(int config, boolean isF2P) {
        this.getConfigValue = config;
        this.isF2P = isF2P;
    }
    
    

    public boolean isStarted(QuestsAPI quest, MethodProvider api) {
return api.getConfigs().get(quest.getConfigValue()) != 0;
}
    
    public int getConfigValue(){
        return this.getConfigValue;
    }
    
}

2) For cutscenes during Quests, how do I make it so the player doesn't spam click the NPC (like a conditional sleep while cutscene goes on).

 

 

if condition && npc isnt null {

talkToNPC

new Conditional Sleep(x ms){

return -> getDialogues().inDialogue() || getDialogues().isPendingOption;

}.sleep;

 

simple way to do that

 

 

Omg a ton of help, thanks!

 

 

 

Hey Christopher, for that QuestAPI, how would I implement it in the code? I tried writing a check to see if its started and did:

if (!QuestsAPI.IMP_CATCHER.isStarted())

but the isStarted wants something in the ()

Edited by imancity
  • Like 1
Link to comment
Share on other sites

Omg a ton of help, thanks!

 

 

 

Hey Christopher, for that QuestAPI, how would I implement it in the code? I tried writing a check to see if its started and did:

if (!QuestsAPI.IMP_CATCHER.isStarted())

but the isStarted wants something in the ()

private QuestsAPI questsAPI;

if (!questsAPI.isStarted(questsAPI.IMP_CATCHER, this))
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...