电脑显示语义错误:脚本 '我的脚本3',第0行:没有找到库文件C:\Users\19470\AppData\Local\Temp\Lib\大漠插件后台设置.QML。错误附加码=2951。如何修改源代码?
电脑显示语义错误:脚本 '我的脚本3',第0行:没有找到库文件C:\Users\19470\AppData\Local\Temp\Lib\大漠插件后台设置.QML。错误附加码=2951。这个错误通常意味着你的脚本无法找到大漠插件的库文件。以下步骤可以帮助你解决这个问题:
- 确认大漠插件是否安装正确: 首先,确保你已经正确安装了大漠插件,并且安装路径正确。
- 检查脚本路径: 确保你的脚本代码中引用的库文件路径正确,应该与你安装大漠插件的实际路径一致。
- 添加库文件到系统环境变量: 可以尝试将大漠插件的库文件所在的路径添加到系统环境变量中,这样脚本就可以找到它。
修改后的代码如下:
Set dm = createobject("dm.dmsoft")
UserVar searchhwnd='风の牙' '角色ID或者名字,记得引号保留'
HwndEx = Plugin.Window.Search(searchhwnd)
dim MyArray
MyArray = Split(HwndEx, "|")
Hwnd = Clng(MyArray(0))//句柄
Call Plugin.Window.Active(Hwnd)
blind = Lib.大漠插件后台设置.BindWindow(Hwnd, "dx", "dx", "dx", 0)//大漠插件绑定窗口
Delay 2000
///////////////////////////////////////////////////////////////////////////////////////////////
base = &H0084e098
zt = &H0016C440
py1 = &H848//血偏移
py2 = &H84C//蓝偏移
py3 = &H850 //FP偏移
basevalue = Plugin.Memory.Read32Bit(Hwnd, base)
UserVar hp1=1200 '当HP<多少时,使用红药'
UserVar mp1=150 '当MP<多少时,使用蓝药'
UserVar fp1=120 '当FP<多少时,使用FP'
UserVar t2=60 '卡主多久后重新选怪,60=30秒,建议60'
UserVar monster=DropList{"风":1|"水":2|"土":3|"火":4|"雷":5}=0 '打怪物属性'
If monster = 1 Then
S = "73cea8"
ElseIf monster = 2 Then
S = "c7c5e9"
ElseIf monster = 3 Then
S = "b5b39f"
ElseIf monster = 4 Then
S = "f9b5af"
ElseIf monster = 5 Then
S = "f0e992"
End If
Delay 100
UserVar fanwei=DropList{"小50":1|"中70":2|"大90":3}=0 '寻怪范围'
If fanwei = 1 Then
pox1 = 69
poy1 = 86
pox2 = 119
poy2 = 136
ElseIf fanwei = 2 Then
pox1 = 59
poy1 = 76
pox2 = 129
poy2 = 146
ElseIf fanwei = 3 Then
pox1 = 49
poy1 = 66
pox2 = 139
poy2 = 156
End If
///////////////////////////////////////////////////////////////////////////////////////////////
Delay 100
While 1 > 0
///////////////////////////////////////////////////////////////////////////////////////////////
M = GetLastKey()
If M = 33 Then
Call Plugin.Window.Move(Hwnd, 0, 0)
ElseIf M = 34 Then
Call Plugin.Window.Move(Hwnd, 2000, 2000)
End If
Delay 50
hp = Plugin.Memory.Read32Bit(Hwnd, basevalue + py1)
If hp = 0 Then
MessageBox "死了" & searchhwnd
Delay 100
Call Plugin.Window.Move(Hwnd, 0, 0)
Delay 100
EndScript
End If
//////////////////////////////////////////////////////////////////////////////////////////////
pos = dm.FindColorE(pox1, poy1, pox2, poy2, "FFFAA5-000000|FFFC9E-000000|FFCB55-000000|FF8A03-000000|FF6601-000000|FFFAA4-000000|FFFC9F-000000|", 1.0, 4)//在小地图中找到怪并返回位置信息
pos = split(pos, "|")
x = int(pos(0))
y = int(pos(1))
m1 = dm.MoveTo(x, y)
Delay 50
c1 = dm.Leftclick()//鼠标点击小地图的怪
Delay 100
zhuangtai = Plugin.Memory.Read32Bit(Hwnd, zt)//选定状态
yanshe = dm.GetColor(620, 5)//查看顶端颜色是不是五行属性
Delay 50
cishu = 0//计数器开始
//////////////////////////////////////////////////////////////////////////////////////////////
Do While zhuangtai = 88 and yanshe = S
If cishu = t2 Then //当选中了目标但是攻击不到时候循环到25次按ESC
esc1=dm.KeyPress(27)
Delay 100
W1 = dm.KeyDown(87)
Delay 1500
space1 = dm.KeyPress(32)
Delay 1500
space2 = dm.KeyPress(32)
Delay 1500
W2=dm.Keyup(87)
Delay 50
End If
Delay 50
//////////////////////////////////////////////////////////////////////////////////////////////
zhangai1 = dm.GetColor(651, 572)//因为障碍物阻挡无法攻击(3,25)
zhangai2 = dm.GetColor(651, 647)//因为障碍物阻挡无法攻击
bieren1 = dm.GetColor(616, 572)//别人的怪616,572
bieren2 = dm.GetColor(614, 647)//别人的怪614,647
If zhangai1 = "ff0000" and zhangai2 = "ff0000" Then
Delay 100
D1=dm.KeyPress(68)
Delay 100
D2=dm.KeyPress(68)
Delay 100
D3=dm.KeyPress(68)
Delay 100
D4=dm.KeyPress(68)
Delay 100
D5=dm.KeyPress(68)
Delay 100
D6=dm.KeyPress(68)
Delay 100
W1 = dm.KeyDown(87)
Delay 1500
W1=dm.Keyup(87)
Delay 100
F1 = dm.KeyPress(112)
Delay 100
ElseIf bieren1 = "ff0000" and bieren2 = "ff0000" Then
Esc = dm.KeyPress(27)
Delay 1500
Else
F2=dm.KeyPress(112)//没有就攻击
Delay 50
End If
Delay 50
//////////////////////////////////////////////////////////////////////////////////////////////
hp = Plugin.Memory.Read32Bit(Hwnd, basevalue + py1)
hp = int(hp)
If hp<hp1 and hp >0 Then // HP小于750按F5加血,750可以自己修改
F5 = dm.KeyPress(116)
ElseIf hp = 0 Then
MessageBox "死了" & searchhwnd
Delay 100
Call Plugin.Window.Move(Hwnd, 0, 0)
Delay 100
EndScript
End If
Delay 50
mp = Plugin.Memory.Read32Bit(Hwnd, basevalue + py2)
mp = int(mp)
If mp<mp1 Then
F6=dm.KeyPress(117)//F6加蓝
End If
Delay 50
fp = Plugin.Memory.Read32Bit(Hwnd, basevalue + py3)
fp = int(fp)
If fp < fp1 Then
F7 = dm.KeyPress(118)
End If
Delay 50
//////////////////////////////////////////////////////////////////////////////////////////////
M = GetLastKey()
If M = 33 Then
Call Plugin.Window.Move(Hwnd, 0, 0)
ElseIf M = 34 Then
Call Plugin.Window.Move(Hwnd, 2000, 2000)
End If
Delay 50
zhuangtai = Plugin.Memory.Read32Bit(Hwnd, zt)
yanshe = dm.GetColor(620,5)
Delay 100
//////////////////////////////////////////////////////////////////////////////////////////////
cishu = cishu + 1//计数器+1
Loop
Wend
Sub OnScriptExit()
Call Plugin.Window.Move(Hwnd, 0, 0)
End Sub
注意:
- 请将代码中的库文件路径替换为你的实际安装路径。
- 如果你仍然遇到问题,请在评论区留言,我们会尽力帮助你。
希望这篇文章能够帮助你解决电脑显示语义错误的问题。
原文地址: https://www.cveoy.top/t/topic/oZzF 著作权归作者所有。请勿转载和采集!