文章
					
								由 kimoyahoo » 週六 7月 26, 2003 10:55 am
			
			
			
			
			題目: 反加速腳本
類型: 優秀原創腳本
加入日期: 2002-9-18 18:39:45
作者: killing
--------------------------------------------------------------------------------
ON=@LOGIN 
src.events=+e_speed 
ON=@LOGOUT 
src.events=-e_speed 
[EVENTS e_speed] 
ON=@EnvironChange 
if <src.hits>>0 
unspeed 
else 
return 1 
endif 
[function unspeed] 
src.newitem=i_detect_tool 
src.act.timer=60 
src.act.equip 
return 1 
[itemdef i_detect_tool] 
NAME=speed detect tool 
ID=i_handr_1 
TYPE=T_EQ_SCRIPT 
LAYER=30 
on=@create 
attr=02 
ON=@UserDCLICK 
EQUIP 
RETURN 1 
ON=@EQUIP 
IF (<SRC.npc>==0) 
  if  <src.tag.speeddetected> 
      return 1 
  endif 
  src.tag.speeddetected=1 
  SRC.NEWITEM=i_detect_speed 
  SRC.act.NAME=<SRC.NAME>'s speed detect 
  SRC.act.LINK=<src.uid> 
  SRC.ACT.morep=<SRC.P> 
  src.act.p=<src.p> 
  src.act.tag.time=60 
  SRC.ACT.TIMER=1 
  SRC.FIX 
ELSE 
RETURN 1 
ENDIF 
RETURN 1 
on=@timer 
remove 
[itemdef i_detect_speed] 
Name=Speed detected 
id=0181d 
TYPE=t_script 
on=@create 
attr=080 
timer=-1 
tag.x=0 
tag.y=0 
tag.time=00 
ON=@TIMER 
tag.x=<eval <LINK.P.x>> 
tag.y=<eval <link.p.y>> 
IF <tag.x>><MOREX> 
  MORE=<tag.x>-<MOREX> 
 ELSE 
  MORE=<MOREX>-<tag.x> 
ENDIF 
IF <tag.y>><MOREY> 
  MORE2=<tag.y>-<MOREY> 
 ELSE 
  MORE2=<MOREY>-<tag.y> 
ENDIF 
IF <LINK.FLAGS>&080000000  
 IF ((<MORE1>>10)&&(<MORE1><30))||((<MORE2>>8)&&(<MORE2><30))  
   LINK.SAYU .開加速齒輪的下場就是這樣!!!! 
   link.kill 
 ENDIF  
ELSE  
 IF ((<MORE1>>5)&&(<MORE1><20))||((<MORE2>>5)&&(<MORE2><20)))  
   LINK.SAYU .開加速齒輪的下場就是這樣!!!! 
   link.kill 
 ENDIF  
ENDIF  
IF (<tag.time><=0)||(<link.hits>==0) 
  link.tag.speeddetected=0 
 REMOVE 
ELSE 
 MOREP=<LINK.P> 
 tag.time=<eval (<tag.time>+(-1))> 
 TIMER=1 
ENDIF 
RETURN 1