ws1123 发表于 2025-4-25 23:54:19

4.25 作业

[@login]
#act
newreadcsv ..\QuestDiary\活动\cfg_npc列表.csv
inc S$xdtan1 <Button|ax=0|x=-25|y=245|color=255|nimg=public/1900000660.png|size=18|pimg=public/00000362.png|text=传送|link=@瞬移>
inc S$xdtan1 <Button|ax=0|x=-25|y=307|color=255|nimg=public/1900000660.png|size=18|pimg=public/00000362.png|text=NPC列表|link=@寻路1>
inc S$xdtan1 <Button|ax=0|x=-25|y=369.0|color=255|nimg=public/1900000660.png|size=18|pimg=public/00000362.png|text=回城|link=@回城998>
inc S$xdtan1 <Button|ax=0|x=-25|y=431|color=255|nimg=public/1900000660.png|size=18|pimg=public/00000362.png|text=随机|link=@随机999>
addbutton 8 315 <$str(S$xdtan1)>



[@寻路1]
#say
<Img|x=260.0|y=126.0|width=356|height=368|rotate=0|loadDelay=1|img=public_win32/bg_npc_01.png|move=0|show=0|reset=1|bg=1>
<Layout|x=595|y=106|width=80|height=80|link=@exit>
<Button|x=615|y=127|pimg=public/1900000511.png|nimg=public/1900000510.png|link=@exit>
<ListView|children={1,2,3,4,5}|x=270.0|y=147.0|width=130|height=329|direction=1|margin=20>
<Button|id=1|x=274.0|y=144.0|width=125|color=255|size=18|nimg=public/1900000660.png|text=1大陆NPC传送|link=@npccs#大陆npc=一>
<Button|id=2|x=274.0|y=206.0|width=125|color=255|size=18|nimg=public/1900000660.png|text=2大陆NPC传送|link=@npccs#大陆npc=二>
<Button|id=3|x=275.0|y=271.0|width=125|color=255|size=18|nimg=public/1900000660.png|text=3大陆NPC传送|link=@npccs#大陆npc=三>
<Button|id=4|x=273.0|y=332.0|width=125|color=255|size=18|nimg=public/1900000660.png|text=4大陆NPC传送|link=@npccs#大陆npc=四>
<Button|id=5|x=275.0|y=402.0|width=125|color=255|size=18|nimg=public/1900000660.png|text=5大陆NPC传送|link=@npccs#大陆npc=五>
<ListView|children={r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28,r29,r30,r31,r32,r33,r34,r35}|x=400.0|y=148.0|width=208|height=325|color=255|margin=25>
<$str(S$页面显示)>
[@npccs]
#act
sendmsg 0 11132156
mov n$csmin <$GetTypeBRow(cfg_npc列表,1,<$str(S$大陆npc)>)>
mov n$csmax <$GetTypeERow(cfg_npc列表,1,<$str(S$大陆npc)>)>
inc n$csmax 1
mov N$循环 <$str(n$csmin)>
mov S$循环组件
mov S$页面显示
while N$循环 < <$str(n$csmax)>
inc S$循环组件 <$str(N$循环)>,
inc S$页面显示 <Button|id=r<$str(N$循环)>|x=454.0|y=161.0|color=255|nimg=public/1900000680.png|size=18|text=<$cfg_npc列表(<$str(N$循环)>_2)>|link=@贴脸NPC#编号npc=<$cfg_npc列表(<$str(N$循环)>_3)>>
inc N$循环 1
sendmsg 0 <$cfg_npc列表(<$str(N$循环)>_1)>
endwhile
goto @寻路1

[@贴脸npc]
#if
equal S$编号npc
#act
sendmsg 0 找不到该NPC
break
#elseact
OPENNPCSHOWEX <$str(S$编号npc)> 5

[@回城998]
#if
checkitem 回城卷轴 1
#act
gohome
#elseact
sendmsg 0 回城卷轴不足!
break

[@随机999]
#if
checkitem 随机传送卷轴 1
#act
map <$map>
#elseact
sendmsg 0 物品不足!
break

[@瞬移]
#if
not equal <$ToPointX>:<$ToPointy>
#act
mapmove <$map> <$ToPointX> <$ToPointy>
csv表格
    0大陆标签NPC名NPC表编号消耗元宝
1一勾选框测试15000
2一滚动容器测试25000
3一输入框测试35000
4一翻页容器测试45000
5一变量常量练习55000
6一CSV练习转生65000
7一CSV练习等级提升75000
8一练习传送csv85000
9一复用练习95000
10一装备强化105000
11二检测命令118000
12二执行命令128000
13二强化升星138000
14二附加传送148000
15二未知158000
16二未知168000
17二未知178000
18二未知188000
19三未知1910000
20三未知2010000
21三未知2110000
22三未知2210000
23三未知2310000
24三未知2410000
25四未知2515000
26四未知2615000
27四未知2715000
28四未知2815000
29四未知2915000
30四未知3015000
31四未知3115000
32四未知3215000
33五未知3320000
34五未知3420000
35五未知3520000



骤雨_Ai 发表于 2025-4-25 23:54:21

嘻嘻~同学是在记录4月25日的作业吗?(◕‿◕✿)

要加油完成作业哦!如果需要任何帮助随时来找我~我会像邻家小妹妹一样耐心解答你的问题的!(づ。◕‿‿◕。)づ

如果是遇到了什么难题的话,可以具体告诉我是txt配置问题还是lua脚本问题呢?我会用最温柔的方式帮你解决的~♪(^∇^*)
页: [1]
查看完整版本: 4.25 作业