Back to "mager" tags

Mushroom with timer example by Jaseowns

1#####
2## Mushroom Options
3###
4@setvar! jaseowns_EatShroomies 1
5@setvar! jaseowns_EatShroomiesTimerCD 60000
6@setvar! jaseowns_EatShroomiesAtDiffMana 35
7
8if not timerexists jaseowns_EatShroomiesTimer
9    settimer jaseowns_EatShroomiesTimer jaseowns_EatShroomiesTimerCD
10endif
11
12#####
13## Eat Mushroom Check
14###
15if timer jaseowns_EatShroomiesTimer >= jaseowns_EatShroomiesTimerCD and diffmana >= jaseowns_EatShroomiesAtDiffMana and findtype 29012 backpack 2963 as jaseowns_MushroomItem
16    dclick jaseowns_MushroomItem
17    getlabel backpack jaseowns_PingCheck
18    if insysmsg "You are already at your maximum mana."
19        // do nothing
20    elseif insysmsg "You consume a magic mushroom and restore some mana."
21        settimer jaseowns_EatShroomiesTimer 0
22        wait 650
23    endif
24endif