[ITEMDEF i_barrel_wine] DEFNAME=i_barrel_wine ID=i_barrel NAME=Wine Barrel TYPE=T_normal WEIGHT=100 CATEGORY=Provisions - Miscellaneous SUBSECTION=Containers DESCRIPTION=Wine Barrel SKILLMAKE=TINKERING 100.0,t_tinker_tools RESOURCES=i_barrel,i_barrel_tap On=@Cr eate morex=0 morey=0 more=0 timer=-1 color=001a On=@Cli ck if ((<more> =2) && (<morey> =0) more=0 timer=-1 return 1 endif if (<more> = 0) timer=-1 if (<morex> > 0) message <name> with <morex> grapes return 1 else message Empty <name> return 1 endif endif if (<more> = 1) message In this <name> wine is not ready yet return 1 endif if (<more> = 2) message <name> with <morey> wine parts return 1 endif return 1 On=@DClick if ((<more> =2) && (<morey> =0) more=0 timer=-1 return 1 endif if (<more> = 1) message In this <name> pass fermentation process return 1 endif if (<more> = 0) Target Select grapes to load in <name> return 1 endif if (<more> = 2) Target Select bottle to fill up return 1 endif return 1 On=@Timer if (<more> = 0) //empty timer=-1 return 1 endif if (<more> = 1) //fermentation timer=3600 //1 hour more=2 //ready morey=20 //add wine charges morex=0 //remove grapes say Wine is ready! return 1 endif if (<more> = 2) //ready timer=-1 //stop timer more=0 //empty morey=0 //remove wine say You loose your wine! return 1 endif return 1 On=@TargOn_Item if (<more> = 0) //empty barrel if (<src.targ.id>==09d1) if (<src.targ.topobj.serial> != <src.serial>) src.sysmessage You must have the item in your backpack. return 1 endif if (<src.targ.amount> < (100 - <morex>)) morex=(<morex> + <src.targ.amount>) src.targ.remove return 1 endif if (<src.targ.amount> = (100 - <morex>)) morex=100 src.targ.remove more=1 //in fermentation timer={18000 21600} //5-7 hours say Wine is now start to ferment! return 1 endif if ((<src.targ.amount>) > (100 - <morex>)) src.targ.amount=((<src.targ.amount>) - (100 - <morex>)) morex=100 more=1 //in fermentation timer={18000 21600} //5-7 hours say Wine is now start to ferment! return 1 endif return 1 endif return 1 endif if (<more> = 2) //ready barrel if (<morey> > 0) //if have wine if (<src.targ.id>==09a7) if (<src.targ.topobj.serial> != <src.serial>) src.sysmessage You must have the item in your backpack. return 1 endif src.newitem i_pitcher_wine src.act.equip src.targ.remove morey=(<morey > - 1) return 1 endif return 1 else more=0 //empty barrel timer=-1 //stop timer say This <name> now is empty! return 1 endif return 1 endif return 1 On=@TargOn_Char return 1
[EOF]
Добавлено (2008-06-07, 10:28 Am)---------------------------------------------Чето почтиничего непашет