游戏地址
~zNAbaC+>t www.fgcq996.com %&t<K3&Yh 那年传奇百区1.76 EG |A_m85 wz ~d(a# 找到 lua_State 然后调用下面的函数就能实现功能
sYf~c0${ 一个跑单狗注意qq1946913194
G{%L B}2 游戏账号密码。fanren9527 qq2293307009 b(O3@Q6[
P3 ^Y"Pv? 搞完演示完,删除好友跑单 p,i[W.dy.' 'u<juFr --自动寻路Ex
RQu(Wu|m. function API_AutoMoveEx(mapX, mapY)
8StgsM ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
O#S.n#{ local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
A
'];` local pathPoints = inputProxy:GetPathFindPoints()
)~ h} if pathPoints == nil then
i5,kd~%O return 0
>[=^_8M end
(,Df^4%7 return #pathPoints
C#Iybg end
\&gB)czEO QbpFE)TYJ| --自动寻路
XFV!S#yEZ function API_AutoMove(mapX, mapY)
55
c|O ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
w%BL local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
qR+!l( local pathPoints = inputProxy:GetPathFindPoints()
Z^MNf if pathPoints == nil then
xbYi. return 0
** G9H end
*N'p~LJ return #pathPoints
tS8u end
AoL2@C.C%D Ng>h"H --停止寻路
V-L"gnd&2 function API_AutoMoveEnd()
j
Dv{/) global.Facade:sendNotification(global.NoticeTable.AutoMoveEnd)
_8UDT^?8, end
M%;hB*9 =]Jd9]vi --自动打怪
.$) function API_AutoFight(isAFK)
m#Z#
.j_2 if isAFK then
..'_o~Ka if not IsAFKState() then
#d2.\X}A"3 global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 1)
"y/?WQ>,3
global.Facade:sendNotification(global.NoticeTable.AFKBegin)
PGV/ h end
HcSXsF else
tr}Loq\y if IsAFKState() then
mZ"4&U global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 2)
2n"V}p>8i# global.Facade:sendNotification(global.NoticeTable.AFKEnd)
N7
$I^?< end
EV@X*| w end
ptxbDzOz end
h6`6tk |02gup qqi function IsAFKState()
pYZ6e_j1~ local AutoProxy = global.Facade:retrieveProxy(global.ProxyTable.Auto)
;
_1
at return AutoProxy:IsAFKState()
7!TueP0Zd end
`W/>XZl+t >{J(>B\ --打开自动穿戴
s'J:f$flS function API_AutoDress()
qfRH5)k --不抢别人归属
!lc[ global.MMO.SETTING_IDX_NO_ATTACK_HAVE_BELONG =1
Ur=(.%@ global.MMO.SETTING_IDX_AUTO_PUT_IN_EQUIP = 1
eu|;eP-+d local ServerOptionsProxy = global.Facade:retrieveProxy(global.ProxyTable.ServerOptionsProxy)
' x35=@ ServerOptionsProxy._data["autoDress"] = 1
t+T4-1 3a global.ConstantConfig.autousetimes = 0
74k dsgQf end
@>>~CZ`
l !AfHk| --强制打开自动挂机拾取
@8rx`
9 function API_AutoPick()
4s{~r local ItemConfigProxy = global.Facade:retrieveProxy(global.ProxyTable.ItemConfigProxy)
$Kncvu local config = ItemConfigProxy.config
TXvI4"& for k, v in pairs(config) do
K\6u9BYG --local res = string.gsub(v.pickset, "0", "1")
~=RT*>G_ v.pickset = v.pickset .. 1
KRMQtgahc end
I5n^,@md end
^mO~W
!" >!bJslWA --获取人物坐标
0+ ;bh
{Eu function API_GetMapXY()
q0R -7O( return ssr.GetMainPlayerMapPos()
EkNunCls end
e-#BDN(O NmJWU:W_@ --获取人物状态
v4c[(& function API_GetAction()
e:n<EnT local player = global.gamePlayerController:GetMainPlayer()
po Vx8oO8 local list = global.playerManager.mPlayersInCurrViewField
3L}!RB return player:GetAction()
p &"`RS#Z end
kN4{13Qs* o{q{!7DH@ --设置宠物状态
-0{r>,&Mm function API_PetSleep(isSleep)
8sTp`}54J local SummonsProxy = global.Facade:retrieveProxy(global.ProxyTable.SummonsProxy)
.|b$NM
if not SummonsProxy:IsAlived() then
8sM|%<$=j return false
usK*s$ns end
,-d0b0 if isSleep then
*ipFwQ SummonsProxy:RequestModeChange(2)
<;m<8RjX else
wL
4dTc SummonsProxy:RequestModeChange(4)
oO|KEY
( end
,UGRrS end
cacr=iX DiwxXqY
--获取人物数据
\T :i{.i function API_GetGamePlayer()
BB*f4z$Y% local player = global.gamePlayerController:GetMainPlayer()
N&g3t%F local list = global.playerManager.mPlayersInCurrViewField
nR}sNl1 local person = {}
{rH@gz|@i person["等级"] = player:GetLevel()
6GSI"M6s person["职业"] = player:GetJobID()
lc,tVe_ person["名字"] = player:GetName()
>TnTnF WX person["金币"] = ssr.GetMoneyCountById(1)
7k9G(i[-+ person["元宝"] = ssr.GetMoneyCountById(2)
*%fi/bimG person["绑金"] = ssr.GetMoneyCountById(3)
vMt/u?oB return person
v}O30wE end
iwp{%FF Bb^;q#S1 function API_GetGamePlayerLevel()
T;
y>>_, local player = global.gamePlayerController:GetMainPlayer()
$oU*9}}Rn return player:GetLevel()
=JbRu|/ end
h
WtVWVNL jW3!6*93 --获取周围怪物
P.;aMRMR function API_GetMonster()
v)l8@. local list = global.monsterManager.mMonstersInCurrViewField
S^>,~R.TX local actors = {}
.C(eh
for k, v in pairs(list) do
UT=tT)4b local actor = {}
1
&)?JZhg actor["mID"] = v:GetID()
(@<c6WS actor["mName"] = v:GetName()
],FMwCI actor["mRace"] = v:GetRace()
uU <=d actor["mType"] = v:GetType()
7-
]
as$ actor["mSubType"] = v:GetSubType()
bg&zo;Ck8T actor["mX"] = v:GetMapX()
w2Jf^pR actor["mY"] = v:GetMapY()
iAa.}CI,zB actor["mAction"] = v:GetAction()
^*8G8'k;$ actor["mTypeIndex"] = v:GetTypeIndex()
: $Y9jR actor["mAnimationID"] = v:GetAnimationID()
uRRQyZ actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
,PuL{%PXu actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
r1.nTO% actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
$.PuK~} actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
kabnVVn~ actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
D!NQ~'.a=2 actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
w' OXlR actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
r(aLEJ"u? actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
1#*a:F&re actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
M/ni6%x actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
|_*O '#jx actor["mColor"] = "0xFFFFFF"
[los dnH^? if v:GetType() == global.MMO.ACTOR_PLAYER then
5JCG2jqx0 local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
(\a]"g,]v local label_name = global.MMO.HUD_LABEL_NAME
1 +qw$T local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
/!Wu D\B if hudName then
}Q?c"H!/ actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
Hh-+/sO~" end
wNtx]t_M end
V=qwwYz~ table.insert(actors, actor);
pP?MWe
Eg end
cc&axc7I ^xHTW g%9 return actors
D@
|W<i- end
LuSLkLN =Z+nz^'b --遍历周围玩家
{QZUDP
PR function API_GetPlayer()
z4+k7a@jn local list = global.playerManager.mPlayersInCurrViewField
2FF4W54I local actors = {}
XKttZOiGT for k, v in pairs(list) do
^G.Xc\^w: local actor = {}
>.'*)@vQi actor["mID"] = v:GetID()
xA1hfe.9 actor["mName"] = v:GetName()
W
Z7BoDa7O actor["mRace"] = v:GetRace()
H
!nr^l'+ actor["mType"] = v:GetType()
ph [#QHB actor["mSubType"] = v:GetSubType()
Xr2ou5zAn actor["mX"] = v:GetMapX()
&nkW1Ner9 actor["mY"] = v:GetMapY()
H]p!\H actor["mAction"] = v:GetAction()
j =WST actor["mTypeIndex"] = v:GetTypeIndex()
qg!|l7e actor["mAnimationID"] = v:GetAnimationID()
~j5x+yC actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
|8=nL$u actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
,:`4% actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
a1.Ptf eW| actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
l>{R`BZ/ actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
}i`PGx actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
`V"sOTb actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
[}8|R0KF actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
=%gRW5R% actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
bQP{| actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
Ikiib
WQL+ actor["mColor"] = "0xFFFFFF"
T/xp?Vq6/ if v:GetType() == global.MMO.ACTOR_PLAYER then
2
:mn</z local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
I8<,U!$ local label_name = global.MMO.HUD_LABEL_NAME
\B
0ywN? local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
2Sp=rI
if hudName then
CkD#/
actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
GXjfQ~<] end
Nwt" \3 end
H5]^
6
HwX table.insert(actors, actor);
(+u39NQV end
Jn3 An return actors
1Q4}'0U4 end
T[4<R 5} 2fS[J'-o --遍历周围玩家EX
(v|}\?L function API_GetPlayerExe()
:
G`hm{ local s1 = API_GetPlayer()
>teOm?@U local result = ""
)m{Ye0!RD for k, v in pairs(s1) do
0iK;Egwm local s2 = string.format(
YoLx>8 "mID=%s,mName=%s,mRace=%s,Dura=%s,mType=%s,mSubType=%s,mX=%s,mY=%s,mAction=%s,mTypeIndex=%s,mAnimationID=%s,"
,0~9dS , v["mID"]
P=&o%K,:f , v["mName"]
J?}WQLVP' , v["mRace"]
i|}[A , v["Dura"]
_~tEw.fM5 , v["mType"]
\&3"<6xA
, v["mSubType"]
^;maotHn , v["mX"]
J.dLPKU;- , v["mY"]
DUe&r,(4O , v["mAction"]
$:j G- r , v["mTypeIndex"]
:ORR_f`> , v["mAnimationID"])
}gMDXy} local s3 = ""
6,LubZFD 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"
)+"'oY$]} , v["mLv"]
<