游戏地址
MSsboSxA www.fgcq996.com p]IF=~b 那年传奇百区1.76 i!jxjP )CEfG 找到 lua_State 然后调用下面的函数就能实现功能
lcyan 一个跑单狗注意qq1946913194
@/XA*9]l 游戏账号密码。fanren9527 qq2293307009 [,$] %|6wt b6Dve] 搞完演示完,删除好友跑单 X8p-VCkV BPe5c :z --自动寻路Ex
T/uj5pMG function API_AutoMoveEx(mapX, mapY)
V%
psaT=)P ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
|%we@
E local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
PJS\> N&u local pathPoints = inputProxy:GetPathFindPoints()
d\D.l^ if pathPoints == nil then
<<Ut@243\ return 0
ti3T?_ end
g!cTG-bh>J return #pathPoints
i5q
VQo end
(wnkdI{ LEWeybT --自动寻路
591Syyy function API_AutoMove(mapX, mapY)
GR Rv0M ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
Hj$JXo[U local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
jL>IX`,+6 local pathPoints = inputProxy:GetPathFindPoints()
8(7DW
|\ if pathPoints == nil then
%fo +Y+t return 0
tLJ"] D1w end
9}jF]P*Q return #pathPoints
+A3@{2 end
q:+,'&<D ; Sq_DP1W --停止寻路
OT&J OTk\ function API_AutoMoveEnd()
vc5g4ud global.Facade:sendNotification(global.NoticeTable.AutoMoveEnd)
E9YR *P4$ end
@|i
dlIey xP
"7B9B --自动打怪
a9` E&Q}z function API_AutoFight(isAFK)
-:dUD1 if isAFK then
6ix8P;;}# if not IsAFKState() then
nYLq%7}k global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 1)
L"P$LEk global.Facade:sendNotification(global.NoticeTable.AFKBegin)
g%Sl+gWdJ end
7q^osOj" else
d.3-@^P if IsAFKState() then
?ep93:j global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 2)
S{7A3
x'B global.Facade:sendNotification(global.NoticeTable.AFKEnd)
n0:'h}^ end
8lg$] end
B{PI&a9~s% end
#Huvn4x ,dLh`t<\ function IsAFKState()
sjvlnnO local AutoProxy = global.Facade:retrieveProxy(global.ProxyTable.Auto)
J
JPU! return AutoProxy:IsAFKState()
%l(qyH)* end
{.K>9#^m |^[]Oy= --打开自动穿戴
*?VbN}g2 function API_AutoDress()
#;#
V1 --不抢别人归属
odD^xg"L
global.MMO.SETTING_IDX_NO_ATTACK_HAVE_BELONG =1
mw-0n global.MMO.SETTING_IDX_AUTO_PUT_IN_EQUIP = 1
#qtAFIm' local ServerOptionsProxy = global.Facade:retrieveProxy(global.ProxyTable.ServerOptionsProxy)
$0~H~- ServerOptionsProxy._data["autoDress"] = 1
xlZ"F global.ConstantConfig.autousetimes = 0
!-_0I:m end
k^:)|Z ^y]CHr --强制打开自动挂机拾取
$h"tg9L^) function API_AutoPick()
3pl/kT.\ local ItemConfigProxy = global.Facade:retrieveProxy(global.ProxyTable.ItemConfigProxy)
?|s1Cuc local config = ItemConfigProxy.config
g[!t@K for k, v in pairs(config) do
]v{f!r=} --local res = string.gsub(v.pickset, "0", "1")
p
'M5]G v.pickset = v.pickset .. 1
,`ST Va- end
]Nz~4ebB end
/GD4GWv : PbvRh~n --获取人物坐标
)
wtVFG function API_GetMapXY()
y1G Vn o return ssr.GetMainPlayerMapPos()
0&}
"!) end
yl0&|Ub M_<O'Ii3 --获取人物状态
33z)F function API_GetAction()
]d=SkOq local player = global.gamePlayerController:GetMainPlayer()
XCc/\ local list = global.playerManager.mPlayersInCurrViewField
~ODm?k return player:GetAction()
f 0A0uU8y end
]h3<r8D_# *7u~` --设置宠物状态
jCa%(2~iQ7 function API_PetSleep(isSleep)
}RowAGWL local SummonsProxy = global.Facade:retrieveProxy(global.ProxyTable.SummonsProxy)
F[BJhN*]a if not SummonsProxy:IsAlived() then
,u8)g;8s return false
;}"_hLX end
-!f)P=S if isSleep then
(A|Gb2 X SummonsProxy:RequestModeChange(2)
yV,ki^
^ else
|2z?8lx SummonsProxy:RequestModeChange(4)
r BQFC4L end
$hZb<Xz end
z-$ bce9* $O9Nprf --获取人物数据
^1^k< function API_GetGamePlayer()
e[.c^Hw local player = global.gamePlayerController:GetMainPlayer()
kclClB:PS local list = global.playerManager.mPlayersInCurrViewField
r9McCebIW local person = {}
KCu @5`p person["等级"] = player:GetLevel()
e33 j&:O person["职业"] = player:GetJobID()
? FGz
w person["名字"] = player:GetName()
SR7$m<0t* person["金币"] = ssr.GetMoneyCountById(1)
^x-vOGlR person["元宝"] = ssr.GetMoneyCountById(2)
Y_tLSOD#/ person["绑金"] = ssr.GetMoneyCountById(3)
@*P$4c return person
(99P9\[p end
+LuGjDn0 ?^t"tY function API_GetGamePlayerLevel()
:
34]}`- local player = global.gamePlayerController:GetMainPlayer()
~47Bbom return player:GetLevel()
v10p]=HmO end
$<cio
X #RT} -H --获取周围怪物
g`I`q3EF) function API_GetMonster()
(hWr!(>C4] local list = global.monsterManager.mMonstersInCurrViewField
Fr_esx local actors = {}
ARvT for k, v in pairs(list) do
bL
soKe local actor = {}
sLrSi actor["mID"] = v:GetID()
o=@0Bd8 actor["mName"] = v:GetName()
&/R`\(hEA actor["mRace"] = v:GetRace()
{\3k(NdEX actor["mType"] = v:GetType()
ky>0
actor["mSubType"] = v:GetSubType()
;43Ye
^= actor["mX"] = v:GetMapX()
exT
O#*o actor["mY"] = v:GetMapY()
mO<sw actor["mAction"] = v:GetAction()
g S xK9P actor["mTypeIndex"] = v:GetTypeIndex()
d*Q:[RUf, actor["mAnimationID"] = v:GetAnimationID()
{5w'.Z]0v actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
k`FCyO
actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
golr,+LSo actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
C%_^0#8-0 actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
O_^O1 actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
29]-s Utqv actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
[-C-+jC actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
&9X`tCnL actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
V;0{o actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
GO0Spf_Gh actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
kzU
;24"K actor["mColor"] = "0xFFFFFF"
HEdOo~/~ if v:GetType() == global.MMO.ACTOR_PLAYER then
\9k$pC+l local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
j}$dYbf$ local label_name = global.MMO.HUD_LABEL_NAME
b Lag&c) local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
8fA9yQ8 if hudName then
l,AK actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
*qdf?'R end
O92a*) end
k.=67L table.insert(actors, actor);
<q|IP_ end
5y-8_)y8o e[_W( v return actors
x}Qet4vV end
\)Jv4U\; #!V
[(/ --遍历周围玩家
rw_T&>! function API_GetPlayer()
E)z[@Np local list = global.playerManager.mPlayersInCurrViewField
hpp>+= local actors = {}
:a$ZYyD for k, v in pairs(list) do
7LMad
% local actor = {}
h<;kj#qbb actor["mID"] = v:GetID()
tTrUVuZ actor["mName"] = v:GetName()
`~|8eKFq! actor["mRace"] = v:GetRace()
uX_A4ht* actor["mType"] = v:GetType()
Cx$C+ actor["mSubType"] = v:GetSubType()
)#ze actor["mX"] = v:GetMapX()
)P4#P2 actor["mY"] = v:GetMapY()
AdBF$nn[ actor["mAction"] = v:GetAction()
`.>5H\w0e actor["mTypeIndex"] = v:GetTypeIndex()
+bK[3KG4F5 actor["mAnimationID"] = v:GetAnimationID()
eBi
P\ actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
EGMj5@> actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
KQ'fp:5|/@ actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
gNkx]bm actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
F%QZe*m[ actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
.s$#: ls? actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
<K4`GT"n actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
09?n5x!6 actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
$__e7 actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
&X0/7)*
"v actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
5<Mht6"H actor["mColor"] = "0xFFFFFF"
_|%pe]St if v:GetType() == global.MMO.ACTOR_PLAYER then
#:Z"V8n' local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
Z-[nHSf local label_name = global.MMO.HUD_LABEL_NAME
VesW7m*z local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
N_S>%Z+ if hudName then
QYDTb=h~ actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
63:0Vt>hZ^ end
[XFZ2
'OO end
N}{CL(xi table.insert(actors, actor);
_YF~DU end
BOqq=WY return actors
&We1i&w end
ONQp-$ G"!YV#
"~ --遍历周围玩家EX
?3
J function API_GetPlayerExe()
bm1+|gssn local s1 = API_GetPlayer()
cGSoAK local result = ""
=w&%29BYq for k, v in pairs(s1) do
il^SGH local s2 = string.format(
_i [.5 "mID=%s,mName=%s,mRace=%s,Dura=%s,mType=%s,mSubType=%s,mX=%s,mY=%s,mAction=%s,mTypeIndex=%s,mAnimationID=%s,"
: sIZ+3 , v["mID"]
d5<@WI:wz , v["mName"]
i(.c<e{v~ , v["mRace"]
xTQV?g
J , v["Dura"]
K@xp
! , v["mType"]
{m5tgVi& , v["mSubType"]
wqDRFZ1*P , v["mX"]
6S?a57;&W , v["mY"]
E:BEQ:(~L , v["mAction"]
Yh/-6wg , v["mTypeIndex"]
#sit8k`GR8 , v["mAnimationID"])
w7\:S>;(O" local s3 = ""
KLBV(`MS local s3 = string.format("mLv=%s,mSx=%s,mJD=%s,mHP=%s,mHPx=%s,mMP=%s,mMPx=%s,mOID=%s,OwN=%s,mGld=%s,mCor=%s"
{#M=gDhbX , v["mLv"]
qmUq9bV , v["mJobID"]
_@D}2 , v["mHP"]
L^PZ\OC , v["mHPMax"]
uYjJDLYoHl , v["mMP"]
:@g@jcbYq` , v["mMPMax"]
(?-5p; , v["mOwnerID"]
[;B_ENV , v["mOwnerName"]
8OC5L1 , v["mGuildName"]
m'1NZV%# , v["mColor"])
Y{y #us1 result = result .. s2 .. s3 .. "\r\n"
,-u | l end
.K^'Q|?
return result
01I5,Dm end
Y+N^_2@+C r$ue1bH}| --遍历周围指定NPC
QC>I<j&`! function API_GetNpcIdByName(npcName)
CaNZScnZ local npcVec = global.npcManager:FindNpcInCurrViewField()
2L.UEAt local npc = {}
z79L2lJn for k, v in pairs(npcVec) do
K8*
QS_* local npcs = {}
S8j;
oJ2d npc[v["mID"]] = v["mName"]
6$wS7Cu end
.FK'TG for key, value in pairs(npc) do
+T[3wL~ local sPos, ePos = string.find(value, npcName)
j}8IT if sPos then
?!(/;RU1 return key
UNocm0!N' end
6Nx T W end
Lc^nNUzPo return nil
#FF5xe end
"hz(A.THi 'T[=Uuj" --NPC名称打开NPC
,
6\i function API_NpcTalk(npcName)
}4xxge?r local npcid = API_GetNpcIdByName(npcName)
`xe[\Z
2 local NPCProxy = global.Facade:retrieveProxy(global.ProxyTable.NPC)
77/y{#Sk NPCProxy:RequestTalk(npcid)
FM9b0qE end
jM
J[6qj `9Ngax=_ --NPCID打开NPC
|
(P%< function API_NpcTalkEx(npcid)
l1`Zp9I local NPCProxy = global.Facade:retrieveProxy(global.ProxyTable.NPC)
r5[om$|* NPCProxy:RequestTalk(npcid)
q p|T,D% end
4s*P5w_'/ en7i})v\". function API_GetNpcTalkData()
`< y[V local NPCProxy = global.Facade:retrieveProxy(global.ProxyTable.NPC)
18w[T=7) local talkData = NPCProxy:GetCurrentNPCTalkData()
D+rDgr
v return talkData
;nj 'C1 end
(]j*)~=V n]4)~ZIAU function API_GetAllLink()
M
"p6xp/ local talkData = API_GetNpcTalkData()
&nn!{S^ G/(oQA local acts = {}
[$3Zid local kv = {}
;3\Fb3d M4M
4*o for line in talkData.content:gmatch("(text=.->)") do
+`f gn9p if string.find(line, "@") then
`ZN@L<I6 local key = line:match("text=(.-)|")
H_;
Dq* [.<