我看大神的思路,写的怪物坐标脚本有什么问题?

admin 2023/04/19 12:42:49 134
这个脚本 执行起来 有错误,  我写了一些标注 也找不到问题
我按地图1024*1024  切割分4份 计算


[@main]
#if
#ACT
;范围
MOV P3 256
;坐标1
MOV P1 256
MOV P2 256
;坐标2
MOV P4 768
MOV P5 256
;坐标3
MOV P6 256
MOV P7 768
;坐标4
MOV P8 768
MOV P9 768
#if
#ACT
MOV P20 <$str(P1)>
MOV P30 <$str(P2)>
MOV P40 <$str(P3)>
goto @检测怪
#if
#ACT
MOV P20 <$str(P4)>
MOV P30 <$str(P5)>
MOV P40 <$str(P3)>
goto @检测怪
#if
#ACT
MOV P20 <$str(P6)>
MOV P30 <$str(P7)>
MOV P40 <$str(P3)>
goto @检测怪
#if
#ACT
MOV P20 <$str(P8)>
MOV P30 <$str(P9)>
MOV P40 <$str(P3)>
goto @检测怪

[@检测怪]
#if
CheckRangeMonCountEx JITU 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
DIV P40 2
;256 256 256
sendmsg 7 有1怪X=<$str(P20)>+++Y=<$str(P30)>---<$str(P40)>
goto @检测1


[@检测1]
#if
#ACT
;256-128
DEC P20 <$str(P40)>
;256-128
DEC P30 <$str(P40)>
goto @检测怪怪
#if
#ACT
;256+128
INC P20 <$str(P40)>
;256-128
DEC P30 <$str(P40)>
goto @检测怪怪
#if
#ACT
;256-128
DEC P20 <$str(P40)>
;256+128
INC P30 <$str(P40)>
goto @检测怪怪
#if
#ACT
;256+128
INC P20 <$str(P40)>
;256+128
INC P30 <$str(P40)>
goto @检测怪怪

[@检测怪怪]
#if
CheckRangeMonCountEx JITU 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
DIV P40 2
;128 128 128
sendmsg 7 有2怪X=<$str(P20)>+++Y=<$str(P30)>---<$str(P40)>
goto @检测2


[@检测2]
#if
#ACT
;64  <$str(P40)>
;X-64
DEC  P20 <$str(P40)>
;X-64
DEC  P30 <$str(P40)>
goto @检测怪3
#if
#ACT
;X+64
INC P20 <$str(P40)>
;X-64
DEC P30 <$str(P40)>
goto @检测怪3
#if
#ACT
;X-64
DEC P20 <$str(P40)>
;X+64
INC P30 <$str(P40)>
goto @检测怪3
#if
#ACT
;X+64
INC P20 <$str(P40)>
;X+64
INC P30 <$str(P40)>
goto @检测怪3

[@检测怪3]
#if
CheckRangeMonCountEx JITU 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
sendmsg 7 有3怪X=<$str(P20)>+++Y=<$str(P30)>-----<$str(P40)>
DIV  P40 2
goto @检测3
[@检测3]
#if
#ACT
;X-32
DEC  P20 <$str(P40)>
;X-32
DEC  P30 <$str(P40)>
goto @检测怪4
#if
#ACT
;128+32
INC P20 <$str(P40)>
;384-32
DEC P30 <$str(P40)>
goto @检测怪4
#if
#ACT
;X-32
DEC P20 <$str(P40)>
;X+32
INC P30 <$str(P40)>
goto @检测怪4
#if
#ACT
;X+32
INC P20 <$str(P40)>
;X+32
INC P30 <$str(P40)>
goto @检测怪4

[@检测怪4]
#if
CheckRangeMonCountEx <$MAP> 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
sendmsg 7 有4怪X=<$str(P20)>+++Y=<$str(P30)>----<$str(P40)>
DIV  P40 2
goto @检测4

[@检测4]
#if
#ACT
;X-16
DEC  P20 <$str(P40)>
;X-16
DEC  P30 <$str(P40)>
goto @检测怪5
#if
#ACT
;X+16
INC P20 <$str(P40)>
;X-16
DEC P30 <$str(P40)>
goto @检测怪5
#if
#ACT
;X-16
DEC P20 <$str(P40)>
;X+16
INC P30 <$str(P40)>
goto @检测怪5
#if
#ACT
;X+16
INC P20 <$str(P40)>
;X+16
INC P30 <$str(P40)>
goto @检测怪5

