HeavenArmour Change of Stats

    Just a little script to automatically change HeavenArmours stats when its worn/not worn and a little lesson in script house keeping :) (using the #CALL method)

    First of all make two new folders in your MirServer/Mir200/Envir/QuestDiary called "TakeOn" and "TakeOff". Within the two new folders you just created add a text document to each called "HeavenArmour".

    Add the following to the "TakeOn/HeavenArmour.txt" file:
    Code:
    [@TakeOnHA]
    {
    #IF
    CHECKITEMW HeavenArmour(M)
    #ACT
    goto @heavenlevel
    break

    [@heavenlevel]
    #IF
    CHECKLEVELEX => 50
    #ACT
    goto @heaven50
    break

    #IF
    CHECKLEVELEX => 40
    #ACT
    goto @heaven40
    break

    #IF
    CHECKLEVELEX => 30
    #ACT
    goto @heaven30
    break

    #IF
    CHECKLEVELEX < 30
    #ACT
    break

    [@heaven50]
    #ACT
    TAKEW HeavenArmour(M)
    give HeavenArmour(M)3
    takeonitem HeavenArmour(M)3 0
    break

    [@heaven40]
    #ACT
    TAKEW HeavenArmour(M)
    give HeavenArmour(M)2
    takeonitem HeavenArmour(M)2 0
    break

    [@heaven30]
    #ACT
    TAKEW HeavenArmour(M)
    give HeavenArmour(M)1
    takeonitem HeavenArmour(M)1 0
    break
    }
    The above checks if you are wearing a HeavenArmour, if you are then checks your level (20+, 30+, 40+ and 50+) and removes/gives the additional stated armour (HeavenArmour1 2 3 etc) in accordance to the users level

    Then add the following to the "TakeOff/HeavenArmour.txt" file:
    Code:
    [@TakeoffHA]
    {
    #IF
    checkitem HeavenArmour(M)3 1
    #ACT
    take HeavenArmour(M)3 1
    give HeavenArmour(M)
    break

    #IF
    checkitem HeavenArmour(M)2 1
    #ACT
    take HeavenArmour(M)2 1
    give HeavenArmour(M)
    break

    #IF
    checkitem HeavenArmour(M)1 1
    #ACT
    take HeavenArmour(M)1 1
    give HeavenArmour(M)
    break
    }
    This checks to see if you have an additional stated heavenarmour, if you do then replaces it with a normal heaven armour.

    Finally add the TakeOn, TakeOff and #CALL's to your QFunction:
    Code:
    ;----------------------------Take on Items--------------------------
    [TakeOn0]
    #CALL [\\TakeOn\HeavenArmour.txt] @TakeOnHA
    break

    ;----------------------------Take off items-----------------------------
    [TakeOff0]
    #CALL [\\TakeOff\HeavenArmour.txt] @TakeOffHA
    Which calls the above files you created.

    Only problem with this script is it gives HeavenArmour's unlimited dura (because it creates new ones upon takeon/takeoff)...

    Also this works for HeavenArmour(M) you will have to copy and paste for (F).

    Hope this helps :)

    Sam

