/* version 5 : Loïc Berthelot, dec 2000 */ /* */ /* nouvelle version 4.5 : Loïc Berthelot nov 2000 */ /* */ /* photoedit.pkg : editeur du plugin photo3 - march 00 */ typeof plugin=S;; typeof class=S;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun save(l)= [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ ("eventC"::(strcat class ".getPhoto")::nil):: ("eventC"::(strcat class ".activated")::nil):: /*("eventC"::(strcat class ".quit")::nil)::*/ ("eventC"::(strcat class ".updateScore")::nil):: ("eventC"::(strcat class ".finalScore")::nil):: ("actionC"::(strcat class ".indicateItem")::nil):: ("actionC"::(strcat class ".update")::nil):: /*SD*/ ("zoneC"::"paintBallValues"::nil):: ("zoneC"::"paintBallGuns"::nil):: ("zoneC"::"paintBallMsg"::nil):: ("zoneC"::"paintBallTalk"::nil):: nil ];; fun cbPro () = let BigToAsc BigInvn BigFromAsc _getpack _checkpack "dms/3d/plugins/paintballav/paintballav.conf" BigFromAsc "8c03389264ea20e9" -> s in let if (strlen s)!=9 then nil else [htoi substr s 1 4 htoi substr s 5 4] -> [datedebut periode] in if periode==nil then (_DLGMessageBox _channel nil _locEditor "PRO_WARNING" nil _locEditor "PRO_INVALID_MSG" nil 0;0) else if periode==0 then 1 else let ((time>>1)&0x3fffffff)/43200-datedebut -> x in if x<0 then (_DLGMessageBox _channel nil _locEditor "PRO_WARNING" nil _locEditor "PRO_INVALID_MSG" nil 0;0) else if x<=periode then (_DLGMessageBox _channel nil _locEditor "PRO_WARNING" nil _locEditor "PRO_LIMITED_MSG" (itoa (periode-x))::nil 0;1) else (_DLGMessageBox _channel nil _locEditor "PRO_WARNING" nil _locEditor "PRO_ENDLIMITED_MSG" nil 0;0) ;; fun IniPlug(file)= set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegisterPro class @cbPro; PlugRegister class @save nil nil nil;;