ある地点から最も近い人のハンドルの取り方

Last-modified: 2015-05-03 (日) 18:47:11
 00A0: store_actor $PLAYER_ACTOR position_to 3@ 4@ 5@
  9@ = 1000.0
  16@ = 0
  0A8D: 27@ = read_memory 0xB74490 size 4 virtual_protect 0
  000A: 27@ += 0x4
  0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
  for 28@ = 0 to 35584 step 0x100
     0A8D: 26@ = read_memory 27@ size 1 virtual_protect 0
     000A: 27@ += 0x1
     if and
     0029:   26@ >= 0x00
     001B:   0x80 > 26@
     then
         005A: 26@ += 28@ // (int)
         if
         056D: (check) actor 26@ defined
         then
             00A0: store_actor 26@ position_to 0@ 1@ 2@
             050A: 10@ = distance_between_XYZ 0@ 1@ 2@ and_XYZ 3@ 4@ 5@
             if
             0025: (check) 9@ > 10@ // (float)
             then
                 0087: 9@ = 10@ // (float)
                 0085: 16@ = 26@ // (int)
             end
         end
     end
  end
  if
  056D: (check) actor 16@ defined
  then
      #近い人16@
  end