viewing paste [ Request ] Disable Costume Equip | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
// =============================
/* Disable costume equip: http://herc.ws/board/topic/13925-disable-costume-equip/
    ----------------------------
    by: Legend
    compatible w/: Hercules
    ----------------------------
    Description:
    * Allows you to disable wearing of costume items
      while donate items were equipped.
    ----------------------------
    comments:
    * Please report to me if bugs were found:
      Contact: http://herc.ws/board/user/5387-legend/
*/
// =============================
// PLEASE DO NOT FORGET THIS!
// INSERT THIS SCRIPT TO ALL YOUR COSTUME ITEMS ON ITEMDB
/*
 
 
    Script: <"
        doevent "Request#7::OnCheckItem";
    ">
    
    
*/
// =============================
-   script  Request#7   FAKE_NPC,{
OnInit:
    // Add all your donate item id here
    setarray .c[0],2220,2280; // 2220 = hat || 2201 = sunglass || 2280 = sakkat
    end;
    
OnCheckItem:
    for (.@i = 0; .@i < getarraysize(.c); ++.@i){
        if (isequipped(.c[.@i])){
            ++.@citem;
        }
    }
    if (.@citem){
        if (getequipisequiped(EQI_COSTUME_HEAD_TOP)) unequip EQI_COSTUME_HEAD_TOP;
        if (getequipisequiped(EQI_COSTUME_HEAD_MID)) unequip EQI_COSTUME_HEAD_MID;
        if (getequipisequiped(EQI_COSTUME_HEAD_LOW)) unequip EQI_COSTUME_HEAD_LOW;
        if (getequipisequiped(EQI_COSTUME_GARMENT)) unequip EQI_COSTUME_GARMENT;
        message strcharinfo(0), "You are not allowed to wear costume item while wearing donate equipment.";
    }
    end;
}
Viewed 1181 times, submitted by Legend.