游戏地址
k
.l,>s`! www.fgcq996.com egi?Qg 那年传奇百区1.76 G8?<(.pi@ W.,J' 找到 lua_State 然后调用下面的函数就能实现功能
Bf88f<Z 一个跑单狗注意qq1946913194
Qi7^z; 游戏账号密码。fanren9527 qq2293307009 ,K6]Q|U@r
QX~*aqS3s8 搞完演示完,删除好友跑单 Ic&t_B*i}] 73(T+6` --自动寻路Ex
;h3*MR function API_AutoMoveEx(mapX, mapY)
M !OI :v ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
;3sT>UB local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
ikRIL2Y local pathPoints = inputProxy:GetPathFindPoints()
.< vg[ if pathPoints == nil then
jIc;jjAF return 0
@]#+`pZ4A end
x{
*!"a> return #pathPoints
E(U}$Zey end
iVu+ct-iv .^.UJo;4G --自动寻路
AQ
7e function API_AutoMove(mapX, mapY)
1y"37;x ssr.AutoMoveBegin(mapX, mapY, ssr.GetCurMapData().mapID)
@4B2O"z` local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
cmN0ya local pathPoints = inputProxy:GetPathFindPoints()
v981nJ>w, if pathPoints == nil then
a\m10Ih: return 0
mLY * end
IL:"]`f* return #pathPoints
,em6wIq, end
|H_)u O x$|ZEh --停止寻路
,
n!xzoX_ function API_AutoMoveEnd()
@7^#_772 global.Facade:sendNotification(global.NoticeTable.AutoMoveEnd)
FvI`S> end
rrwsj` FVQWz[N --自动打怪
o
>`/,-! function API_AutoFight(isAFK)
\
bT]?.si if isAFK then
EJtU(HmW if not IsAFKState() then
nLfnikw& global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 1)
UXk8nH global.Facade:sendNotification(global.NoticeTable.AFKBegin)
RLHe;-*b]I end
M9OFK\) else
:M
[E-j; if IsAFKState() then
4l`gAE$ global.networkCtl:SendMsg(global.MsgType.MSG_CS_AUTOPLAYGAME_REQUEST, 2)
Yg]f2ke global.Facade:sendNotification(global.NoticeTable.AFKEnd)
r&3fSx9 end
N[+dX_h end
Gj_b GqF8} end
}lb.3fqiA \+AH>I;vO function IsAFKState()
!d0@^JbM" local AutoProxy = global.Facade:retrieveProxy(global.ProxyTable.Auto)
l*m|b""].u return AutoProxy:IsAFKState()
P/PS(` end
cT0g, ^& 3MzY]J
y( --打开自动穿戴
;W*$<~_ function API_AutoDress()
(
L6`_) --不抢别人归属
1aT$07G0 global.MMO.SETTING_IDX_NO_ATTACK_HAVE_BELONG =1
sTqB%$K} global.MMO.SETTING_IDX_AUTO_PUT_IN_EQUIP = 1
7:j #1N[p local ServerOptionsProxy = global.Facade:retrieveProxy(global.ProxyTable.ServerOptionsProxy)
6Rf5 ServerOptionsProxy._data["autoDress"] = 1
P*T)/A%4 global.ConstantConfig.autousetimes = 0
)eV40l$
M end
Ul'G
g
4 z`5W, --强制打开自动挂机拾取
pq&c]8H function API_AutoPick()
jw[
`_
local ItemConfigProxy = global.Facade:retrieveProxy(global.ProxyTable.ItemConfigProxy)
t2SZ]|C local config = ItemConfigProxy.config
aBC[(}Pb] for k, v in pairs(config) do
z*[Z: --local res = string.gsub(v.pickset, "0", "1")
?3Fo:Z`@F v.pickset = v.pickset .. 1
6e*b;{d end
<C{5(=X{ end
H5I#/j tj&A@\/ --获取人物坐标
nz',Zm}, function API_GetMapXY()
dbXG?K][ return ssr.GetMainPlayerMapPos()
v:0i5h&M end
(os7Q?
]\e zES --获取人物状态
r/T DU[`& function API_GetAction()
^,5.vfES local player = global.gamePlayerController:GetMainPlayer()
UiEB?X]-l' local list = global.playerManager.mPlayersInCurrViewField
|#B"j1D,H return player:GetAction()
ZF/KV\Ag) end
#"M Pe4 (~GFd7 --设置宠物状态
-&A[{m <,> function API_PetSleep(isSleep)
Mww]l[1'EL local SummonsProxy = global.Facade:retrieveProxy(global.ProxyTable.SummonsProxy)
DRIv<=Bt if not SummonsProxy:IsAlived() then
]x G4T>S return false
)-{Qa\6(% end
k
WtUj if isSleep then
\nyFN SummonsProxy:RequestModeChange(2)
mN*P2* else
ZD{srEa/a SummonsProxy:RequestModeChange(4)
Y"jDZG? end
'x0t,
;g end
v8IL[g6" S_CtEM --获取人物数据
YC_^jRB8n function API_GetGamePlayer()
W Q&<QVK local player = global.gamePlayerController:GetMainPlayer()
M Sj0D2H local list = global.playerManager.mPlayersInCurrViewField
7a<qP=J local person = {}
l!=WqIZ person["等级"] = player:GetLevel()
$g};u[y person["职业"] = player:GetJobID()
Nw2 bn person["名字"] = player:GetName()
%E\%nTV person["金币"] = ssr.GetMoneyCountById(1)
A!kyga6F5 person["元宝"] = ssr.GetMoneyCountById(2)
D+3Y.r9 person["绑金"] = ssr.GetMoneyCountById(3)
B# fzMaC return person
I@
k8^ end
K5lp-F 3$cF)5V f function API_GetGamePlayerLevel()
c" 7pf
T local player = global.gamePlayerController:GetMainPlayer()
4Dia#1$:J return player:GetLevel()
u3:Q t2^S end
bSghf"aN [mPdT^h --获取周围怪物
YM|S< function API_GetMonster()
TfVD'HAN;l local list = global.monsterManager.mMonstersInCurrViewField
]EnaZWyO] local actors = {}
}(K6 YL for k, v in pairs(list) do
bZXNo local actor = {}
kk'w@Sn.( actor["mID"] = v:GetID()
Q2NnpsA^6 actor["mName"] = v:GetName()
G~L?q~b actor["mRace"] = v:GetRace()
0d ->$gb actor["mType"] = v:GetType()
| dwxe
a actor["mSubType"] = v:GetSubType()
eNFUjDm actor["mX"] = v:GetMapX()
H=#Jg;_w actor["mY"] = v:GetMapY()
}A7qIys$4 actor["mAction"] = v:GetAction()
eLny-.i,7 actor["mTypeIndex"] = v:GetTypeIndex()
}6>J actor["mAnimationID"] = v:GetAnimationID()
0?xiG SZV actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
vWH>k+9&X actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
'[8b0\ actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
36a~! actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
PuJ{!S
\T7 actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
7nz+n# actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
syf"{bBe actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
=>
=x0gsgj actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
q4iD59yd)S actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
cvA\C_ actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
%}
,G(> actor["mColor"] = "0xFFFFFF"
]P$DAi if v:GetType() == global.MMO.ACTOR_PLAYER then
B?yt%f1 local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
L"I] mQvd local label_name = global.MMO.HUD_LABEL_NAME
7yTe]O local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
t`,IW{ if hudName then
*h:EE6| actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
EiN)TB^] end
wWU_?Dr_~ end
'kvFU_) table.insert(actors, actor);
8M9\<k6
end
:5{@*
zD;]
sk4 return actors
+~Ay h[V end
%i>
e 1cBhcYv"
--遍历周围玩家
~!F4JRf function API_GetPlayer()
aX)
./ local list = global.playerManager.mPlayersInCurrViewField
_D9@<+MS* local actors = {}
Zw][c7% for k, v in pairs(list) do
l6c%_<P| local actor = {}
4E\ntufo actor["mID"] = v:GetID()
6QXQ<ah" actor["mName"] = v:GetName()
t}k'Ba3]:Y actor["mRace"] = v:GetRace()
t} i97 ; actor["mType"] = v:GetType()
B"9hQb actor["mSubType"] = v:GetSubType()
m%c0#=D actor["mX"] = v:GetMapX()
?_>^<1I1 actor["mY"] = v:GetMapY()
<>i+R#u{ actor["mAction"] = v:GetAction()
#6sC&w3 actor["mTypeIndex"] = v:GetTypeIndex()
-5v.1y=!L actor["mAnimationID"] = v:GetAnimationID()
mv*T=N8fC actor["mLv"] = (v.GetLevel and { v:GetLevel() } or { 0 })[1]
pptM&Y actor["mSex"] = (v.GetSexID and { v:GetSexID() } or { 0 })[1]
6//FZ:q actor["mJobID"] = (v.GetJobID and { v:GetJobID() } or { 0 })[1]
4)+IO; actor["mHP"] = (v.GetHP and { v:GetHP() } or { 0 })[1]
Gj19KQ1G actor["mHPMax"] = (v.GetMaxHP and { v:GetMaxHP() } or { 0 })[1]
+`zi>=
actor["mMP"] = (v.GetMP and { v:GetMP() } or { 0 })[1]
L
1kM~M actor["mMPMax"] = (v.GetMaxMP and { v:GetMaxMP() } or { 0 })[1]
hdtnC29$ actor["mOwnerID"] = (v.GetOwnerID and { v:GetOwnerID() } or { "" })[1]
\41)0,sEy actor["mOwnerName"] = (v.GetOwnerName and { v:GetOwnerName() } or { "" })[1]
E(!6n= qR actor["mGuildName"] = (v.mGuildName and { v.mGuildName } or { "" })[1]
:LiDJF actor["mColor"] = "0xFFFFFF"
Z3So|M{v if v:GetType() == global.MMO.ACTOR_PLAYER then
|8c:+8 local batch_label = global.MMO.HUD_TYPE_BATCH_LABEL
&^n>ZY, local label_name = global.MMO.HUD_LABEL_NAME
NTXL>Q*e local hudName = global.HUDManager:GetHUD(v:GetID(), batch_label, label_name)
>2CusT 2 if hudName then
PT#eXS9_ actor["mColor"] = GetColorHexFromRBG(hudName:getColor())
w;@25=
| end
!x$:8R end
`XSc > table.insert(actors, actor);
)6:]o&bZ end
mzE$aFu8 return actors
8$v zpu end
B UQn+;be ^b!7R
<>~ --遍历周围玩家EX
]vQ?]d?>
a function API_GetPlayerExe()
Yuo1'gE+ local s1 = API_GetPlayer()
).}k6v[4) local result = ""
=ym for k, v in pairs(s1) do
:{b6M/ local s2 = string.format(
s"'
,370 "mID=%s,mName=%s,mRace=%s,Dura=%s,mType=%s,mSubType=%s,mX=%s,mY=%s,mAction=%s,mTypeIndex=%s,mAnimationID=%s,"
"Z 2Tc) , v["mID"]
PIEW \i , v["mName"]
'uf2
nUo , v["mRace"]
Bf:tal6 -M , v["Dura"]
9;]wF8h , v["mType"]
Sm$j:xw< , v["mSubType"]
AuDR |;i , v["mX"]
w"a 9'r , v["mY"]
vDW&pF_eI> , v["mAction"]
]LB
vYjMY , v["mTypeIndex"]
4Wla&yy , v["mAnimationID"])
AX!>l; local s3 = ""
i=1 }lkq 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"
f']sU/c= , v["mLv"]
<L/M`(:=k , v["mJobID"]
Vv]$\`d# , v["mHP"]
qTTn51 , v["mHPMax"]
} }f_ , v["mMP"]
2rO)qjiH , v["mMPMax"]
)y`TymM[F , v["mOwnerID"]
1rv$?=Z , v["mOwnerName"]
BLwfm+ m" , v["mGuildName"]
+t>*l>[ , v["mColor"])
P
0Efh?oZ result = result .. s2 .. s3 .. "\r\n"
$35,\ZO> end
'EL || return result
D#d8 ^U end
j!S1Y0CV 'l'
X^LMD --遍历周围指定NPC
eyf4M;goz} function API_GetNpcIdByName(npcName)
4Hml.|$ local npcVec = global.npcManager:FindNpcInCurrViewField()
'Gl;Ir^ local npc = {}
QP$nDK< for k, v in pairs(npcVec) do
hg&w=l local npcs = {}
EI
txRHV5 npc[v["mID"]] = v["mName"]
2~M;L&9- end
dqD;y#/ for key, value in pairs(npc) do
K=tx5{V local sPos, ePos = string.find(value, npcName)
mNx,L+3 if sPos then
jy!f{dsC return key
U+.PuC[3 end
i $[,-4v end
MOP]\ypn return nil
#juGD
9e end
,Um 5S6 Z >HcYVp~G --NPC名称打开NPC
v~V;+S=
gz function API_NpcTalk(npcName)
<Spr6U9p7 local npcid = API_GetNpcIdByName(npcName)
E 4='m local NPCProxy = global.Facade:retrieveProxy(global.ProxyTable.NPC)
H}h~~7E NPCProxy:RequestTalk(npcid)
.'5'0lR5 end
&;ZC<