Lambda11 / let-me-fish

TERA-proxy module that mass-auto-fishes fishes, auto-crafts bait when out of bait, and auto-dismantles fish when inventory gets full
27 stars 22 forks source link

Auto Salad? #20

Closed jsngrn closed 4 years ago

jsngrn commented 5 years ago

Didn't see any way to contact you via PM Curious if you could add auto salad to the code Something like:

function useRod() {
    if (enabled && rodId != null) {
        if (abnormalityDuration(70261) <= 0 && fishsalad.amount > 0) {
            fishsalad.amount -= 1;
            mod.toServer('C_USE_ITEM', 3, {
                gameId: mod.game.me.gameId,
                id: fishsalad.id,
                dbid: 0,
                target: 0,
                amount: 1,
                dest: 0,
                loc: playerLocation.loc,
                w: playerLocation.w,
                unk1: 0,
                unk2: 0,
                unk3: 0,
                unk4: true
            });
        }
        timeouts.push(setTimeout(() => {
            mod.toServer('C_USE_ITEM', 3, {
                gameId: mod.game.me.gameId,
                id: rodId,
                dbid: 0,
                target: 0,
                amount: 1,
                dest: 0,
                loc: playerLocation.loc,
                w: playerLocation.w,
                unk1: 0,
                unk2: 0,
                unk3: 0,
                unk4: true
            });
        }, 500));
    }
}
Owyn commented 5 years ago

You could probably just use https://github.com/Owyn/generic-box-opener-item-user and set boxdelay to salad duration

jsngrn commented 5 years ago

You could probably just use https://github.com/Owyn/generic-box-opener-item-user and set boxdelay to salad duration

Might not work, you can't use food while fishing, and you're fishing almost all the time with this. What I suspect would happen is after 30min box opener would try to eat the food and wouldn't be able to then break. The function would have to trigger before the rod is cast and possibly only trigger when you don't have the buff + have salad in inventory.