function check_buff(targ,buffs,spell_recasts,recast)
local buff_list = get.buff_list (buff,targ,basebuff)
local basebuff = get.basebuff (targ,buffs)
for k,buff in ipairs(settings.buff) do
if base_buff >= k and timers[targ] and table.length(timers[targ]) == basebuff and spell_recasts[get.buff(buff).id] <= 0 then
no file 'C:/Windower4//addons//GearSwap/socketcore.lua'
no file 'C:/Windower4//addons/libs/socketcore.lua'
no file './socketcore.dll'
no file 'C:/Windower4//plugins/libs/socketcore.dll'
no file './socket.dll'
no file 'C:Windower4//plugins/libs/socket.dll'
あとこれもか
function decode.Augmented(str)
local flag_2 = str:byte(2)
local rettab = {type = 'Augmented Equipment'}
if flag_2%128/64>= 1 then
rettab.trial_number = (str:byte(12)%128)*256+str:byte(11)
rettab.trial_complete = str:byte(12)/128>=1
end
----- old ----------------
local function fetch_ingredient(ingredient)
local id, name
if exceptions[ingredient] then
id = exceptions[ingredient]
else
item = res.items:name(ingredient)
----- new ----------------
local function fetch_ingredient(ingredient)
半数文字だけだとダメって言われた
local id, name
if exceptions[ingredient] then
id = exceptions[ingredient]
else
item = res.items:enl(ingredient)
id, name = next(item, nil)
if id == nil then
item = res.items:en(ingredient)
id, name = next(item, nil)
end
end
if clusters[ingredient] then
local cluster = clusters[ingredient]
local cluster_id, cluster_index = fetch_ingredient(cluster)
local searchc = res.items:enl(cluster)
local idc, namec = next(searchc, nil)
if idc == nil then
searchc = res.items:en(cluster)
idc, namec = next(searchc, nil)
end
if cluster_index and idc then
conditions['sort'] = true
conditions['item'] = id
local start = os.time()
windower.chat.input(windower.to_shift_jis('/item \"%s\" <me>':format(namec.ja)))
local function handle_make(item, count)の前に追加で
function split(msg, match)
if msg == nil then return '' end
local length = msg:len()
local splitarr = {}
local u = 1
while u <= length do
local nextanch = msg:find(match,u)
if nextanch ~= nil then
splitarr[#splitarr+1] = msg:sub(u,nextanch-match:len())
if nextanch~=length then
u = nextanch+match:len()
else
u = length
end
else
splitarr[#splitarr+1] = msg:sub(u,length)
u = length+1
end
end
return splitarr
end
local count = count or 1
local n = tonumber(count)
if n == nil then
return "Invalid count %s":format(count)
end
item = windower.from_shift_jis(item)
local itemmsg = item
local itemspt = split(itemmsg, ' ')
local length = #itemspt
local type = nil
if length > 1 then
item = ""
for i = 1, length - 1 do
item = item .. itemspt[i]
end
type = tonumber(itemspt[length])
if type == nil then
item = item .. itemspt[length]
end
end
local search = res.items:ja(item)
local id, name = next(search, nil)
if id then
item = name.enl
end
if type then
item = item .. " " .. type
end
local recipe = fetch_recipe(item)
if not recipe then
item = name.en
if type then
item = item .. " " .. type
end
local recipe = fetch_recipe(item)
if not recipe then
return "No recipe for %s":format(item)
end
end
あああ
local function handle_food(item)
if not item then
notice("Setting auto food to None")
food = false
else
item = windower.from_shift_jis(item)
local search = res.items:ja(item)
local id, name = next(search, nil)
if id then
notice("Setting auto food to %s":format(name.ja))
food = name.enl
foodja = name.ja
else
return "Invalid food %s":format(item)
end
end
end
FFAHのIt's that time again! スレ見ててなんでSendが怪しいとかマルチボクシングと連呼されてるのかと思ったら
去年の11月3日にWorld of Warcraftでマルチボクシングの補助ソフトウェアの利用を禁止されることになってて
11でも同様に処罰対象になってるかも?って事なのかなこれ
177行付近にある
local zone = res.zones[windower.ffxi.get_info().zone].name
の最後のnameをenに変更し
local zone = res.zones[windower.ffxi.get_info().zone].en
にするだけでOKです
function get_action_id(targets)
for i,v in pairs(targets) do
for i2,v2 in pairs(v['actions']) do
if v2['param'] then
return v2['param']
end
end
end
end
windower.register_event('action', function(act)
local mob_info = windower.ffxi.get_mob_by_id(act.actor_id)
if (act['category'] == 7) then
local action_id = get_action_id(act['targets'])
local mob_ab1_id = mob_ab1[action_id]
if mob_ab1_id then
local message = windower.to_shift_jis("SPアビリティ-->にげろ〜------------")
windower.add_to_chat(5, message)
end
end
end)
把握しました。ありがとうございました
ttps://github.com/Windower/Lua/blob/live/addons/InfoBar/InfoBar.lua
の
local pos = windower.ffxi.get_mob_by_target('st') or windower.ffxi.get_mob_by_target('t') or windower.ffxi.get_mob_by_target('me')
magicreplace で attempt to perform arithmetic on a nil value のエラーで動かない場合ですが、
ChatGPTに聞いたら教えてくれた。
command:find(magicname,1,1)を
command:find(magicname,1,true)に変更。
if command:len() > command:find(magicname,1,true) + magicname:len() then
target = command:gsub(" "," "):sub( command:find(" ",command:find(magicname,1,true) +magicname:len() )+1,100 ) ;
print(target)
end
if ( target:gsub(" ","") == "" ) then --Targetがない場合は<me>にする
target = "<me>"
end
--ここから改造します
local target_id = tonumber(target)
if target_id then
if test_flag then windower.add_to_chat(5," 80 MagicReplace Test TARGET INT "..target) end
local act = nil ;
if L{"/ma ","/magic ","/song "}:contains(comprefix) then act = res.spells:with('english',magicname) ;
elseif L{"/ws ","/weaponskill "}:contains(comprefix) then act = res.weapon_skills:with('english',magicname) ;
elseif L{"/ja ","/jobability ","/pet "}:contains(comprefix) then act = res.job_abilities:with('english',magicname) ;
elseif L{"/nin ","/ninjutsu "}:contains(comprefix) then act = res.spells:with('english',magicname) ;
elseif comprefix == "/item " then act = res.items:with('english',magicname) ;
end
local act_name = ""
if act == nil then act_name = magicname
else act_name = windower.to_shift_jis(act.ja)
end
local target_strings = ""
local my_self = windower.ffxi.get_mob_by_target('me')
local my_party = windower.ffxi.get_party()
local my_is_party = false
--続き2
if target_id == my_self.id then target_strings = '<me>'
else
if my_party.p1 ~= nil then
local my_player = windower.ffxi.get_mob_by_name(my_party.p1.name)
if my_player.id == target_id then
my_is_party = true
target_strings = my_player.name
end
end
if my_party.p2 ~= nil then
local my_player = windower.ffxi.get_mob_by_name(my_party.p2.name)
if my_player.id == target_id then
my_is_party = true
target_strings = my_player.name
end
end
if my_party.p3 ~= nil then
local my_player = windower.ffxi.get_mob_by_name(my_party.p3.name)
if my_player.id == target_id then
my_is_party = true
target_strings = my_player.name
end
end
--続き3
if my_party.p4 ~= nil then
local my_player = windower.ffxi.get_mob_by_name(my_party.p4.name)
if my_player.id == target_id then
my_is_party = true
target_strings = my_player.name
end
end
if my_party.p5 ~= nil then
local my_player = windower.ffxi.get_mob_by_name(my_party.p5.name)
if my_player.id == target_id then
my_is_party = true
target_strings = my_player.name
end
end
if my_is_party then
--target_strings is party member name
else
local target_mob = windower.ffxi.get_mob_by_target('t')
if target_mob then
if target_mob.id == target_id then
target_strings = '<t>'
end
else
--??
end
end