- UID
 - 246
 
- UCC
 -  
 
- 声望
 -  
 
- 好评
 -  
 
- 贡献
 -  
 
- 最后登录
 - 1970-1-1
 
 
 
 
 
 
 | 
 
 楼主 |
发表于 2010-12-15 04:56:53
|
显示全部楼层
 
 
 
 本帖最后由 黑暗枪骑兵 于 2010-12-14 19:07 编辑  
 
第二部分- 001   $anull = null
 
 - 002   if $ship == null
 
 - 003    $ship = [PLAYERSHIP]
 
 - 004    $yield = 1
 
 - 005   end
 
 - 006   
 
 - 007   $flags = [Find.Enemy] | [Find.Random]
 
 - 008   skip if $ship != $anull
 
 - 009    $ship = [PLAYERSHIP]
 
 - 010   skip if $yield != null
 
 - 011    $yield = 1
 
 - 012   $sec = $ship -> get sector
 
 - 013   $installed = $ship -> get current missile
 
 - 014   skip if $installed != null
 
 - 015    return $anull
 
 - 016   $ship -> set fire missile time difference to 1 ms
 
 - 017   skip if $yield != 0
 
 - 018    $yield = 999
 
 - 024   
 
 - 025   $flags = [Find.Enemy] | [Find.Multiple]
 
 - 026   $earray =  find ship: sector=$sec class or type=Ship race=null flags=$flags refobj=$ship maxdist=$range maxnum=100 refpos=$anull
 
 - 027   
 
 - 028   $asize =  size of array $earray
 
 - 029   $stasize =  size of array $earray
 
 - 030   
 
 - 031   $msg = sprintf: pageid=8815 textid=2, $installed, $asize, null, null, null
 
 - 032   if $asize == 1
 
 - 033    $t = $earray[0]
 
 - 034    $msg = sprintf: pageid=8815 textid=2, $installed, $t, null, null, null
 
 - 035   end
 
 - 036   skip if $asize == 0
 
 - 037    display subtitle text: text=$msg duration=4000 ms
 
 - 038   
 
 - 039   $orace = $target -> get owner race
 
 - 040   
 
 - 041   $target -> set attacker to $ship
 
 - 042   $race = $target -> get owner race
 
 - 043   $gv = $race + 'lv.med.ai.ar'
 
 - 044   $global = get global variable: name=$gv
 
 - 045   
 
 - 046   if $global == null
 
 - 047    if $race != null
 
 - 048     $store =  array alloc: size=0
 
 - 049     append $target to array $store
 
 - 050     set global variable: name=$gv value=$store
 
 - 051    end
 
 - 052   end
 
 - 053   
 
 - 054   
 
 - 055   while $yield > 0
 
 - 056    while $asize > -1
 
 - 057     $spc = $ship -> get shield percent
 
 - 058     skip if $spc > 30
 
 - 059      return $anull
 
 - 060     $target = $earray[$asize]
 
 - 061     if $target != $anull
 
 - 062      $tobj = $target -> get object class
 
 - 063      $ybchk = $ship -> get amount of ware $installed in cargo bay
 
 - 064      if $ybchk == 0
 
 - 065       = speak text: page=13 id=135 priority=0
 
 - 066       return $anull
 
 - 067      end
 
 - 068      $holo.on = get global variable: name='lv.m.hol'
 
 - 069      if $holo.on == 1
 
 - 070       $task = $ship -> get next available task: starting=1
 
 - 071       $ship -> 
 
  复制代码 |   
 
 
 
 |