GHUB有沒有這種巨集功能阿....

想問一下各位大大
G hub 有巨集有沒有這種功能 我翻來翻去好像沒有這類型的 但LGS是有的
比如說 我按G8這個巨集按紐
第一次按 讓他執行 1234567 這樣的操作
第二次按 我要它執行 2345678
第三次按 我要它執行 3456789
第四次按 我要它執行 1234567 這樣 無限循環
翻來翻去好像沒地方可以這樣設定?
2022-05-13 19:13 發佈
不清楚有沒有人能看懂 這是我在LGS時代的巨集
想放進GHUB內找不到....
Skills = {
skill = "",
backSkill ="",
petKeys = {},
waitSleep = 500
}
function Skills:new(skill,backSkill,petKeys,waitSleep)
local o = {};
setmetatable(o, self);
o.skill = skill;
o.backSkill = backSkill;
o.petKeys = petKeys;
o.waitSleep = waitSleep;
return o;
end


CurrentIds = {
currentSkillIndex = 1,
currentPetIndex = 1,
closeStatus = true
}

function CurrentIds:new(currentSkillIndex,currentPetIndex)
local o = {};
setmetatable(o, self);
o.currentSkillIndex = currentSkillIndex;
o.currentPetIndex = currentPetIndex;
return o
end




G4CurrentIds = CurrentIds:new(1,1)
G4Skills = {
Skills:new("5","1",{"equal"},450),
Skills:new("6","1",{"equal"},450),
Skills:new("7","1",{"minus","equal"},450)

}

G10CurrentIds = CurrentIds:new(1,1)
G10Skills = {
Skills:new("8","1",{"1","2","3","4","0","minus"},800)

}

G6CurrentIds = CurrentIds:new(1,1)
G6Skills = {
Skills:new("7","1",{"1","2","3","4","5","6","7","8","9","0"},350)

}

G8CurrentIds = CurrentIds:new(1,1)
G8Skills = {
Skills:new("5","1",{"1","2","3","4","5","6","7","8","9","0","minus"},450)

}

G7CurrentIds = CurrentIds:new(1,1)
G7Skills = {
Skills:new("6","1",{"1","2","3","4","5","6","7","8","9","0","minus"},450)
}


G5CurrentIds = CurrentIds:new(1,1)
G5Skills = {
Skills:new("8","1",{"5","6","7","8","9"},450),

}

G11CurrentIds = CurrentIds:new(1,1)
G11Skills = {
Skills:new("5","1",{"1","2","3","4","5","6","7","8","9","0","minus"},1800)

}



function OnEvent(event, arg)




if (event == "MOUSE_BUTTON_RELEASED" and arg == 1) then

end

if (event == "MOUSE_BUTTON_RELEASED" and arg ==2) then

end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 3) then

PressKey("f6");
ReleaseKey("f6");
Sleep(100);
PressKey("5");
ReleaseKey("5");
PressKey("2");
ReleaseKey("2");
PressKey("3");
ReleaseKey("3");
PressKey("1");
ReleaseKey("1");
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 8) then

G8CurrentIds=DragonCallNext(G8CurrentIds,G8Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 7) then

G7CurrentIds=DragonCallNext(G7CurrentIds,G7Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 5) then


G5CurrentIds=DragonCallNext(G5CurrentIds,G5Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 4) then

G4CurrentIds=DragonCallNext(G4CurrentIds,G4Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 11) then

G11CurrentIds=GQ(G11CurrentIds,G11Skills,true)

end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 10) then

G10CurrentIds=DragonCallNext(G10CurrentIds,G10Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 9) then

G9CurrentIds=DragonCallNext(G9CurrentIds,G9Skills,true,true)
end

if (event == "MOUSE_BUTTON_RELEASED" and arg == 6) then

G6CurrentIds=DragonCallNext(G6CurrentIds,G6Skills,true,true)
end
end




function DragonCallNext(currentIds,skills,isChange2,isColse)



if (currentIds.closeStatus == false) then

PressKey("backslash");
ReleaseKey("backslash");

currentIds.closeStatus = true
else

skill = skills[currentIds.currentSkillIndex];
pets = skill.petKeys;
pet = pets[currentIds.currentPetIndex];



PressKey("backslash");
ReleaseKey("backslash");

if(skill.skill == "1" or skill.skill == "5" or skill.skill == "6"or skill.skill == "7"or skill.skill == "8") then
PressKey("lctrl");
PressKey(skill.skill);
ReleaseKey("lctrl");
ReleaseKey(skill.skill);
else
PressKey(skill.skill);
ReleaseKey(skill.skill);
end


Sleep(50)
PressKey(pet);
ReleaseKey(pet);


PressKey("lctrl");
PressKey(skill.backSkill);

ReleaseKey("lctrl");
ReleaseKey(skill.backSkill);

if(isChange2 == false) then
PressKey("lctrl");
PressKey("tilde");
ReleaseKey("lctrl");
ReleaseKey("tilde");
end

Sleep(skill.waitSleep)



if(isColse == true) then
PressKey("backslash");
ReleaseKey("backslash");

else

currentIds.closeStatus = false

end
Sleep(300)

if(currentIds.currentPetIndex < #pets) then
currentIds.currentPetIndex = currentIds.currentPetIndex + 1;

else
currentIds.currentSkillIndex = currentIds.currentSkillIndex + 1;

currentIds.currentPetIndex = 1;
end
if(currentIds.currentSkillIndex > #skills) then

currentIds.currentSkillIndex = 1;

currentIds.currentPetIndex = 1;
end
end

return currentIds;
end



function GQ(currentIds,skills,isChange2)
skill = skills[currentIds.currentSkillIndex];
pets = skill.petKeys;
pet = pets[currentIds.currentPetIndex];


PressKey("backslash");
ReleaseKey("backslash");

if(isChange2 == false) then
PressKey("lctrl");
PressKey("tilde");
ReleaseKey("lctrl");
ReleaseKey("tilde");
end

if(skill.skill == "5" or skill.skill == "1") then
PressKey("lctrl");
PressKey(skill.skill);
ReleaseKey("lctrl");
ReleaseKey(skill.skill);
else
PressKey(skill.skill);
ReleaseKey(skill.skill);
end


PressKey(pet);
ReleaseKey(pet);
Sleep(100)

PressKey("lctrl");
PressKey(skill.backSkill);
ReleaseKey("lctrl");
ReleaseKey(skill.backSkill);

if(isChange2 == false) then
PressKey("lctrl");
PressKey("tilde");
ReleaseKey("lctrl");
ReleaseKey("tilde");
end


Sleep(900);
PressKey("n");
ReleaseKey("n");
Sleep(1500);
PressKey("n");
Sleep(900);
ReleaseKey("n");

Sleep(300);
PressKey("backslash");
ReleaseKey("backslash");

if(currentIds.currentPetIndex < #pets) then
currentIds.currentPetIndex = currentIds.currentPetIndex + 1;
else
currentIds.currentSkillIndex = currentIds.currentSkillIndex + 1;
currentIds.currentPetIndex = 1;
end
if(currentIds.currentSkillIndex > #skills) then
currentIds.currentSkillIndex = 1;
currentIds.currentPetIndex = 1;
end
return currentIds;
end
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?