viewing paste [ Request ] No Pet or Homunculus al | 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
// =============================
/* No Pet or Homunculus allowed: http://herc.ws/board/topic/14050-no-pet-or-homunculus-allowed/
    ----------------------------
    by: Legend
    compatible w/: Hercules
    ----------------------------
    Description:
    * Restricts pets & homunculus on a specific map
    ----------------------------
    Comments:
    * Please report to me if bugs were found:
      Contact: http://herc.ws/board/user/5387-legend/
*/
// =============================
-   script  request#9   FAKE_NPC,{
OnPCLoadMapEvent:
    if (petstat(PET_CLASS)) || (checkhomcall() == 0) {
        for (.@a = 0; .@a < getarraysize(.m$); ++.@a){
            if (strcharinfo(3) == .m$[.@a]) {
                dispbottom "Pets and Homunculus are not allowed on this area.",0xFF0000;
                sleep2 3000;
                warp "SavePoint",0,0;
                end;
            }
        }
        end;
    }
    end;
    
OnInit:
    setarray .m$[0],"prontera","payon";
    for (.@a = 0; .@a < getarraysize(.m$); ++.@a){
        setmapflag .m$[.@a],mf_loadevent;
    }
    end;
}
Viewed 1185 times, submitted by Legend.