update alch

This commit is contained in:
shoopea 2020-09-30 11:39:05 +02:00
parent be0763ad81
commit 6b2110b9f5
4 changed files with 159 additions and 3 deletions

View File

@ -490,7 +490,7 @@
{ {
"prio": 5000, "prio": 5000,
"descn": "Alch stock Ack", "descn": "Alch stock Ack",
"rule": "^📦Your stock:(?P<Stuff>(\\n\\/aa_[0-9]{2} [a-zA-Z ']+ x [0-9]+)+)$", "rule": "^📦Your stock:(?P<Stuff>(\\n\\/aa_[a-z0-9]{2,3} [a-zA-Z ']+ x [0-9]+)+)$",
"msg_type": "msg_alch_stock_ack", "msg_type": "msg_alch_stock_ack",
"chat_id": 0, "chat_id": 0,
"user_id": 0 "user_id": 0

View File

@ -262,5 +262,115 @@
"names": [ "names": [
"Mammoth Dill" "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"
]
} }
] ]

View File

@ -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"
]
} }
] ]

2
msg.go
View File

@ -100,7 +100,7 @@ func parseSubTypeMessageAlchStockAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
cwm := ChatWarsMessageStockAnyAck{} cwm := ChatWarsMessageStockAnyAck{}
items := []ChatWarsItems{} 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) { for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stuff}"), -1) {
i := getObjItemID(l[1], ``) i := getObjItemID(l[1], ``)
q, _ := strconv.ParseInt(l[3], 10, 64) q, _ := strconv.ParseInt(l[3], 10, 64)