From 338d7660c319dd6616c04002adb5262eb64c4b60 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 10 Oct 2019 17:47:51 +0800 Subject: [PATCH] update --- def.go | 3 +++ rules.go | 21 +++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/def.go b/def.go index fb65992..6080248 100644 --- a/def.go +++ b/def.go @@ -471,6 +471,9 @@ const ( objSubTypeMessageQuestReq = 390 // quest objSubTypeMessageQuestAck = 391 // forest/swamp/valley/arena objSubTypeMessageBattle = 392 // wind is howling + objSubTypeMessageOrderCancelReq = 393 // /rm_xxx + objSubTypeMessageOrderCancelAck = 394 // Cancelling order + objSubTypeMessageStaminaRestored = 395 // Stamina Restored objSubTypeMessageTopReq = 394 objSubTypeJobPillage = 601 objSubTypeJobTribute = 602 diff --git a/rules.go b/rules.go index 252a558..665c52e 100644 --- a/rules.go +++ b/rules.go @@ -185,6 +185,7 @@ func resetMsgParsingRules() { ,(5000, ` + strconv.Itoa(objSubTypeMessageGStockOthReq) + `, "Guild stock other Req", "^/g_stock_other$") ,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "Guild stock any Ack", "^Guild Warehouse:(?P(\\n[0-9a-z]+ (.*) x ([0-9]+))+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageBusy) + `, "Too busy now", "^You are too busy with a different adventure. Try a bit later.$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageStaminaRestored) + `, "Stamina Restored", "^Stamina restored//. You are ready for more adventures!$") ,(5000, ` + strconv.Itoa(objSubTypeMessageResStockReq) + `, "Resources Stock Req #1", "^📦Resources$") ,(5000, ` + strconv.Itoa(objSubTypeMessageResStockReq) + `, "Resources Stock Req #2", "^/stock$") ,(5000, ` + strconv.Itoa(objSubTypeMessageAlchStockReq) + `, "Alchemy Stock Req", "^⚗️Alchemy$") @@ -217,7 +218,9 @@ func resetMsgParsingRules() { `/t coal\\n\\n` + `Your deals \\((?P[0-9]+)/(?P[0-9]+)\\):\\n` + `(?P(?s:.*))\\n` + - `Your last 10 comitted trades: /trades$") + `Your last 10 comitted trades: /trades$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageOrderCancelReq) + `, "Order Cancel Req", "^/rm_(?P[a-z0-9]+)$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageOrderCancelAck) + `, "Order Cancel Ack", "^Cancelling order$") ,(5000, ` + strconv.Itoa(objSubTypeMessageEquipGearReq) + `, "Equip Req", "^/on_(?P[a-z0-9]+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageEquipGearAck) + `, "Equip Ack", "^Item equipped: (?P.+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageUnequipGearReq) + `, "Unequip Req", "^/off_(?P[a-z0-9]+)$") @@ -325,13 +328,23 @@ func resetMsgParsingRules() { ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestResult) + `, "Quest result #97", "^As you were about to head out for an adventure, you got a feeling you were forgetting something, so you wasted some time trying to remember what it was\\. Finally you gave up and stayed home\.$") ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestReq) + `, "Quest Req", "^🗺Quests$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #0", "^🌲Forest [0-9]min\\n` + + `Many things can happen in the forest\\.\\n\\n` + + `🗡Foray 🔋🔋\\n` + + `Foray is a dangerous activity\\. Someone can notice you and may beat you up\\. But if you go unnoticed, you will acquire a lot of loot\\.$") ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #1", "^🌲Forest [0-9]min\\n` + `Many things can happen in the forest\\.\\n\\n` + + `🗡Foray 🔋🔋\\n` + + `Foray is a dangerous activity\\. Someone can notice you and may beat you up\\. But if you go unnoticed, you will acquire a lot of loot\\.\\n\\n` + + `📯Arena (🔒){0,1}\\n` + + `Arena isn't a place for the weak\\. Here you fight against other players and if you stand victorious, you acquire precious experience\\.$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #2", "^🌲Forest [0-9]min\\n` + + `Many things can happen in the forest\\.\\n\\n` + `🍄Swamp [0-9]min\\n` + `Who knows what is lurking in mud\\.\\n\\n` + `🗡Foray 🔋🔋\\n` + `Foray is a dangerous activity\\. Someone can notice you and may beat you up\\. But if you go unnoticed, you will acquire a lot of loot\\.$") - ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #1", "^🌲Forest [0-9]min\\n` + + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #3", "^🌲Forest [0-9]min\\n` + `Many things can happen in the forest\\.\\n\\n` + `🍄Swamp [0-9]min\\n` + `Who knows what is lurking in mud\\.\\n\\n` + @@ -339,7 +352,7 @@ func resetMsgParsingRules() { `Foray is a dangerous activity\\. Someone can notice you and may beat you up\\. But if you go unnoticed, you will acquire a lot of loot\\.\\n\\n` + `📯Arena (🔒){0,1}\\n` + `Arena isn't a place for the weak\\. Here you fight against other players and if you stand victorious, you acquire precious experience\\.$") - ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #2", "^🌲Forest [0-9]min\\n` + + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #4", "^🌲Forest [0-9]min\\n` + `Many things can happen in the forest\\.\\n\\n` + `🍄Swamp [0-9]min\\n` + `Who knows what is lurking in mud\\.\\n\\n` + @@ -349,7 +362,7 @@ func resetMsgParsingRules() { `Foray is a dangerous activity\\. Someone can notice you and may beat you up\\. But if you go unnoticed, you will acquire a lot of loot\\.\\n\\n` + `📯Arena (🔒){0,1}\\n` + `Arena isn't a place for the weak\\. Here you fight against other players and if you stand victorious, you acquire precious experience\\.$") - ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #3", "^🍂Mirkwood [0-9]min\\n` + + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestAck) + `, "Quest Ack #5", "^🍂Mirkwood [0-9]min\\n` + `A corrupted forest, inhabited by twisted creatures\.\\n\\n` + `.*The Dead Marshes [0-9]min\\n` + `The dead don't test\\.\\n\\n` +