chirpnest/rules.go

145 lines
17 KiB
Go
Raw Normal View History

2019-05-19 06:06:06 +02:00
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)
2019-05-19 06:19:24 +02:00
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]+)\\nYour result on the battlefield:\\n(🔥Exp: (?P<Exp>[0-9]+)\\n){0,1}(💰Gold: (?P<Gold>\\-{0,1}[0-9]+)\\n){0,1}(📦Stock: (?P<Stock>\\-{0,1}[0-9]+)){0,1}(\\n(?P<Stamina>(🔋Stamina restored))){0,1}(\\n(?P<Crit>(⚡Critical strike))){0,1}$")
2019-05-19 06:06:06 +02:00
,(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<Seller>.*)\\nCurrent price: (?P<Price>[0-9]+) pouch\\(es\\)\\nBuyer: (?P<Buyer>.*)\\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.$")
2019-05-25 10:24:59 +02:00
,(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.$")
2019-05-19 06:06:06 +02:00
,(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$")
2019-05-19 08:35:26 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessagePledge) + `, "Pledge", "^/pledge$")
2019-05-19 08:51:48 +02:00
,(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}$")
2019-05-19 08:35:26 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageOrderbookReq) + `, "Orderbook request", "^/t_(?P<Item>[0-9]+)$")
2019-05-20 14:29:11 +02:00
,(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}$")
2019-05-20 14:45:53 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawCode) + `, "Withdraw Code #1", "^Withdrawing (?P<Item1>.*) x (?P<Quantity1>.*). Recipient shall send to bot:\\n` +
2019-05-20 14:40:16 +02:00
`/g_receive [a-z0-9]+$")
2019-05-20 14:45:53 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawCode) + `, "Withdraw Code #2", "^Withdrawing:\\n` +
2019-05-20 14:29:11 +02:00
`(?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]+$")
2019-05-20 15:59:05 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawRcv) + `, "Withdraw Received #1", "^Received (?P<Item1>.*) x (?P<Quantity1>.*)$")
2019-05-20 16:02:14 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageWithdrawRcv) + `, "Withdraw Received #2", "^Received:` +
2019-05-20 16:04:38 +02:00
`(\\n(?P<Item1>.*) x (?P<Quantity1>.*))` +
2019-05-20 16:02:14 +02:00
`(\\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}$")
2019-05-20 14:29:11 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageDepositReq) + `, "Deposit Req", "^/g_deposit (?P<Item>[a-z0-9]+) (?P<Quantity>[0-9]+)$")
2019-05-20 14:45:53 +02:00
,(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$")
2019-05-20 16:16:49 +02:00
,(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}` +
2019-05-25 17:15:14 +02:00
`(((?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}` +
2019-05-25 13:44:14 +02:00
`((?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}` +
2019-05-25 17:15:14 +02:00
`((([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)*)*` +
2019-05-25 13:33:35 +02:00
`(🎪State of exclusive rights:\\n){0,1}` +
2019-05-25 13:44:14 +02:00
`(([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)*)*` +
2019-05-25 15:23:17 +02:00
`$")
2019-05-25 18:07:20 +02:00
,(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:.*))$")
2019-05-27 06:04:10 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeout) + `, "Generic timeout", "^Too late. Action is not available.$")
2019-05-28 09:00:37 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageMeAck) + `, "Me ack", "^(?s:.*)Battle(.*)of the seven castles in .*!\\n(?s:.*)\\n` +
2019-05-28 06:35:03 +02:00
`(?P<CastleIcon>.)(\\[(?P<Guild>[A-Z0-9]+)\\]){0,1}(?P<Player>.*?) ((?P<Class>(Knight|Ranger|Sentinel|Collector|Blacksmith|Alchemist)) ){0,1}of (?P<Castle>[a-zA-Z]*) Castle\\n` +
2019-05-28 05:53:38 +02:00
`.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` +
`.Stamina: (?P<StaminaNow>[0-9]+)/(?P<StaminaMax>[0-9]+).*\\n` +
2019-05-28 06:02:19 +02:00
`(.(?P<Gold>(-){0,1}[0-9]+)){0,1}( .(?P<Pogs>[0-9]+)){0,1}( .(?P<Gems>[0-9]+)){0,1}\\n\\n` +
2019-05-28 06:50:30 +02:00
`(.*?)(🎽Equipment \\+(?P<AtkGear>[0-9]+).\\+(?P<DefGear>[0-9]+).){0,1}\\n` +
2019-05-28 05:53:38 +02:00
`🎒Bag: (?P<BagUsed>[0-9]+)/(?P<BagDispo>[0-9]+) /inv\\n\\n` +
2019-05-27 12:56:03 +02:00
`State:\\n(?P<State>.*)\\n\\n` +
2019-05-28 06:03:45 +02:00
`More: /hero(?s:.*)$")
2019-05-28 09:06:55 +02:00
,(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$")
2019-05-30 10:36:40 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageGRolesReq) + `, "Guild roles Req", "^/g_roles$")
2019-05-30 10:41:27 +02:00
,(5000, ` + strconv.Itoa(objSubTypeMessageGRolesAck) + `, "Guild roles Req", "^Roles:\\nBartender:\\n(?P<Bartender>.*)\\n\\n\nnCommander:\\n(?P<Commander>.*)\\n\\n\\nSquire:\\n(?P<Squire>.*)\\n\\n\\nTreasurer:\\n(?P<Treasurer>.*)$")
2019-05-19 06:06:06 +02:00
;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
}