From 6b2110b9f50bbbaf6d8de5a61b7322df242cf093 Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 30 Sep 2020 11:39:05 +0200 Subject: [PATCH] update alch --- data/msg_rules.json | 2 +- data/obj_item/02.alch.base.json | 110 +++++++++++++++++++++++++++++++ data/obj_item/02.alch.craft.json | 48 +++++++++++++- msg.go | 2 +- 4 files changed, 159 insertions(+), 3 deletions(-) diff --git a/data/msg_rules.json b/data/msg_rules.json index 4c71c7a..dbb3754 100644 --- a/data/msg_rules.json +++ b/data/msg_rules.json @@ -490,7 +490,7 @@ { "prio": 5000, "descn": "Alch stock Ack", - "rule": "^📦Your stock:(?P(\\n\\/aa_[0-9]{2} [a-zA-Z ']+ x [0-9]+)+)$", + "rule": "^📦Your stock:(?P(\\n\\/aa_[a-z0-9]{2,3} [a-zA-Z ']+ x [0-9]+)+)$", "msg_type": "msg_alch_stock_ack", "chat_id": 0, "user_id": 0 diff --git a/data/obj_item/02.alch.base.json b/data/obj_item/02.alch.base.json index db72d39..b248dc0 100644 --- a/data/obj_item/02.alch.base.json +++ b/data/obj_item/02.alch.base.json @@ -262,5 +262,115 @@ "names": [ "Mammoth Dill" ] + }, + { + "item_type": "item_alch", + "code": "70", + "weight": 1, + "exchange": "/t_70", + "auction": false, + "craftable": false, + "names": [ + "Suklencia" + ] + }, + { + "item_type": "item_alch", + "code": "71", + "weight": 1, + "exchange": "/t_71", + "auction": false, + "craftable": false, + "names": [ + "Eglalica" + ] + }, + { + "item_type": "item_alch", + "code": "72", + "weight": 1, + "exchange": "/t_72", + "auction": false, + "craftable": false, + "names": [ + "Yoccuran" + ] + }, + { + "item_type": "item_alch", + "code": "73", + "weight": 1, + "exchange": "/t_73", + "auction": false, + "craftable": false, + "names": [ + "Macrider" + ] + }, + { + "item_type": "item_alch", + "code": "76", + "weight": 1, + "exchange": "/t_76", + "auction": false, + "craftable": false, + "names": [ + "Teclia Shot" + ] + }, + { + "item_type": "item_alch", + "code": "77", + "weight": 1, + "exchange": "/t_77", + "auction": false, + "craftable": false, + "names": [ + "Pygmy Spice" + ] + }, + { + "item_type": "item_alch", + "code": "78", + "weight": 1, + "exchange": "/t_78", + "auction": false, + "craftable": false, + "names": [ + "Assagane" + ] + }, + { + "item_type": "item_alch", + "code": "79", + "weight": 1, + "exchange": "/t_79", + "auction": false, + "craftable": false, + "names": [ + "Ripheokam" + ] + }, + { + "item_type": "item_alch", + "code": "80", + "weight": 1, + "exchange": "/t_80", + "auction": false, + "craftable": false, + "names": [ + "Gonitro" + ] + }, + { + "item_type": "item_alch", + "code": "81", + "weight": 1, + "exchange": "/t_81", + "auction": false, + "craftable": false, + "names": [ + "Void Moss" + ] } ] \ No newline at end of file diff --git a/data/obj_item/02.alch.craft.json b/data/obj_item/02.alch.craft.json index a832fa6..9e21ea6 100644 --- a/data/obj_item/02.alch.craft.json +++ b/data/obj_item/02.alch.craft.json @@ -197,5 +197,51 @@ } ] } - } + }, + { + "item_type": "item_alch", + "code": "74", + "weight": 1, + "exchange": "/t_74", + "auction": false, + "craftable": true, + "names": [ + "Sapphire Dust", + "Sapphire dust" + ], + "craft": { + "cmd": "/brew_74", + "mana": 100, + "items": [ + { + "code": "07", + "quantity": 7 + }, + { + "code": "15", + "quantity": 3 + }, + { + "code": "70", + "quantity": 1 + }, + { + "code": "67", + "quantity": 1 + } + ] + } + }, + { + "item_type": "item_alch", + "code": "75", + "weight": 1, + "exchange": "/t_75", + "auction": false, + "craftable": true, + "names": [ + "Ruby Dust", + "Ruby dust" + ] + } ] \ No newline at end of file diff --git a/msg.go b/msg.go index 9b71107..d28cdba 100644 --- a/msg.go +++ b/msg.go @@ -100,7 +100,7 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha cwm := ChatWarsMessageStockAnyAck{} items := []ChatWarsItems{} - re := regexp.MustCompile(`\n\/aa_([0-9]{2}) ([a-zA-Z ']+) x ([0-9]+)`) + re := regexp.MustCompile(`\n\/aa_([a-z0-9]{2,3}) ([a-zA-Z ']+) x ([0-9]+)`) for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stuff}"), -1) { i := getObjItemID(l[1], ``) q, _ := strconv.ParseInt(l[3], 10, 64)