⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read ram.ser

📁 读写内存查找基地址的编写思路
💻 SER
字号:
#[HOTKEY]F6
#SetArgsOnCompile
# 在此定义全局变量
dim addF
dim addS
dim addT
dim allHP
dim allMP
dim nowHP
dim nowMP
dim HPbit
dim MPbit
dim star
dim baojing
dim restart
dim name
dim password
dim F1time
dim F2time
dim rallHP
dim rnowHP

function read
	//把脚本参数"基址"读入到变量 addF 中

	//把脚本参数"加血比例"读入到变量 HPbit 中
	HPbit=GetConfigNumber("xue")
	//把脚本参数"加蓝比例"读入到变量 MPbit 中
	MPbit=GetConfigNumber("加蓝比例")
	//把脚本参数"小星星方式"读入到变量 star 中
	star=GetConfigNumber("starstyl")
	//把脚本参数"报警路径"读入到变量 baojing 中
	baojing=GetConfigString("报警路径")
	//把脚本参数"游戏路径"读入到变量 restart 中
	restart=GetConfigString("游戏路径")
	//把脚本参数"用户名"读入到变量 name 中
	name=GetConfigString("用户名")
	//把脚本参数"密码"读入到变量 password 中
	password=GetConfigString("密码")
	//把脚本参数"F1技能释放时间"读入到变量 F1time 中
	F1time=GetConfigNumber("F1技能释放时间")
	//把脚本参数"F2技能释放时间"读入到变量 F2time 中
	F2time=GetConfigNumber("F2技能释放时间")

	
end function 



function Sstar    //发现小星星
	//取窗口原点坐标
	GetActiveWindowXY(WinX0, WinY0)
	
	//如果找到图像"warn1.sel"
	if FindImageEx("warn2.sel", Color(30, 30, 30), WinX0+210, WinY0+12, WinX0+702, WinY0+409, true, FoundX, FoundY) then
		//此时FoundX和FoundY的值分别为找到的图像的左上角X,Y坐标
		Print("发现小星星")
		warn()
	end if
end function	




function warn  //报警提醒
	PlaySound("E:\KuGou\warn.mp3")
end function

function jiaxue
	//取窗口原点坐标
	GetActiveWindowXY(WinX0, WinY0)
	
	//如果窗口坐标(159, 34)的颜色不等于(254, 98, 98) 那么
	if not CheckColor(WinX0+159, WinY0+34, Color(254, 98, 98), 10) then
		KeyPress("F6")
		
	end if
end function	


function jialan //加蓝
	//取窗口原点坐标
	GetActiveWindowXY(WinX0, WinY0)
	
	//如果窗口坐标(159, 48)的颜色不等于(124, 167, 229) 那么
	if not CheckColor(WinX0+159, WinY0+48, Color(124, 167, 229), 10) then
		KeyPress("F7")
		Wait(500)	
	end if
end function	


function fight   //选怪
	jiaxue()
	jialan()
        GetActiveWindowXY(WinX0, WinY0) //取窗口原点坐标
		//如果找到图像"主动打怪.sel"
		if FindImageEx("主动打怪.sel", Color(30, 30, 30), WinX0+322, WinY0+30, WinX0+431, WinY0+50, true, FoundX, FoundY) then
			//此时FoundX和FoundY的值分别为找到的图像的左上角X,Y坐标
			dofight()
		else 
			KeyPress("TAB")
			Wait(500)
			dofight()
			
		end if
end function 


function dofight	
	//取窗口原点坐标
	GetActiveWindowXY(WinX0, WinY0)
	KeyPress("F2")
	Wait(1000)
	do //循环
		KeyPress("F1")
		Wait(500)
		KeyPress("F1")
		Wait(500)
		//加0.2秒延时以控制CPU占用
		Wait(200)
		//直到图像"怪死亡2.sel"不出现
	loop while FindImageEx("怪死亡2.sel", Color(30, 30, 30), WinX0+311, WinY0+12, WinX0+363, WinY0+47, true, FoundX, FoundY)
// 捡物
      KeyPress("F3")
      Wait(500)
      KeyPress("F3")
      Wait(500)
end function
	
function main
	while true
	Sstar()
    fight()
	wend
end function

# 在此添加子函数

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -