Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

[Python] Magery, DRW

Only working scripts
Post Reply
ybw
Neophyte
Neophyte
Posts: 13
Joined: 02.04.2012 18:47

[Python] Magery, DRW

Post by ybw »

Подходим к сундуку с регом НС
(ID сундука нужно указать)

Помните, что python чувствителен к отступам

Code: Select all

# -*- coding: mbcs -*-

chest_id = 0x40108B8C # ID Сундука
reg_type = 0x0F88 # ID Типа рега

def lag_detector():
    ClearJournal()
    ClickOnObject(Backpack())
    while not InJournal('a backpack'):
        Wait(100)


def regenerate():
    if InJournal('You lack sufficient mana for this spell') > 0:
        AddToSystemJournal('Meditation')
        ClearJournal()
        UseSkill('Meditation')
        while Mana() != MaxMana():
            if InJournal('You are') > 0 or InJournal('You lose') > 0:
                ClearJournal()
                UseSkill('Meditation')
            Wait(100)

while True:
    regenerate()
    FindType(reg_type, Backpack())
    if FindCount() > 0:
        Cast('Poison')
        lag_detector()
        WaitTargetSelf()
        Wait(3000)
    else:
        UseObject(chest_id)
        lag_detector()
        regi = FindType(reg_type, chest_id)
        if FindCount() > 0:
            MoveItem(regi, 100, Backpack(), 0, 0, 0)
            Wait(700)
        else:
            AddToSystemJournal('Regs not found')
            break
Post Reply