TeraProxy лет назад: 8
Родитель
Сommit
3ca4970cfa
4 измененных файлов с 89 добавлено и 90 удалено
  1. 52 56
      README.md
  2. 25 27
      index.js
  3. 5 4
      manifest.json
  4. 7 3
      module.json

+ 52 - 56
README.md

@@ -1,57 +1,53 @@
-##### :heavy_exclamation_mark: Status :heavy_exclamation_mark:
-Should work on all regions as long as the opcodes are mapped but I personally only test modules on NA with Caali's tera-proxy: https://discord.gg/maqBmJV  
-
-##### :heavy_exclamation_mark: Installation for Caali's tera-proxy :heavy_exclamation_mark:
-1) Download AFKer: https://github.com/TeraProxy/AFKer/archive/master.zip
-2) Extract the contents of the zip file into "\tera-proxy\bin\node_modules\"
-3) Done! (the module will auto-update when a new version is released)
-
-##### :heavy_exclamation_mark: Installation for PinkiePie's tera-proxy :heavy_exclamation_mark:
-1) Update your tera-data: https://github.com/meishuu/tera-data
-2) Download AFKer: https://github.com/TeraProxy/AFKer/archive/master.zip
-3) Extract the contents of the zip file into "\tera-proxy\bin\node_modules\"
-4) Done!
-5) Check back here once in a while for updates
-  
-If you enjoy my work and wish to support future development, feel free to drop me a small donation: [![Donate](https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_100x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=A3KBZUCSEQ5RJ&lc=US&item_name=TeraProxy&curency_code=USD&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
-
-# AFKer
-A tera-proxy module that prevents you from getting back to the character select screen.  
-This has the side effect that the server's AFK check will not kick you out of the game.  
-
-## Usage
-The script is enabled by default and will prevent you from getting logged out when you are standing still for an hour.  
-Simply moving your character will reset the 1 hour timer and make you able to go back to character selection.  
-  
-While in game, open a proxy chat session by typing "/proxy" or "/8" in chat and hitting the space bar.  
-This serves as the script's command interface.  
-The following commands are supported:  
-  
-* afk - enable/disable AFKer
-
-## Safety
-Whatever you send to the proxy chat in game is intercepted client-side. The chat is NOT sent to the server.  
-
-## Changelog
-<details>
-
-### 1.2.4
-* [*] Fixed a weird case-sensitivity issue
-### 1.2.3
-* [+] You won't be logged out anymore when other players or NPCs move you (thanks to Owyn)
-* [+] Now supports auto-updating via Caali's tera-proxy
-### 1.2.2
-* [*] Updated hook versions for compatibility with the latest tera-proxy
-### 1.2.1
-* [*] Some code cleanup
-* [*] Full conversion to Pinkie Pie's command module
-### 1.2.0
-* [+] AFKer will now activate itself after standing still for an hour
-* [*] AFKer is now enabled by default
-* [+] Added support for Pinkie Pie's command module which is now a requirement
-### 1.1.0
-* [+] Added !afk command to toggle between "on" and "off" in non-whisper chats
-### 1.0.0
-* [~] Initial Release
-
+##### :heavy_exclamation_mark: Status :heavy_exclamation_mark:
+Should work on all regions as long as the opcodes are mapped but I personally only test modules on NA with Caali's tera-proxy: https://discord.gg/maqBmJV  
+
+##### :heavy_exclamation_mark: Installation for Caali's tera-proxy :heavy_exclamation_mark:
+1) Download AFKer: https://github.com/TeraProxy/AFKer/archive/master.zip
+2) Extract the contents of the zip file into "\tera-proxy\bin\node_modules\"
+3) Done! (the module will auto-update when a new version is released)
+  
+If you enjoy my work and wish to support future development, feel free to drop me a small donation: [![Donate](https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_100x26.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=A3KBZUCSEQ5RJ&lc=US&item_name=TeraProxy&curency_code=USD&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
+
+# AFKer
+A tera-proxy module that prevents you from getting back to the character select screen.  
+This has the side effect that the server's AFK check will not kick you out of the game.  
+
+## Usage
+The script is enabled by default and will prevent you from getting logged out when you are standing still for an hour.  
+Simply moving your character will reset the 1 hour timer and make you able to go back to character selection.  
+  
+While in game, open a proxy chat session by typing "/proxy" or "/8" in chat and hitting the space bar.  
+This serves as the script's command interface.  
+The following commands are supported:  
+  
+* afk - enable/disable AFKer
+
+## Safety
+Whatever you send to the proxy chat in game is intercepted client-side. The chat is NOT sent to the server.  
+
+## Changelog
+<details>
+
+### 1.2.5
+* [~] Code changes due to Caali's recent tera-proxy updates
+* [-] Removed support for Pinkie Pie's tera-proxy
+### 1.2.4
+* [*] Fixed a weird case-sensitivity issue
+### 1.2.3
+* [+] You won't be logged out anymore when other players or NPCs move you (thanks to Owyn)
+* [+] Now supports auto-updating via Caali's tera-proxy
+### 1.2.2
+* [*] Updated hook versions for compatibility with the latest tera-proxy
+### 1.2.1
+* [*] Some code cleanup
+* [*] Full conversion to Pinkie Pie's command module
+### 1.2.0
+* [+] AFKer will now activate itself after standing still for an hour
+* [*] AFKer is now enabled by default
+* [+] Added support for Pinkie Pie's command module which is now a requirement
+### 1.1.0
+* [+] Added !afk command to toggle between "on" and "off" in non-whisper chats
+### 1.0.0
+* [~] Initial Release
+
 </details>
 </details>

+ 25 - 27
index.js

@@ -1,28 +1,26 @@
-// Version 1.2.3
-
-const Command = require('command')
-
-module.exports = function afker(dispatch) {
-	let enabled = true,
-		lasttimemoved = Date.now()
-
-	dispatch.hook('C_PLAYER_LOCATION', 5, event => {
-		if([0,1,5,6].indexOf(event.type) > -1) // running / walking / jumping / jumping (steep terrain)
-			lasttimemoved = Date.now()
-	})
-
-	dispatch.hook('C_RETURN_TO_LOBBY', 'raw', () => {
-		if (enabled && Date.now() - lasttimemoved >= 3600000) return false // Prevents you from being logged out after not moving for 1 hour
-	})
-
-	// ################# //
-	// ### Chat Hook ### //
-	// ################# //
-
-	const command = Command(dispatch)
-	command.add('afk', () => {
-		enabled = !enabled
-		command.message('[AFKer] ' + (enabled ? '<font color="#56B4E9">enabled</font>' : '<font color="#E69F00">disabled</font>'))
-		console.log('[AFKer] ' + (enabled ? 'enabled' : 'disabled'))
-	})
+// Version 1.2.5
+
+module.exports = function afker(mod) {
+
+	let enabled = true,
+		lasttimemoved = Date.now()
+
+	mod.hook('C_PLAYER_LOCATION', 5, event => {
+		if([0,1,5,6].indexOf(event.type) > -1) // running / walking / jumping / jumping (steep terrain)
+			lasttimemoved = Date.now()
+	})
+
+	mod.hook('C_RETURN_TO_LOBBY', 'raw', () => {
+		if (enabled && Date.now() - lasttimemoved >= 3600000) return false // Prevents you from being logged out after not moving for 1 hour
+	})
+
+	// ################# //
+	// ### Chat Hook ### //
+	// ################# //
+
+	mod.command.add('afk', () => {
+		enabled = !enabled
+		mod.command.message((enabled ? '<font color="#56B4E9">enabled</font>' : '<font color="#E69F00">disabled</font>'))
+		console.log('[AFKer] ' + (enabled ? 'enabled' : 'disabled'))
+	})
 }
 }

+ 5 - 4
manifest.json

@@ -1,11 +1,12 @@
 {
 {
 	"files": {
 	"files": {
-		"index.js": "1659788f67877dcf7b55d658ef8a2395faacde75d457ab2721aaeda038cba07c",
 		"LICENSE": "589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2",
 		"LICENSE": "589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2",
-		"README.md": "b4786954e23e32613b9b4d01521db5c08b44e3a13d42b87fcd14a23c2a7d08b7",
-		"module.json": "09393206e0a735d475c615dfe6675648073beb6de495a23fa175ec20599e310d"
+		"README.md": "516be7384c3df8daa755165041fe0e2972885bc3d20a988226589d5eb4da9ac3",
+		"index.js": "f6d8cb12697eafbc7d6d004472341b797f9db81d9bcdb51e423fabc1bc2d6e52",
+		"module.json": "70512cd54442c8e5e42847e1dcea01747714199ff96179f472db8b7589e82abd"
 	},
 	},
 	"defs": {
 	"defs": {
-		"C_PLAYER_LOCATION": 5
+		"C_PLAYER_LOCATION": 5,
+		"C_RETURN_TO_LOBBY": "raw"
 	}
 	}
 }
 }

+ 7 - 3
module.json

@@ -1,4 +1,8 @@
-{
-    "servers": ["https://raw.githubusercontent.com/TeraProxy/AFKer/master/"],
-    "supportUrl": "https://github.com/TeraProxy/AFKer/issues"
+{
+    "disableAutoUpdate": false,
+    "options": {
+        "niceName": "AFKer"
+    },
+    "servers": ["https://raw.githubusercontent.com/TeraProxy/AFKer/master/"],
+    "supportUrl": "https://github.com/TeraProxy/AFKer/issues"
 }
 }