网站首页 | 游戏资讯 | 网游世界 | 电视游戏 | 单机游戏 | 手机游戏 | 网站地图 | 游戏攻略搜索 加入收藏 | 设为首页
首页PS2PS3xbox360wiixboxNDSDCN64SSMDSFCPSPGBAPSFC街机

您现在的位置: 游戏攻略网 >> 电视游戏 >> GBA >> GBA游戏专题 >> 文章正文


Netbattle自建服务器方法[4/03更新]
作者:游戏FS    文章来源:游戏攻略网    点击数:    更新时间:2007-9-28

能用applocale的只要按置顶贴([图文教程]新春特别奉献:随心所欲上NB~)的步骤执行再改动一个小小的地方(在图2中的参数一栏填入"SERVER",不含引号)就行了,(英文系统则只需在Netbattle的快捷方式后空格并加上参数SERVER即可)谁都可以建,免费,而且可以添加到官方列表

注:现在KD8的服务器名被加上密码了,密码为空

这个东西的功能非常强大。。。有四种对捣乱的惩处(踢出Kick,禁入Ban(踢IP),ISP Ban(对付通过动态域名之类的访问的家伙),禁言SID Ban),还可以通过编程实现各种各样的功能(比如说禁止使用某种精灵),详细的可以看http://www.tvsian.com/netbattle/ScriptFAQ.txt
(据说这个已经有一段时间没更新了,缺了一些有用的新命令,比如#GetPokeItem,#GetPokeLevel(不能确定)等等,大家找找看看能不能找到更新版的。)


编程教程(主要是从那个txt及官方论坛中提炼出来然后自己翻译了一部分):
首先是按楼顶的方法启动,然后选菜单中的Server-->Script Window,就可以输入指令了。
指令的基本模式:
-----------------------------
Event {-|+}[EventName]
[Code]
EndEvent
-----------------------------
表示当某事件([EventName])发生前/后执行 [Code]指令
{-|+}:根据需要选择填-或+,-表示在该事件发生之前执行指令,+表示在之后执行
[EventName]:事件名,具体列表如下:
-----------------------------
事件名 | 描述
ServerStartup | 服务器开启时
NewMessage | 新信息出现在the Server text box时
ChatMessage | 一个聊天信息被收到时
PlayerSignOn | 一个玩家登陆时
PlayerSignOff | 一个玩家退出时
ChallengeIssued | 挑战发起时
BattleBegin | 一场战斗开始时
BattleOver | 一场战斗结束时
PlayerKick | 一个玩家被踢出时
PlayerBan | 一个玩家被禁入时(踢IP)
PlayerAway | 一个玩家变为离开状态时
TeamChange | 一个玩家更改自己的队伍时
Timer | 计时,一个比较特殊的事件,有自己的专门模式,不属于基本模式
-----------------------------
[Code]:命令,分两类,Command和Function,前者不返回任何数据,后者有返回结果。命令表太长,我放在后面。

变量:
Variables are created with the /Set command. As seen in List 1, the /Set command
has 2 arguments: !var and !val. The first argument is special in that it CANNOT
be a simple numerical or text value. It must be a variable. If the variable referred
to does not yet exist, the /Set command will create it for you. Either way, the
value of !val will then be stored in this variable. This argument may be omitted,
in which case 0 or "" will be assumed, depending on the variable's type. !val may
also be a variable, if you wish to set one variable equal to another.

There are two types of variables: Text variables and Number variables.
When refering to a Text variable, put a "$" before its name. For a number variable,
put a "#" before its name. Variable names must consist of only letters. You may
observe variables and their values in the Variables tab of the Script Window.

特殊变量(一些很有用的变量)表:
----------------------------------------------------------
事件名 | #Source的值 | #Target的值 | $Message的值
ServerStartup | N/A | N/A | N/A
NewMessage | N/A | N/A | 增加的信息
ChatMessage | 发送者 | N/A | 聊天信息
PlayerSignOn | 玩家编号 | N/A | N/A
PlayerSignOff | 玩家编号 | N/A | N/A
ChallengeIssued | 挑战发起者 | 被挑战者 | 规则信息(注)
BattleBegin | 玩家1 | 玩家2 | N/A
BattleOver | 胜利者 | 失败者 |"TIE"或者"WIN"(好像是根据胜负决定)
PlayerKick | 踢人者 | 被踢者号码 | N/A
PlayerBan | 使别人禁入者 | 被禁入者号码 | N/A
PlayerAway | 玩家号码 | N/A | N/A
TeamChange | 玩家号码 | N/A | N/A
Timer | N/A | N/A | N/A
-----------------------------------------------------------
(N/A表示0或空文本(""))
注:这个用途是我从官方论坛找到的,似乎是新版本中才有的用途。。。具体用法:此时$Message为一串2进制字符串,每个位置上的字为1/0表示该规则被选中/未选中,如第一位表示Sleep Clause,第七位表示Battle Timeout等。这个在那个txt中似乎没有。。。


IF-ELSE-ENDIF结构:
-----------------------------
If [Value1] [Operator] [Value2]
[Commands]
Else
[Other Commands]
EndIf
-----------------------------

[Operator]就是判断符:
-----------------------------
= | 等于
== | 等于(对文本有效)
<> | 不等于
> | 大于
< | 小于
>= | 不小于
<= | 不大于
-----------------------------
这个结构就是当[Value1] [Operator] [Value2]成立时执行[Commands],否则执行[Other Commands]。

也可以if后加判断语句,例:
-----------------------------
Event -PlayerSignOn
If #HasPoke(#Source, 150) = 1 AND #GetPlayerInfo(#Source, AUTH) = 0
/SendPM #Source, "Mewtwo is not allowed here!"
/Kick #Source
Else
/SendPM #Source, "Your team is valid and ready for battling!"
EndIf
End Event
-----------------------------
这个程序的作用是禁止使用150号精灵的普通用户进入服务器

四种逻辑判断符
-----------------------------
AND | 二者都为真则为真
OR | 二者至少一个为真则为真
XOR | 二者有且仅有一个为真则为真
EQV | 二者同真假则为真
-----------------------------


Timer(计时)结构:
-----------------------------
Event Timer [Interval]
[Code]
EndEvent
-----------------------------
[Interval]:表示间隔时间长短,大小1~86400
这个的作用是每[Interval]秒执行一次[Code]



GoTo指令:跳跃到指定标记点,标记点需要在程序中用":abc"(不含引号,abc为标记名)表示,GoTo的使用格式是GoTo abc。
例:
-----------------------------
Event +ChatMessage
If $Message = "Countdown"
/Set #X, 5
:Loop
/? $Str(#X)
/Inc #X, -1
If #X <> 0
GoTo Loop
EndIf
/? "Blast Off!!"
EndIf
End Event
-----------------------------
这个程序的作用是只要输入Countdown就显示如下字符:
5
4
3
2
1
Blast Off!!

禁止神兽的方法


-----------------------------
Event -PlayerSignOn
If #HasPoke(#Source, [a1]) = 1 OR #HasPoke(#Source, [a2]) OR #HasPoke(#Source, [a3]) …………
/SendPM #Source, "Ubers is not allowed here!"
/Kick #Source
Else
/SendPM #Source, "Your team is valid and ready for battling!"
EndIf
End Event
-----------------------------
[a1],[a2],[a3]。。。是神兽的号码(比如要禁超梦就是150),这个是禁止带神兽的进入,如果要防止在服务器内改队伍而带上神兽的话:

-----------------------------
Event +TeamChange
If #HasPoke(#Source, [a1]) = 1 OR #HasPoke(#Source, [a2]) OR #HasPoke(#Source, [a3]) …………
/SendPM #Source, "Ubers is not allowed here!"
/Kick #Source
Else
/SendPM #Source, "Your team is valid and ready for battling!"
EndIf
End Event
-----------------------------
一旦改队伍时加入神兽就踢出,够狠把 (以上两段需要同时使用)

还有一种比较温和的禁止法,建议采用:(效果是带神兽的不能发起或收到挑战)
-----------------------------
Event -ChallengeIssued
If #HasPoke(#Source, [a1]) = 1 OR #HasPoke(#Source, [a2]) OR #HasPoke(#Source, [a3]) ………… OR #HasPoke(#Target, [a1]) = 1 OR #HasPoke(#Target, [a2]) OR #HasPoke(#Target, [a3])…………
/SendPM #Source, "Ubers is not allowed here!"
/Kick #Source
Else
/SendPM #Source, "Your team is valid and ready for battling!"
EndIf
End Event
-----------------

[1] [2] [3] [4] [5] 下一页

打印Netbattle自建服务器方法[4/03更新]

标签:Netbattle自建服务器方法[4/03更新]

标签作用:您可在百度、GOOGLE等搜索引擎以及本站搜索中直接输入该标签直接找到该文章图片哦!
Netbattle自建服务器方法[4/03更新]内容由游戏攻略网WWW.YXGLW.COM)网络收集整理,如有违反您的权益,请与我们联系,我们将删除该图文,谢谢!

网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

姓 名:
评 分: 1分 2分 3分 4分 5分
评论内容:
 1.严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
 2.用户需对自己在使用Sj263网服务过程中的行为承担法律责任。
 3.本站管理员有权保留或删除评论内容。
 4.评论内容只代表网友个人观点,与本网站立场无关。

热门文章

游戏攻略网是个专业的网游世界,电视游戏,单机游戏,手机游戏,游戏资讯游戏操作学习平台,欢迎您的光临!

广告热线:13968683723 客服QQ:106079595 MSN:chenxuijian@Hotmail.com
Copyright (c) 2005-2008 www.yxglw.com, All Rights Reserved