-------------------------------------------------- -- ホムンクルス用βライブラリ -- BBlib2.lua -------------------------------------------------- -- yes -> 1 no -> 0 --[[ V_HOMUNTYPE = 7 -- ホムンクルスの種類 -- playerjobdata.lua function IsPlayer (id) -- idはプレイヤーキャラか? yes -> 1 no -> 0 -- BBlib.lua ISPLANT = {[1555]=1,[1575]=1,[1579]=1,[1589]=1,[1590]=1} function IsPlant (id) -- idはバイオプラントmobか? yes -> 1 no -> 0 --]] -- IsMonster (id): C言語関数, default AI Const.lua -- mobdata.lua 2006/07/20, 1001 - 1721: idがモンスターの範囲 -- from Glenelg Util.lua function IsNPC (id) -- idはNPCか? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if (45 <= Ty and Ty <= 125) then return 1 elseif (700 <= Ty and Ty <= 999) then return 1 else return 0 end end -- from Glenelg Util.lua function IsPet (id) -- idはペットか? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if (IsMonster(id) == 0 and 1001 <= Ty and Ty <= 1721) then return 1 else return 0 end end -- from Glenelg Util.lua function IsHomunclus (id)-- idはホムンクルスか? -- 0 - 65535でなければホムではない from アルケミテンプレ if not(0 < id and id <= 65535) then return 0 end -- id値域からは、ホムの可能性あり。 -- より具体的にそうであることを確認。 -- ・・・なんだけど、視界外に行ってしまうと、もう保障できないみたい。 -- しかたないので、タイプチェックは削除。 -- TraceAI(string.format("Type(%d), Mons(%d)", type, IsMonster(id) )) --local type = GetV( V_HOMUNTYPE, id ) -- if( type >= 1 and type <= 16 and IsMonster(id) == 0 )then if (IsMonster(id) == 0) then return 1 else return 0 end end function IsMarineSphere (id) -- idはマリンスフィアーか? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if (Ty ~= 1142) then return 1 else return 0 end end -- 1579: BPLv1 ヒドラ, 1589: BPLv2 マンドラゴラ -- 1575: BPLv3 フローラ, 1555: BPLv4 フェアリーフ -- 1590: BPLv5 ジオグラファー ISBIOPLANT = {[1579]=1,[1589]=1,[1575]=1,[1555]=1,[1590]=1} function IsBioPlant (id) -- idはバイオプラントmobか? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if ISBIOPLANT[Ty] then return 1 else return 0 end end -- 1078: 赤い草, 1079: 青い草, 1080: 緑色草 -- 1081: 黄色草, 1082: 白い草, 1083: 輝く草 function IsGrass(id) -- idは草か? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if (1078 <= Ty and Ty <= 1083) then return 1 else return 0 end end -- 1084: 黒いきのこ, 1085: 赤いきのこ function IsSpore (id) -- idはきのこか? if (id > 100000) then return 0 end -- idがプレイヤーの範囲 local Ty = GetV(7,id) if (1084 <= Ty and Ty <= 1085) then return 1 else return 0 end end