chirpnest/rules.go
2019-06-11 10:46:25 +08:00

156 lines
19 KiB
Go
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
"strconv"
)
func resetMsgParsingRules() {
_, err := db.Exec(`TRUNCATE TABLE msg_rules;`)
failOnError(err, "resetMsgParsingRules : truncate table msg_rules")
_, err = db.Exec(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule)
VALUES (5000, ` + strconv.Itoa(objSubTypeMessageReportAck) + `, "Player war report", "^(?P<Castle>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<User>([A-Za-z0-9 ]*)) ⚔:(?P<Attack>[0-9]+)(?P<AttackMod>\\((-|\\+)[0-9]+\\)){0,1} 🛡:(?P<Defense>[0-9]+) Lvl: (?P<Level>[0-9]+)\\n` +
`Your result on the battlefield:\\n` +
`(🔥Exp: (?P<Exp>[0-9]+)){0,1}(\\n)*` +
`(💰Gold: (?P<Gold>\\-{0,1}[0-9]+)){0,1}(\\n)*` +
`(📦Stock: (?P<Stock>\\-{0,1}[0-9]+)){0,1}(\\n)*` +
`(❤Hp: (?P<HP>\\-[0-9]+)){0,1}(\\n)*` +
`((?P<Stamina>(🔋Stamina restored))){0,1}(\\n(?P<Crit>(⚡Critical strike))){0,1}$")
,(5000, ` + strconv.Itoa(objSubTypeMessageAuctionAnnounce) + `, "Auction annouce", "^Lot #(?P<Lot>[0-9]+) : (?P<Item>.*)\\n(Quality: (?P<Quality>.*)\\n){0,1}(Condition: (?P<Cond>.*)\\n){0,1}Seller: (?P<SellerCastle>[🐉🦅🐺🦈🦌🥔🌑])( ){0,1}(\\[(?P<SellerGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<SellerUser>.*){0,1}\\nCurrent price: (?P<Price>[0-9]+) pouch\\(es\\)\\nBuyer: (None|(?P<BuyerCastle>[🐉🦅🐺🦈🦌🥔🌑])( ){0,1}(\\[(?P<BuyerGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<BuyerUser>.*){0,1})\\nEnd At: (?P<End>.*)\\nStatus: (?P<Status>.*)(\\n)*(?s:.*)")
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeAck) + `, "Time", "^In Chat Wars world now\\n(?P<Time>.*)\\n(?P<Hour>[0-9]{2}):(?P<Minute>[0-9]{2})\\n(?P<Day>[0-9]{2}) (?P<Month>.+) (?P<Year>[0-9]{4})\\n(?s:.*)$")` +
`,(5000, ` + strconv.Itoa(objSubTypeMessageMiniWar) + `, "Mini War", "^⛳Battle results:\\n` +
`(?P<Gardian1>🔱){0,1}.*(?P<Loot1>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result1>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold1>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock1>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian2>🔱){0,1}.*(?P<Loot2>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result2>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold2>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock2>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian3>🔱){0,1}.*(?P<Loot3>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result3>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold3>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock3>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian4>🔱){0,1}.*(?P<Loot4>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result4>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold4>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock4>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian5>🔱){0,1}.*(?P<Loot5>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result5>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold5>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock5>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian6>🔱){0,1}.*(?P<Loot6>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result6>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold6>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock6>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`(?P<Gardian7>🔱){0,1}.*(?P<Loot7>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)):(?P<Result7>[^\\x{1F4B0}\\x{1F4E6}]*)((?P<Gold7>(\\-|\\+)[0-9]+)\\x{1F4B0}){0,1}[ ]*((?P<Stock7>(\\-|\\+)[0-9]+)\\x{1F4E6}){0,1}\\n` +
`\\n🏆Scores:\\n` +
`.*(?P<Score1>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points1>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score2>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points2>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score3>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points3>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score4>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points4>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score5>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points5>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score6>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points6>\\+([0-9]+|NaN))\\n` +
`.*(?P<Score7>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)): (?P<Points7>\\+([0-9]+|NaN))\\n` +
`(?s:.*)` +
`Battle (?P<Time>[0-9]{2}/[0-9]{2}/[0-9]{2} [0-9]{2}:[0-9]{2})$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePillageInc) + `, "Pillage Inc", "^You were strolling around on your horse when you noticed (\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<Attacker>.*) of .{1}(?P<Castle>(Moonlight|Wolfpack|Deerhorn|Dragonscale|Sharkteeth|Potato|Highnest)) Castle trying to pillage a local village. To stop him click /go$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGo) + `, "Go", "^/go$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePillageGo) + `,"Pillage Go", "^You lift up your sword and charge at the violator.$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePillageWin) + `,"Pillage Win", "^You successfully defeated (\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<Attacker>.*). As he was crawling away, you picked up some of the gold he left behind. Received (?P<Gold>[0-9]+) gold and (?P<Exp>[0-9]+) exp.$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePillageTimeout) + `,"Pillage Timeout", "^You\\'ve failed to protect the villagers. No more rewards for you.$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePillageLoss) + `,"Pillage Loss", "^You let (\\[(?P<Guild>[A-Z0-9]{1,3})\\]){0,1}(?P<Attacker>.*) go and he pillaged the village. We hope you feel terrible.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageDuelFight) + `, "Duel Fight result #2", "(?P<Life1>(\\-){0,1}[0-9]+).*(?P<Castle1>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild1>[A-Z0-9]{1,3})\\]){0,1}(?P<Duelist1>.*)\\n` +
`VS\\n` +
`(?P<Life2>(\\-){0,1}[0-9]+).*(?P<Castle2>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild2>[A-Z0-9]{1,3})\\]){0,1}(?P<Duelist2>.*)\\n` +
`(?s:.*)\\n` +
`(\\[(?P<WinGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<WinDuelist>.*) from .*(?P<WinCastle>[🐉🦅🐺🦈🦌🥔🌑]).* Castle stands victorious over (\\[(?P<LossGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<LossDuelist>.*) from .*(?P<LossCastle>[🐉🦅🐺🦈🦌🥔🌑]).* Castle, with blood slowly dripping from his (?P<Weapon>.*).\\n` +
`You received: (?P<Exp>[0-9]+) exp.\\n` +
`(?s:.*)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageDuelFight) + `, "Duel Fight result #1", "(?P<Life1>(\\-){0,1}[0-9]+).*(?P<Castle1>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild1>[A-Z0-9]{1,3})\\]){0,1}(?P<Duelist1>.*)\\n` +
`VS\\n` +
`(?P<Life2>(\\-){0,1}[0-9]+).*(?P<Castle2>[🐉🦅🐺🦈🦌🥔🌑])(\\[(?P<Guild2>[A-Z0-9]{1,3})\\]){0,1}(?P<Duelist2>.*)\\n` +
`(?s:.*)\\n` +
`(\\[(?P<WinGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<WinDuelist>.*) from .*(?P<WinCastle>[🐉🦅🐺🦈🦌🥔🌑]).* Castle was stronger than (\\[(?P<LossGuild>[A-Z0-9]{1,3})\\]){0,1}(?P<LossDuelist>.*) from .*(?P<LossCastle>[🐉🦅🐺🦈🦌🥔🌑]).* Castle.\\n` +
`You received: (?P<Exp>[0-9]+) exp.\\n` +
`(?s:.*)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageReportReq) + `, "Report request", "^/report$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGReportReq) + `, "Guild report request", "^/g_report$")
,(5000, ` + strconv.Itoa(objSubTypeMessageHeroReq) + `, "Hero request", "^/hero$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMeReq) + `, "Me request", "^🏅Me$")
,(5000, ` + strconv.Itoa(objSubTypeMessageInventoryReq) + `, "Inventory request", "^/inv$")
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeReq) + `, "Time request", "^/time$")
,(5000, ` + strconv.Itoa(objSubTypeMessagePledge) + `, "Pledge", "^/pledge$")
,(5000, ` + strconv.Itoa(objSubTypeMessageBuyReq) + `, "Buy request", "^/wtb_(?P<Item>[0-9]+)(_(?P<Quantity>[0-9]+)){0,1}$")
,(5000, ` + strconv.Itoa(objSubTypeMessageSellReq) + `, "Sell request", "^/wts_(?P<Item>[0-9]+)(_(?P<Quantity>[0-9]+)(_(?P<Price>[0-9]+)){0,1}){0,1}$")
,(5000, ` + strconv.Itoa(objSubTypeMessageOrderbookReq) + `, "Orderbook request", "^/t_(?P<Item>[0-9]+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageOrderbookAck) + `, "Orderbook request", "^$")
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawReq) + `, "Withdraw Req", "^/g_withdraw( )+(?P<Item1>[a-z0-9]+)( )+(?P<Quantity1>[0-9]+)` +
`(( )+(?P<Item2>[a-z0-9]+)( )+(?P<Quantity2>[0-9]+)){0,1}` +
`(( )+(?P<Item3>[a-z0-9]+)( )+(?P<Quantity3>[0-9]+)){0,1}` +
`(( )+(?P<Item4>[a-z0-9]+)( )+(?P<Quantity4>[0-9]+)){0,1}` +
`(( )+(?P<Item5>[a-z0-9]+)( )+(?P<Quantity5>[0-9]+)){0,1}` +
`(( )+(?P<Item6>[a-z0-9]+)( )+(?P<Quantity6>[0-9]+)){0,1}` +
`(( )+(?P<Item7>[a-z0-9]+)( )+(?P<Quantity7>[0-9]+)){0,1}` +
`(( )+(?P<Item8>[a-z0-9]+)( )+(?P<Quantity8>[0-9]+)){0,1}$")
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawCode) + `, "Withdraw Code #1", "^Withdrawing (?P<Item1>.*) x (?P<Quantity1>.*). Recipient shall send to bot:\\n` +
`/g_receive [a-z0-9]+$")
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawCode) + `, "Withdraw Code #2", "^Withdrawing:\\n` +
`(?P<Item1>.*) x (?P<Quantity1>.*)\\n` +
`((?P<Item2>.*) x (?P<Quantity2>.*)\\n){0,1}` +
`((?P<Item3>.*) x (?P<Quantity3>.*)\\n){0,1}` +
`((?P<Item4>.*) x (?P<Quantity4>.*)\\n){0,1}` +
`((?P<Item5>.*) x (?P<Quantity5>.*)\\n){0,1}` +
`((?P<Item6>.*) x (?P<Quantity6>.*)\\n){0,1}` +
`((?P<Item7>.*) x (?P<Quantity7>.*)\\n){0,1}` +
`((?P<Item8>.*) x (?P<Quantity8>.*)\\n){0,1}` +
`Recipient shall send to bot:\\n` +
`/g_receive [a-z0-9]+$")
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawRcv) + `, "Withdraw Received #1", "^Received (?P<Item1>.*) x (?P<Quantity1>.*)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawRcv) + `, "Withdraw Received #2", "^Received:` +
`(\\n(?P<Item1>.*) x (?P<Quantity1>.*))` +
`(\\n(?P<Item2>.*) x (?P<Quantity2>.*)){0,1}` +
`(\\n(?P<Item3>.*) x (?P<Quantity3>.*)){0,1}` +
`(\\n(?P<Item4>.*) x (?P<Quantity4>.*)){0,1}` +
`(\\n(?P<Item5>.*) x (?P<Quantity5>.*)){0,1}` +
`(\\n(?P<Item6>.*) x (?P<Quantity6>.*)){0,1}` +
`(\\n(?P<Item7>.*) x (?P<Quantity7>.*)){0,1}` +
`(\\n(?P<Item8>.*) x (?P<Quantity8>.*)){0,1}$")
,(5000, ` + strconv.Itoa(objSubTypeMessageDepositReq) + `, "Deposit Req", "^/g_deposit (?P<Item>[a-z0-9]+) (?P<Quantity>[0-9]+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageDepositAck) + `, "Deposit Ack #2", "^Deposited successfully: (?P<Item>.*) \\((?P<Quantity>[0-9]+)\\)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageDepositAck) + `, "Deposit Ack #1", "^Deposited (?P<Item>.*) \\((?P<Quantity>[0-9]+)\\) successfully$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockReq) + `, "Stock Req", "^/stock$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMiscReq) + `, "Misc Req", "^/misc$")` + /*
,(5000, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war report", "^(🏠Trade union news:\\n){0,1}` +
`(((?P<Union>[A-Z][a-z]+ [A-Z][a-z]+) was (?P<StatusUnion>(easily defended|defended successfully|breached.|easily breached.|closely breached.))( Attackers have pillaged union for (?P<Loot>[0-9]+) stock){0,1}:\\n` +
`(🎖Attack leaders: (?P<AtkUnionCastle1>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkUnionUser1>[^,]+)(,(?P<AtkUnionCastle2>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkUnionUser2>[^,]+)){0,1}(,(?P<AtkUnionCastle3>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkUnionUser3>[^,]+)){0,1}(,(?P<AtkUnionCastle4>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkUnionUser4>[^,]+)){0,1}){0,1}(\\n){0,1}` +
`(🎖Defense leaders: (?P<DefUnionCastle1>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefUnionUser1>[^,]+)(,(?P<DefUnionCastle2>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefUnionUser2>[^,]+)){0,1}(,(?P<DefUnionCastle3>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefUnionUser3>[^,]+)){0,1}(,(?P<DefUnionCastle4>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefUnionUser4>[^,]+)){0,1}){0,1}(\\n){0,1})(\\n)*)*` +
`(🎪State of exclusive rights:\\n){0,1}` +
`((?P<Fair>[A-Z][a-z]+ [A-Z][a-z]+) (?P<StatusFair>(was protected|belongs to)( (?P<Attacker>[A-Z][a-z]+ [A-Z][a-z]+):)\\n` +
`(🎖Attack leaders: (?P<AtkFairCastle1>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkFairUser1>[^,]+)(,(?P<AtkFairCastle2>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkFairUser2>[^,]+)){0,1}(,(?P<AtkFairCastle3>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkFairUser3>[^,]+)){0,1}(,(?P<AtkFairCastle4>[🐉🦅🐺🦈🦌🥔🌑])(?P<AtkFairUser4>[^,]+)){0,1}){0,1}(\\n){0,1}` +
`(🎖Defense leaders: (?P<DefFairCastle1>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefFairUser1>[^,]+)(,(?P<DefFairCastle2>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefFairUser2>[^,]+)){0,1}(,(?P<DefFairCastle3>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefFairUser3>[^,]+)){0,1}(,(?P<DefFairCastle4>[🐉🦅🐺🦈🦌🥔🌑])(?P<DefFairUser4>[^,]+)){0,1}){0,1}(\\n){0,1})(\\n)*)*` +
`$")*/`
,(5000, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war report", "^(🏠Trade union news:\\n){0,1}` +
`((([A-Z][a-z]+ [A-Z][a-z]+) was ((easily defended|defended successfully|breached.|easily breached.|closely breached.))( Attackers have pillaged union for ([0-9]+) stock){0,1}:\\n` +
`(🎖Attack leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1}` +
`(🎖Defense leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1})(\\n)*)*` +
`(🎪State of exclusive rights:\\n){0,1}` +
`(([A-Z][a-z]+ [A-Z][a-z]+) ((was protected|belongs to)( ([A-Z][a-z]+ [A-Z][a-z]+):)\\n` +
`(🎖Attack leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1}` +
`(🎖Defense leaders: ([🐉🦅🐺🦈🦌🥔🌑])([^,]+)(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}(,([🐉🦅🐺🦈🦌🥔🌑])([^,]+)){0,1}){0,1}(\\n){0,1})(\\n)*)*` +
`$")
,(5000, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep with both", "^(🏠Trade union news:\n)(?P<Union>(?s:.*))(🎪State of exclusive rights:\n)(?P<Fair>(?s:.*))$")
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only union", "^(🏠Trade union news:\n)(?P<Union>(?s:.*))(🎪State of exclusive rights:\n){0}(?P<Fair>(?s:.*))$")
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only fair", "^(🏠Trade union news:\n){0}(?P<Union>(?s:.*))(🎪State of exclusive rights:\n)(?P<Fair>(?s:.*))$")
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeout) + `, "Generic timeout", "^Too late. Action is not available.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMeAck) + `, "Me ack", "^(?s:.*)Battle(.*)of the seven castles in .*!\\n(?s:.*)\\n(?P<CastleIcon>.)(\\[(?P<Guild>[A-Z0-9]+)\\]){0,1}(?P<Player>.*?) ((?P<Class>(Knight|Ranger|Sentinel|Collector|Blacksmith|Alchemist|Esquire|Master)) ){0,1}of (?P<Castle>[a-zA-Z]*) Castle\\n.+?Level: (?P<Level>[0-9]+)\\n.+?Atk: (?P<Atk>[0-9]+) .+?Def: (?P<Def>[0-9]+)\\n.+?Exp: (?P<ExpNow>[0-9]+)\\/(?P<ExpLvl>[0-9]+)\\n(.+?Hp: (?P<HPNow>[0-9]+)\\/(?P<HPMax>[0-9]+).*\\n){0,1}.+?Stamina: (?P<StaminaNow>[0-9]+)\\/(?P<StaminaMax>[0-9]+).*?\\n(.+?(?P<Gold>(-){0,1}[0-9]+)){0,1}( .+?(?P<Pogs>[0-9]+)){0,1}( .+?(?P<Gems>[0-9]+)){0,1}\\n\\n(.*?)(🎽Equipment \\+(?P<AtkGear>[0-9]+).\\+(?P<DefGear>[0-9]+).){0,1}\\n🎒Bag: (?P<BagUsed>[0-9]+)\\/(?P<BagDispo>[0-9]+) \\/inv\\n\\nState:\\n(?P<State>.*)\\n\\nMore: \\/hero(?s:.*)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Forest", "^In a dire need for an adventure, you went to a (?P<Place>[a-zA-Z ]+). You'll be back in (?P<Time>[0-9]+) minutes.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Mirkwood", "^You went to the (?P<Place>[a-zA-Z ]+). Beware of spooders. Back in (?P<Time>[0-9]+) minutes$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Village", "^Feeling an unsatisfiable lust for violence you set off to the nearest (?P<Place>[a-zA-Z ]+). You will reach the nearest one in (?P<Time>[0-9]+) minutes$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Swamp", "^An adventure is calling. But you went to a (?P<Place>[a-zA-Z ]+). You'll be back in (?P<Time>[0-9]+) minutes.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Dead Marshes", "^You went to the (?P<Place>[a-zA-Z ]+). The dead are near. Back in (?P<Time>[0-9]+) minutes$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Mountain", "^(?P<Place>[a-zA-Z ']+) can be a dangerous place. You decided to investigate, what's going on. You'll be back in (?P<Time>[0-9]+) minutes.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGoQuestAck) + `, "Go Quest Ack Devil's Valley", "^You went to the (?P<Place>[a-zA-Z ']+). Don't lose your soul. Back in (?P<Time>[0-9]+) minutes$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGRolesReq) + `, "Guild roles Req", "^/g_roles$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGRolesAck) + `, "Guild roles Req", "^Roles:\\nBartender:\\n(?P<Bartender>.*)\\n\\n\\nCommander:\\n(?P<Commander>.*)\\n\\n\\nSquire:\\n(?P<Squire>.*)\\n\\n\\nTreasurer:\\n(?P<Treasurer>.*)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockReq) + `, "Guild stock Req", "^/g_stock$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAck) + `, "Guild stock Ack", "^Grouped by:\\n` +
`/g_stock_res - resources\\n` +
`/g_stock_alch - alchemist herbs\\n` +
`/g_stock_misc - miscellaneous stuff\\n` +
`/g_stock_rec - items recipes\\n` +
`/g_stock_parts - items parts\\n` +
`/g_stock_other - everything else$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockResReq) + `, "Guild stock resources Req", "^/g_stock_res$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAlchReq) + `, "Guild stock alchemy Req", "^/g_stock_alch$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockMiscReq) + `, "Guild stock misc Req", "^/g_stock_misc$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockRecReq) + `, "Guild stock recipes Req", "^/g_stock_rec$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockPartReq) + `, "Guild stock parts Req", "^/g_stock_parts$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockOthReq) + `, "Guild stock other Req", "^/g_stock_other$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "Guild stock any Ack", "^Guild Warehouse:(?P<Stock>(\\n[0-9a-z]+ (.*) x ([0-9]+))+)$")
;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
}