2 Star 1 Fork 1

hacson/ACMS143_Scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
2008_3.js 2.91 KB
一键复制 编辑 原始数据 按行查看 历史
hacson 提交于 2018-08-24 22:03 . init
var head="#fUI/UIWindow2.img/Quest/quest_info/summary_icon/summary#\r\n",icon="#fUI/UIWindow2.img/QuestAlarm/BtQ/normal/0#",status=-1,mySpoints=-1,typed=0,I=null;function start(){I=new Invitation;0>mySpoints&&(mySpoints=I.getPoints());action(1,0,0)}function action(a,b,c){if(1==a)status++;else{if(0==status){cm.dispose();return}status--}0==status?(a=head+"\u6b22\u8fce\u4f60\u6765\u5230#b"+cm.getServerName()+"#k\uff0c\u9996\u5148\u6211\u8981\u95ee\u4f60\u4e00\u4e2a\u95ee\u9898\uff0c\u4f60\u662f\u4ece\u4f55\u5f97\u77e5#b"+cm.getServerName()+"#k\u7684\u5462\uff1f\r\n",a+="#b#L0#\u6211\u662f\u670b\u53cb\u4ecb\u7ecd\u6765\u7684\u3002#l\r\n#b#L1#\u6211\u662f\u81ea\u5df1\u627e\u5230\u7684\u3002#l\r\n",cm.sendSimple(a)):1==status?(typed=c,0==c?cm.sendGetText("\u8bf7\u8f93\u5165\u4f60\u670b\u53cb\u7684#e#r\u8d26\u53f7\uff1a"):1==c&&(cm.dispose(),cm.gainNX(2,1E3),cm.gainItem(1142073,1),cm.setBossLogAcc("\u63a8\u5e7f\u8bbe\u7f6e",-2),cm.warp(5E4,0))):2==status&&0==typed&&(a=cm.getText(),b=cm.getC().getAccountName(),a==b?(status=-1,cm.sendSimple("\u65e0\u6cd5\u4f7f\u7528\u81ea\u5df1\u7684\u8d26\u53f7\u3002")):I.checkAccountVaild(a)?I.setInvitation(a)?(cm.dispose(),cm.setBossLogAcc("\u63a8\u5e7f\u8bbe\u7f6e",-2),cm.gainNX(2,1E3),cm.gainItem(1142073,1),cm.warp(5E4,0)):(cm.setBossLogAcc("\u63a8\u5e7f\u8bbe\u7f6e",-2),cm.sendSimple("\u60a8\u5df2\u7ecf\u8bbe\u7f6e\u8fc7\u9080\u8bf7\u8005\u7684\u8d26\u53f7\uff0c\u65e0\u6cd5\u91cd\u590d\u8bbe\u7f6e\u3002"),status=-1):(cm.sendSimple("#r\u8be5\u8d26\u53f7\u4e0d\u5b58\u5728\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u3002#k"),status-=2))}var Invitation=function(){this.invitation=null;this.db=cm.getConnection();this.setInvitation=function(a){var b=cm.getPlayer().getAccountID(),c=this.db.prepareStatement("UPDATE accounts SET invitation \x3d ? WHERE id \x3d ? and (invitation is NULL or invitation \x3d '')");c.setString(1,a);c.setInt(2,b);a=0<c.executeUpdate()?!0:!1;c.close();return a};this.getInvitation=function(){if(null!=this.invitation)return this.invitation;var a=this.db.prepareStatement("SELECT invitation FROM accounts WHERE name \x3d ?"),b=cm.getC().getAccountName();a.setString(1,b);b=a.executeQuery();b.next()&&(this.invitation=b.getString("invitation"));b.close();a.close();return this.invitation};this.checkAccountVaild=function(a){var b=this.db.prepareStatement("SELECT count(id) as num FROM accounts WHERE name \x3d ?");b.setString(1,a);a=0;var c=b.executeQuery();c.next()&&(a=c.getInt("num"));c.close();b.close();return 0<a?!0:!1};this.getPoints=function(){var a=this.db.prepareStatement("SELECT spoints FROM accounts WHERE name \x3d ?"),b=cm.getPlayer().getAccountName();a.setString(1,b);var b=0,c=a.executeQuery();c.next()&&(b=c.getInt("spoints"));c.close();a.close();return b};this.gainPoints=function(a){var b=cm.getPlayer().getAccountID(),c=this.db.prepareStatement("UPDATE accounts SET spoints \x3d spoints + ? WHERE id \x3d ?");c.setString(1,a);c.setInt(2,b);a=0<c.executeUpdate()?!0:!1;c.close();return a}};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/hacson/ACMS143_Scripts.git
[email protected]:hacson/ACMS143_Scripts.git
hacson
ACMS143_Scripts
ACMS143_Scripts
master

搜索帮助