1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-21 22:49:30 +08:00

Merge branch '0O0o0oOoO00-alas/smallkai' into dev

# Conflicts:
#	bin/Lua/ShipChanger.lua
#	bin/Lua/ShipFucker.lua
This commit is contained in:
LA-DI-DA
2023-10-11 22:45:02 +08:00
2 changed files with 10 additions and 8 deletions

View File

@@ -22,7 +22,8 @@ function ChangeShip()
gg.searchNumber(ShipIdList[i]..";"..ShipStarList[i]..";"..ShipTypeIdList[i].."::610", gg.TYPE_DOUBLE)
gg.refineNumber(ShipTypeIdList[i], gg.TYPE_DOUBLE)
local SearchResult = gg.getResults(1024)
if #SearchResult == 0 then
if next(SearchResult) == nil then
gg.clearResults()
gg.searchNumber(ShipIdList[i]..";"..ShipStarList[i]..";"..ShipTypeIdList[i].."::610", gg.TYPE_DWORD)
gg.refineNumber(ShipTypeIdList[i], gg.TYPE_DWORD)
gg.getResults(1024)

View File

@@ -7,7 +7,7 @@ end
-- {Id};{Star};{Type}:{Attribute}>{Target}[;{Attribute}>{Target}...][|{Id};{Star};{Type}:{Attribute}>{Target}[;{Attribute}>{Target}...]]
function ChangeShipAttribute()
local Result = gg.prompt({"格式:{舰船Id};{舰船星级};{类型Id}:{属性}>{目标值}[;{属性}>{目标值}...],多个之间用'|'连接"}
,{}
,{}
,{"text"})
local TargetList = string.split(tostring(Result[1]), "|")
@@ -28,15 +28,15 @@ function ChangeShipAttribute()
local SearchResult = gg.getResults(1024)
if #SearchResult == 0 then
if next(SearchResult) == nil then
gg.searchNumber(ShipData.."::610", gg.TYPE_DWORD)
gg.refineNumber(string.split(ShipData, ";")[1], gg.TYPE_DWORD)
SearchResult = gg.getResults(1024)
end
for j = 1, #SearchResult do
local MemoryFrom = SearchResult[j].address - 0x1000
local MemoryTo = SearchResult[j].address + 0x1000
local MemoryFrom = SearchResult[j].address - 0x800
local MemoryTo = SearchResult[j].address - 0x650
for k = 1, #ShipAttributeList do
-- fuck gg
-- fuck lua
@@ -45,9 +45,11 @@ function ChangeShipAttribute()
local SplitedAttribute = string.split(tostring(ShipAttributeList[k]), ">")
local AttributeToSearchList = SplitedAttribute[1]
local TargetAttributeList = SplitedAttribute[2]
gg.clearResults()
gg.searchNumber(AttributeToSearchList, gg.TYPE_DOUBLE, false, gg.SIGN_EQUAL, MemoryFrom, MemoryTo)
local AttributeResult = gg.getResults(1024)
if #AttributeResult == 0 then
if next(AttributeResult) == nil then
gg.clearResults()
gg.searchNumber(AttributeToSearchList, gg.TYPE_DWORD, false, gg.SIGN_EQUAL, MemoryFrom, MemoryTo)
gg.getResults(1024)
gg.editAll(TargetAttributeList, gg.TYPE_DWORD)
@@ -56,11 +58,10 @@ function ChangeShipAttribute()
end
gg.clearResults()
end
end
end
Exit("修改成功!")
end
end
function Exit(Message)
gg.alert(Message)