Browse Source

Add files via upload

PsykoDev 7 years ago
commit
447264c379
3 changed files with 56 additions and 0 deletions
  1. 34 0
      index.js
  2. 10 0
      manifest.json
  3. 12 0
      module.json

+ 34 - 0
index.js

@@ -0,0 +1,34 @@
+module.exports = function FF(mod) {
+	let unlock = false
+	
+	mod.hook('S_ABNORMALITY_BEGIN', 4, event => {
+		if (!mod.game.me.is(event.target)) return
+		if (event.id === 30010000) unlock = true
+	})
+		
+	mod.hook('S_ABNORMALITY_END', 1, event => {
+		if (!mod.game.me.is(event.target)) return
+		if (event.id === 30010000) unlock = false
+	})
+	
+	mod.game.me.on('change_zone', (zone, quick) => {
+		if (zone === 2000 && !unlock) {
+			unlock = true
+			mod.send('S_ABNORMALITY_BEGIN', 4, {
+				target: mod.game.me.gameId,
+				source: mod.game.me.gameId,
+				id: 30010000,
+				duration: 0x7FFFFFFF,
+				stacks: 1
+			})
+		}
+		
+		if (zone !== 2000 && unlock) {
+			unlock = false
+			mod.send('S_ABNORMALITY_END', 1, {
+				target: mod.game.me.gameId,
+				id: 30010000
+			})
+		}
+	})
+}

+ 10 - 0
manifest.json

@@ -0,0 +1,10 @@
+{
+    "files": {
+        "index.js": "7564adc6d4d8749b09110570eed2072c2a7d5215e52051ab031f5bdeca6aa8e4",
+        "module.json": "52372c85fdc37fabc9f60d974b4cf68910dafe4b72cb0e953f700161f2dcc34b"
+    },
+    "defs": {
+        "S_ABNORMALITY_BEGIN": 4,
+        "S_ABNORMALITY_END": 1
+    }
+}

+ 12 - 0
module.json

@@ -0,0 +1,12 @@
+{
+    "name": "FF",
+    "options": {
+        "niceName": "FF",
+        "guiName": "FF"
+    },
+    "author": "PsykoDev",
+    "description": "Free Flight on Exodor",
+    "servers": ["https://raw.githubusercontent.com/PsykoDev/FF/master/"],
+    "supportUrl": "https://github.com/PsykoDev/FF/issues",
+    "version": "87.05"
+}