[@检测怪5]
#if
CheckRangeMonCountEx <$MAP> 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
sendmsg 7 有5怪X=<$str(P20)>+++Y=<$str(P30)>---<$str(P40)>
DIV  P40 2
goto @检测5
[@检测5]
#if
#ACT
;X-8
DEC  P20 <$str(P40)>
;X-8
DEC  P30 <$str(P40)>
goto @检测怪6
#if
#ACT
;X+8
INC P20 <$str(P40)>
;X-8
DEC P30 <$str(P40)>
goto @检测怪6
#if
#ACT
;X-8
DEC P20 <$str(P40)>
;X+8
INC P30 <$str(P40)>
goto @检测怪6
#if
#ACT
;X+8
INC P20 <$str(P40)>
;X+8
INC P30 <$str(P40)>
goto @检测怪6
[@检测怪6]
#if
CheckRangeMonCountEx <$MAP> 尸王 <$str(P20)> <$str(P30)> <$str(P40)> = 1
#act
sendmsg 7 有6怪X=<$str(P20)>+++Y=<$str(P30)>-----<$str(P40)>


以前是没办法,现在都是一个命令就解决的事情,何必。 现在是哪个命令啊? 或则哪个大神分享个脚本学习下 checkmapmoninfo 没事多看看更新记录
谢谢。。。我主要想用脚本实现。。。引擎有点老
可以 指定下脚本吗?  引擎有些老 老的话就个更新引擎,老引擎不支持checkmapmoninfo
谢谢版主的回复

最新引擎更新 我UI很多有问题  要改的太多了 我换了这个写法 有些时候正确 有些时间不正常。。。。。不知道为啥

[@main]
#if
#ACT

;初始1024地图切割4份范围

;范围
MOV P3 256

#if
#ACT
MOV P20 256
MOV P30 256
goto @检测怪

#if
#ACT
MOV P20 768
MOV P30 256
goto @检测怪

#if
#ACT
MOV P20 256
MOV P30 756
goto @检测怪

#if
#ACT
MOV P20 768
MOV P30 768
goto @检测怪



[@检测怪]
#if
CheckRangeMonCountEx JITU 尸王 <$str(P20)> <$str(P30)> <$str(P3)> > 0
#act
goto @检测1




[@检测1]
#if
#ACT
DIV P3 2
MOV P21 <$str(P20)>
MOV P31 <$str(P30)>
MOV P41 <$str(P3)>

#if
#ACT
MOV P20 <$str(P21)>
MOV P30 <$str(P31)>
DEC P20 <$str(P41)>
DEC P30 <$str(P41)>
goto @检测怪怪

#if
#ACT
MOV P20 <$str(P21)>
MOV P30 <$str(P31)>
INC P20 <$str(P41)>
DEC P30 <$str(P41)>
MOV P21 <$str(P20)>
MOV P31 <$str(P30)>
goto @检测怪怪

#if
#ACT
MOV P20 <$str(P21)>
MOV P30 <$str(P31)>
DEC P20 <$str(P41)>
INC P30 <$str(P41)>
MOV P21 <$str(P20)>
MOV P31 <$str(P30)>
goto @检测怪怪

#if
#ACT
MOV P20 <$str(P21)>
MOV P30 <$str(P31)>
INC P20 <$str(P41)>
INC P30 <$str(P41)>
MOV P21 <$str(P20)>
MOV P31 <$str(P30)>
goto @检测怪怪



[@检测怪怪]
#if
EQUAL P3 1
#act
sendmsg 6 尸王<$str(P20)>-<$str(P30)>-<$str(P40)>
BREAK

#if
CheckRangeMonCountEx JITU 尸王 <$str(P20)> <$str(P30)> <$str(P3)> > 0
#act
Loopgoto @检测1 10

最好还是更新下,老引擎BUG很多,各种刷
暂时  还没办法升级UI  太老了!  希望大神分享个脚本 或则指点下 求高人指点一下
返回
我要发布
版本互换
代销
链接失效处理