
标题: [讨论] 做了个收魔币、计时/计步,不遇敌lua内挂。gmsv.exe适用 [打印本页]
作者: ahsin 时间: 2018-3-23 00:28 标题: 做了个收魔币、计时/计步,不遇敌lua内挂。gmsv.exe适用
首先。。。我不是专业lua程序猿,代码都是拼凑和看cgdev的库然后做出来的—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート( ^' J5 R0 k g5 C
7 f s. j$ Z0 Z0 g& J—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート代码里有些可能是过度的,高手就不要介意了!—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート3 Z- f8 I4 S' z) J
$ e1 c2 ]; i9 D. h3 r& }—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート总之,用了好多魔力GF内置方法都没能做出一个有效的不遇敌道具。魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表, F1 d# T1 c8 D& R/ t
bbs.mocwww.com8 H4 p' k' R; o7 u, o2 R% D! R
无奈最后只能自己瞎写写了!魔力私服,最新魔力宝贝私服技术交流7 |2 B K5 J' f a4 r& M
—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート1 a/ ?- X! d% N! Z; A8 Z$ s
我VB做得多。。。所以lua让我烦恼了很久,没有timer没有sleep,不过最后还是曲线解决了- -
( @% v1 Y# G6 H8 Pbbs.mocwww.com
2 }' Q! f1 `2 X! P; c; C+ U: G% N—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート" H; F% C% H1 Q9 g( h
我这里是小公益服,人少,测试一周功能正常。
9 v! P0 e3 o% i% N) g& @& p( s4 v魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表
; w- u3 s# M5 P* b; ]) R各位小伙伴可以测试一下魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表; F, ?; X' Z8 P& S* s7 o! h8 u& y
" g7 n, \* y4 p1 n; wbbs.mocwww.com公布代码如下复制内容到剪贴板
代码:
--本lua由ahsinsoft.com编写 QQ230236979
if type(Players)~="table" then Players={} end
if type(tab_msg)~="table" then tab_msg={} end
if type(tab_return)~="table" then tab_return={} end
if type(tab_buyudi)~="table" then tab_buyudi={} end
local bydgold= 5555--支付价格
local bydsj= 900--不遇敌有效时间,秒
NL.RegTalkEvent(nil,"ngsupport_TalkEvent");--监视玩家说话内容是否含有关键字
NL.RegLogoutEvent(nil,"ngsupport_LogoutEvent");--监视玩家是否登出,是则清空所有功能参数
--Delegate.
--NL.RegDropEvent(nil,"ngsupport_DropEvent");--监视玩家是否掉线、下线,是则清空所有功能参数
function ngsupport_TalkEvent(player,msg,color,range,size)
if(msg == "/2" or msg == "、2")then
local CdKey = Char.GetData(player,%对象_账号%);
if (Char.GetData(player,%对象_金币%)<bydgold) then
NLG.SystemMessage(player, "[系统] 魔币不足["..bydgold.."],无法使用!")
return 0
end
local kg = Char.GetData(player,%对象_不遇敌开关%);
if(kg == 0)then
Char.AddGold(player,-bydgold);
Char.SetData(player,%对象_不遇敌开关%,1);
NLG.SystemMessage(player,"不遇敌已经开启,当前时效限定为15分钟!");
zoucia = os.time();
Char.SetLoopEvent(nil, "bydoff", player, 30000);--伪timer 开启,参数为毫秒
else
Char.SetData(player,%对象_不遇敌开关%,0);
zoucia = nil
zoucib = nil
zoucic = nil
Char.SetLoopEvent(nil, "bydoff", player, nil);--伪timer 关闭
NLG.SystemMessage(player,"玩家已经主动关闭不遇敌!");
return 0
end
end
end
function bydoff(player)
--local CdKey = Char.GetData(player,%对象_账号%);
local kgs = Char.GetData(player,%对象_不遇敌开关%);
zoucib = os.time();
--zoucic = nil
if(kgs == 0)then
zoucia = nil
zoucib = nil
zoucic = nil
Char.SetLoopEvent(nil, "bydoff", player, nil);--伪timer 关闭
return 0
end
if(kgs == 1 and zoucib - zoucia > bydsj)then
zoucia = nil
zoucib = nil
zoucic = nil
Char.SetLoopEvent(nil, "bydoff", player, nil);--伪timer 关闭
Char.SetData(player,%对象_不遇敌开关%,0);
NLG.SystemMessage(player,"不遇敌功能有效时间已过,不遇敌关闭!");
return 0
else--if(kgs == 1)then
zoucic = zoucib - zoucia
zoucid = bydsj - zoucic
NLG.SystemMessage(player,"不遇敌功能将在 "..zoucid.." 秒后失效。 -=刷新率:30秒");
end
end
function ngsupport_LogoutEvent(palyer)
local kgss = Char.GetData(player,%对象_不遇敌开关%);
if(kgss == 1)then
Char.SetData(player,%对象_不遇敌开关%,0);
zoucia = nil
zoucib = nil
zoucic = nil
Char.SetLoopEvent(nil, "bydoff", player, nil);--伪timer 关闭
NLG.SystemMessage(player,"玩家登出,不遇敌关闭!");
end
--return 0;
end
启用方法:
8 I& G7 v' T# Z; k% x& r魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表1、把ngsupport.lua放入服务端目录gmsv\lua\Module中
6 @$ @0 R5 q# Z8 z8 p \9 ]妖城在线论坛2、服务端目录gmsv\lua中,编辑config.lua,在最后一行新增useModule("ngsupport");魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表: R: j# n7 r' S* @* V
3、本内挂热键为/2,若ng.lua中已经有简易版的不遇敌内挂,建议注释掉,以免冲突。高手忽略
5 P0 M( V, q3 d# Hbbs.mocwww.com
i$ D, x& @! r, R0 ^2 @bbs.mocwww.com
ngsupport.rar (998 Bytes)
8 k) I5 S5 x9 ~ B. q—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート% }; z0 ?$ u4 k( r2 Z% q
[ 本帖最后由 ahsin 于 2018-3-23 00:45 编辑 ]
附件: ngsupport.rar (2018-3-23 00:34, 998 Bytes) / 该附件被下载次数 273
http://bbs.mocwww.com/attachment.php?aid=18600
作者: ahsin 时间: 2018-3-23 00:49
已知bug:
9 C4 h0 U' S/ J8 s7 V—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート1、下线监视代码没完成,但不影响效果。
4 o& k- K8 S2 l$ e$ J0 ~妖城在线论坛2、没找到彻底结束loop的方法,所以30秒监视可能会不准,但对玩家没有影响。假设现在是15分钟有效期,那么玩家可能15分钟后再多30秒后才结束不遇敌。
1 Z" Y* N# T' p5 G—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート
% N9 S9 q" ^. k: a妖城在线论坛求高手协助完善魔力私服,最新魔力宝贝私服技术交流% u3 {: K. R" G& t: T
$ k h( ~! U- {0 y! F0 ^4 q5 n5 A魔力私服,最新魔力宝贝私服技术交流bbs.mocwww.com: i7 w- F! v; g$ c- O
2 E/ _% Y* \3 k" ?7 a3 M8 H5 g4 a
# _5 J7 L' F7 b3 a5 m5 J魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表bbs.mocwww.com/ k. C. S9 J2 d/ `
抱歉。。。计步没备份,被覆盖了哈哈哈
- N' E0 E( x$ R( Ubbs.mocwww.com
4 p/ o$ Y/ ~8 ]' T魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表有需要找我,必须免费的!原理是相通的,高手自己改。魔力私服,最新魔力宝贝私服技术交流) ]- u/ ^# }: q2 F6 Y$ R( O0 }. q6 D
魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表' S2 j. w k* j' c e$ h
大致方向为:os.time 替换成 %对象_走次%
4 g2 w; E5 g( B: {0 r8 m: Z$ }魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表魔力私服,最新魔力宝贝私服技术交流* U( H6 H# [9 G7 X* C' B
[ 本帖最后由 ahsin 于 2018-3-23 01:02 编辑 ]
作者: 262070173 时间: 2018-3-26 13:36
不能,顶一下,辛苦了...
作者: ahsin 时间: 2018-3-30 23:13
引用:
原帖由 262070173 于 2018-3-26 13:36 发表
魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表# X5 y. |; Z1 R/ q- ~, g; B
不能,顶一下,辛苦了...
3 D5 w( q8 {+ `% M0 P
额?什么不能?
作者: 71336 时间: 2018-4-14 07:55 标题: 顶一下
顶一下。。。辛苦了。。
作者: orochi0531 时间: 2018-4-17 15:33
复制内容到剪贴板
代码:
local limit_time = 10; --两次发喇叭间隔时间,单位秒
--local laba_itemid = 361000; --小喇叭的道具编号
local turn_on_key = "/世界喇叭"; --玩家开启/关闭喇叭开关的命令
-- ***************************************************************************************************** --
tbl_labaPlayer = {};
Delegate.RegDelLoginEvent("labaLoginEvent");
Delegate.RegDelAllOutEvent("labaOutEvent");
--Delegate.RegDelTalkEvent("labaTalkEvent");
--Delegate.RegDelTalkEvent("ng_TalkEvent");
ProtocolDelegate.on(%RECV_TK%,"RECV_TK_Event");--Protocol.OnRecv(nil,"RECV_TK_Event",%RECV_TK%);
function new_labaplayerobject(player)
local labaplayer =
{
index = player;
isopen = true;
limit_time = 0;
VIP = 0;
};
return labaplayer;
end
function labaLoginEvent(player)
tbl_labaPlayer[Playerkey(player)] = new_labaplayerobject(player);
local playerName = Char.GetData(player,%对象_名字%);
local playerCDK = Char.GetData(player,%对象_账号%);
local playerWZ = Char.GetData(player,48);
local playerLv = Char.GetData(player,%对象_等级%);
local playerJob = Char.GetData(player,%对象_职业%);
local ZhanLi = playerLv*10;
for i=0,7 do
local _itemindex = Char.GetItemIndex(player,i);
if(_itemindex>0)then
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_HP%))/10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_MP%))/5);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_攻击%))/2);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_防御%))*0.6);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_敏捷%))*0.6);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_闪躲%))*8);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_命中%))*12);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_必杀%))*12);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_反击%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_精神%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_回复%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_毒抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_睡抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_石抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_醉抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_乱抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_忘抗%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_属性一值%))*10);
ZhanLi = ZhanLi+math.floor(tonumber(Item.GetData(_itemindex,%道具_属性二值%))*10);
end
end
local query = "SELECT Reward,Name,VipLevel FROM tbl_char WHERE CDK='"..playerCDK.."' And Pos='"..playerWZ.."' Limit 1";
local resset = SQL.Run(query);
if(type(resset)=="table")then--如果返回结果是table类型的值
if (resset["0_0"]~="") then
NLG.SystemMessage(-1, "欢迎" .. resset["0_0"] ..":".. resset["0_1"] .. "上线了!")
end
tbl_labaPlayer[Playerkey(player)].VIP = tonumber(resset["0_2"]);
local query = "Update tbl_char Set IP = '0',Name = '"..playerName.."',Job="..playerJob..",ZhanLi="..ZhanLi.." WHERE CDK='"..playerCDK.."' And Pos="..playerWZ.."";
local resset = SQL.Run(query);
else
local query = "INSERT INTO tbl_char (CDK,Name,Pos,TitleName,IP) VALUES ('"..playerCDK.."','"..playerName.."',"..playerWZ..",'|','0')";
local resset = SQL.Run(query);
tbl_labaPlayer[Playerkey(player)].VIP = 0;
end
end
function labaOutEvent(player)
tbl_labaPlayer[Playerkey(player)] = nil;
local playerCDK = Char.GetData(player,%对象_CDK%);
local playerWZ = Char.GetData(player,48);
local query = "Update tbl_char Set IP = '' WHERE CDK='"..playerCDK.."' And Pos="..playerWZ.."";
local resset = SQL.Run(query);
end
function RECV_TK_Event( _fd, _head, _packet)
local _player = Protocol.GetCharByFd(_fd);
local pos1,pos2 = string.find(_packet,"|");
local _str1 = string.sub(_packet,pos1+1);
if(_player == -1)then
return 0;
end;
if string.find(_str1,"^/t") then
local msg2 = Split(_str1,"t");
local msg3 = Split(msg2[2],":");
local msg4 = "";
if string.find(msg3[1],"S") then
else
msg4 = string.sub(msg3[1], 1);
if CheckNumber(msg4) then
NLG.SystemMessage(_player,"离线挂机开启。");
NLG.SetOfflinePlayer(_player, msg4);
else
NLG.SystemMessage(_player,"输入的时间必须为数字!(单位:秒,最小为1秒,最大为10800秒)");
end
end
if string.find(msg3[1],"^S") then
else
msg4 = string.sub(msg3[1], 3);
if CheckNumber(msg4) then
NLG.SystemMessage(_player,"离线挂机开启。");
NLG.SetOfflinePlayer(_player, msg4);
else
NLG.SystemMessage(_player,"输入的时间必须为数字!(单位:秒,最小为1秒,最大为10800秒)");
end
end
return 1;
end
if string.find(_str1,"^/item") or string.find(_str1,"^/整理") or string.find(_str1,"^/整理包包") then
NLG.SystemMessage(_player,"包包已經整理。");
NLG.SortItem(_player);
return 1;
end
if string.find(_str1,"^/1") or string.find(_str1,"^/步步遇敌") then -- or string.find(_str1,"^"..turn_off_key.."")
local getXiangVar1 = Char.GetData(_player,%对象_香步数%);
local getXiangVar2 = Char.GetData(_player,%对象_香上限%);
if(getXiangVar1 > 0)then
Char.SetData(_player,%对象_香步数%,0);
Char.SetData(_player,%对象_香上限%,0);
NLG.SystemMessage(_player,"步步遇敌已经关闭!");
else
Char.SetData(_player,%对象_香步数%,999);
Char.SetData(_player,%对象_香上限%,999);
NLG.SystemMessage(_player,"步步遇敌已经开启!");
end
return 1;
end
if string.find(_str1,"^/2") or string.find(_str1,"^/不遇敌") then
local kg = Char.GetData(_player,%对象_不遇敌开关%);
if(kg == 0)then
Char.SetData(_player,%对象_不遇敌开关%,1);
NLG.SystemMessage(_player,"不遇敌已经开启!");
else
Char.SetData(_player,%对象_不遇敌开关%,0);
NLG.SystemMessage(_player,"不遇敌已经关闭!");
end
return 1;
end
if string.find(_str1,"^"..turn_on_key.."") and (tbl_labaPlayer[Playerkey(_player)].isopen == false or tbl_labaPlayer[Playerkey(_player)].isopen == nil) then
tbl_labaPlayer[Playerkey(_player)].isopen = true;
NLG.SystemMessage(_player,"世界喇叭功能已经开启。");
return 1;
end
if string.find(_str1,"^"..turn_on_key.."") and tbl_labaPlayer[Playerkey(_player)].isopen == true then
tbl_labaPlayer[Playerkey(_player)].isopen = false;
NLG.SystemMessage(_player,"世界喇叭功能已经关闭。");
return 1;
end
if string.find(_str1,"^>") and tbl_labaPlayer[Playerkey(_player)].isopen == true then
local myLabaNum = fieldget(_player,"LabaNum");
local litime = tbl_labaPlayer[Playerkey(_player)].limit_time;
if (os.time() - litime < limit_time )then
NLG.SystemMessage(_player,limit_time.."秒内禁止重复发喇叭。");
return 1;
end
if(myLabaNum > 0)then
local msg2 = Split(_str1,":");
local msg3 = string.sub(msg2[1],2);
NLG.SystemMessage(-1,"[世界喇叭]"..Char.GetData(_player,%对象_名字%)..": "..msg3);
fieldadd(_player,"LabaNum",-1);
myLabaNum = fieldget(_player,"LabaNum");
NLG.SystemMessage(_player,"世界喇叭发送成功!"..Char.GetData(_player,%对象_名字%).."身上还剩"..myLabaNum.."个喇叭。");
tbl_labaPlayer[Playerkey(_player)].limit_time = os.time();
else
NLG.SystemMessage(_player,"对不起您的喇叭不足!请使用喇叭道具进行充值!");
end
return 1;
end
if string.find(_str1,"^>") and (tbl_labaPlayer[Playerkey(_player)].isopen == false or tbl_labaPlayer[Playerkey(_player)].isopen == nil) then
NLG.SystemMessage(_player,"对不起您没有开启世界喇叭功能!");
return 1;
end
return 0; -- 通过该封包
end
--[[如果str仅由数字组成,则返回true,否则返回false。]]
function CheckNumber(_data,_max,_min)
if _max == nil then
_max = 10800;
end
if _min == nil then
_min = 1;
end
if string.find(_data,"^[-]?[1-9]%d*$") then
if tonumber(_data) > _max then
return false;
elseif tonumber(_data) < _min then
return false;
else
return true;
end
else
return false;
end
end
这样设置的tk的效果是可以不显示/1/2之类的东东的哦。你的不支持功能复用,看我的这个再改改吧。下边是封包的复用。复制内容到剪贴板
代码:
--[[
将本文件放置于Module目录,并在Config.lua加入如下内容:
useModule("OnRecv");--封包复用 --注:无需添加文件后缀".lua"并放于最上边
--]]
if (_G.ProtocolDelegate) then
return _G.ProtocolDelegate;
end
local Module = {}
--注册全局函数
_G.ikki_OnRecv = function(Fd, Head, Packet)
return Module.emit(Head, Fd, Head, Packet);
end
--注册全局变量
_G.ProtocolDelegate = Module;
--错误处理函数
local hanldeError = _G.hanldeError;
if (hanldeError == nil) then
hanldeError = function(e)
print("runtime error: " .. (e or "") .. "\n" .. debug.traceback())
return e;
end
end
--注册事件
function Module.on(event, fn)
print("On package: " .. event, fn);
if (Module["_" .. event] == nil) then --第一次注册封包函数
Module["_" .. event] = {}
if (Module["_m_" .. event] ~= true) then --第一次注册Protocol
Module["_m_" .. event] = true
Protocol.OnRecv(nil, "ikki_OnRecv", event);
end
end
local m = Module["_" .. event];
for i, v in ipairs(m) do
if (v == fn) then
return
end
end
table.insert(m, fn);
end
--反注册事件
function Module.off(event, fn)
if (Module["_" .. event] ~= nil) then
for i, v in ipairs(Module["_" .. event]) do
if (v == fn) then
table.remove(Module["_" .. event], i)
return
end
end
end
end
--反注册所有
function Module.offAll(event)
Module["_" .. event] = nil;
end
--触发事件
function Module.emit(event, fd, head, data)
if (event == nil) then
print("emit package is nil\n" .. debug.traceback())
end
--print("emit package: " .. event, fd, head, data);
local ret = {};
if (Module["_" .. event]) then
for i, fn in ipairs(Module["_" .. event]) do --循环处理
if (ret[2] == true) then --阻止继续调用
break;
end
local r, e = xpcall(function(fn, ret, fd, head, data) --xpcall 没有fn的return值只好用个ret保存了,顺便加个break变量
if (type(fn)=="string") then --兼容字符串
fn = _G[fn]
end
ret[1] = fn(fd, head, data, ret); --调用注册进来的函数
end, hanldeError, fn, ret, fd, head, data);
if (r ~= true) then --出错啦
print("Raise " .. event .. " event error: " .. e);
return
end
end
end
if (ret[1] ~= nil) then --null会在出错或者没注册的时候出现所以返回0不过滤封包
return ret[1];
end
return 0;
end
function Module.init()
-- Test Code
-- local fn1 = function(...)
-- --print("recv 1 ", "return " .. 0, ...);
-- return 0;
-- end
-- local fn2 = function(...)
-- --print("recv 2 ", "return " .. 1, ...);
-- return 1;
-- end
-- local k = 0;
-- local fn3 = function(...)
-- k = k + 1;
-- if (k > 3) then
-- k = 0;
-- --print("recv 3 ", "return " .. 0, ...);
-- return 0;
-- end
-- --print("recv 3 ", "return " .. 1, ...);
-- return 1;
-- end
-- Module.on(0, fn1);
-- Module.on(0, fn2);
-- Module.on(0, fn3);
end
return Module;
欢迎光临 妖城在线论坛 (http://bbs.mocwww.com/) |
Powered by Discuz! 6.0.0 |