超级玩家
 
- 贡献度
- 0
- 金元
- 7390
- 积分
- 739
- 精华
- 0
- 注册时间
- 2010-5-8
|
1.游戏中加载 FIFER补丁中的阵容SquadsFIFER'sFC26RealismMod1.0Beta3
2.在游戏主界面中执行LE的lua脚本
3.经理模式重新开档就能搜到传奇球员了,比如大罗、小罗
4.没改年龄
local TARGET_LEAGUE_ID = 2255 --传奇球员都在这个联赛 一共195个
local NEW_TEAM_ID = 111592
Log("[Step1] Load leagueteamlinks, collect target teams")
local leagueTeamTable = LE.db:GetTable("leagueteamlinks")
local leagueRec = leagueTeamTable:GetFirstRecord()
local targetTeamSet = {}
while leagueRec > 0 do
local lid = leagueTeamTable:GetRecordFieldValue(leagueRec, "leagueid")
local tid = leagueTeamTable:GetRecordFieldValue(leagueRec, "teamid")
if lid == TARGET_LEAGUE_ID then
targetTeamSet[tid] = true
end
leagueRec = leagueTeamTable:GetNextValidRecord()
end
-- 统计球队数量
local teamCount = 0
for _ in pairs(targetTeamSet) do
teamCount = teamCount + 1
end
Log(string.format("League %d matched teams: %d", TARGET_LEAGUE_ID, teamCount))
if teamCount == 0 then
Log("Stop: no teams found")
return
end
Log("[Step2] Scan teamplayerlinks, modify first match per player")
local teamPlayerTable = LE.db:GetTable("teamplayerlinks")
local tpRec = teamPlayerTable:GetFirstRecord()
local processedPlayer = {} -- 标记已经修改过的球员ID
local modifyCount = 0
while tpRec > 0 do
local tid = teamPlayerTable:GetRecordFieldValue(tpRec, "teamid")
local pid = teamPlayerTable:GetRecordFieldValue(tpRec, "playerid")
if targetTeamSet[tid] and not processedPlayer[pid] then
Log(string.format("[PREVIEW] Player %d | OldTeam %d → NewTeam %d", pid, tid, NEW_TEAM_ID))
processedPlayer[pid] = true
modifyCount = modifyCount + 1
end
tpRec = teamPlayerTable:GetNextValidRecord()
end
Log(string.format("Preview finished, pending modify rows: %d", modifyCount))
Log("Verify log, then enable write logic below!")
processedPlayer = {}
modifyCount = 0
tpRec = teamPlayerTable:GetFirstRecord()
while tpRec > 0 do
local tid = teamPlayerTable:GetRecordFieldValue(tpRec, "teamid")
local pid = teamPlayerTable:GetRecordFieldValue(tpRec, "playerid")
if targetTeamSet[tid] and not processedPlayer[pid] then
teamPlayerTable:SetRecordFieldValue(tpRec, "teamid", NEW_TEAM_ID)
processedPlayer[pid] = true
modifyCount = modifyCount + 1
Log(string.format("UPDATED: Player %d | %d → %d", pid, tid, NEW_TEAM_ID))
end
tpRec = teamPlayerTable:GetNextValidRecord()
end
Log(string.format("Script complete, total modified records: %d", modifyCount))
|
|