Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'line/bot'
- class KamigoController < ApplicationController
- protect_from_forgery with: :null_session
- def webhook
- # 設定回覆文字
- reply_text = cutword(received_text)
- # 傳送訊息到 line
- response = reply_to_line(reply_text)
- # 回應 200
- head :ok
- end
- # 取得對方說的話
- def received_text
- message = params['events'][0]['message']
- message['text'] unless message.nil?
- end
- #計算功能實作
- def cutword(received_text)
- # return nil unless received_text[0..2]== 'cky'
- # lvget = received_text[-3...-1]
- cmdkind = received_text[0..3]
- catkind = received_text[4..7]
- p "---------------------------"
- p "cmd load as follow:"
- p cmdkind
- p catkind
- p "the original received codes:"
- p received_text
- p "---------------------------"
- if cmdkind =="help"
- answer = "cmls:Command List\n Main Command:ckrsAAAA(xBBBB)CCC, AAAA are the CatCode(with the status),CCC are the Level of cat(must fill full main+plus into 3gens. The (xBBBB) is the additional twist,which allow to fill NP level include the ATK and HP's calculation.\n"
- end
- if cmdkind == "cmls"
- answer = "help: The use way of ckrs.\nvers: Show out the Version runing now.\nupd1,upd2,upd3,upd4: The Update History.(May not update to time.)\nskjp,sktw,spss: UNWORKABLE now.\nnkrs: As same as ckrs but accept to use NickName which had been installed by author,\nit's a little bit more lag than the ckrs since it need more time to sort,and it doesn't support the (XBBBB) as the NP level's calculation.\nauth: show the Author's ID and helpers."
- end
- if cmdkind =="auth"
- answer = "Main Author: Medal893\nHelpers:中日群"
- end
- if cmdkind =="vers"
- answer = "Neko BOT(Dev Version), Version: Alpha 1.4 -m240"
- end
- if cmdkind =="upd1"
- answer = "Alpha 1.0pre1, -m v21: add cmds ver,upd,fix tiny bugs.\nAlpha 1.0pre1,-m v22: fix the bugs of upd and avoid crash.\nAlpha 1.0pre1,-m v23: fix the bugs of upd's unresponse, add some UNWRITE contexts' cmd and add cats 0033,0043"
- end
- if cmdkind =="upd2"
- answer = "Alpha 1.1 -m24: Completely change the information's storage way.\nAlpha 1.1 -m25~m53 Testing Version with tons of bugs.\nAlpha 1.1 -m54:Edit the output of ckrs partically.\nAlpha 1.1 -m55:Fix bugs.\nAlpha 1.1 -m56:Add More Files.\nAlpha 1.1 -m57:Add More Files.\nAlpha 1.1 -m58~m67 Fix bugs related to m57."
- end
- if cmdkind =="upd3"
- answer = "Alpha 1.2 -m68: Change the ckrs command type in order to support not to input NPlevels.\nAlpha 1.2 -m69:Add ADDITIONAL line information.\nAlpha 1.2 -m70~m71: Edit the Additional line's output way.\nAlpha 1.2-m72: Add catkind16~20."
- end
- if cmdkind =="upd4"
- answer = "Alpha 1.3 -m73: Add new command nkrs which support NickName.\nAlpha 1.3 -m96 potimize the nkrs.\NAlpha 1.3-m97 potimize some codes' performance."
- end
- if cmdkind =="skjp"
- answer = "UNWORKABLE and UNWRITE yet.\n"
- end
- if cmdkind =="sktw"
- answer = "UNWORKABLE and UNWRITE yet.\n"
- end
- if cmdkind =="spss"
- answer = "UNWORKABLE and UNWRITE yet.\n"
- end
- if cmdkind =="ckrs" #ckrs support only Number Names,Support NPLevel,and faster than nkrs.
- p "---------Working ckrs---------"
- value_ATK = ValuesGetATK(catkind)
- value_HP = ValuesGetHP(catkind)
- value_RANGE = ValuesGetRANGE(catkind)
- value_COST = ValuesGetCOST(catkind)
- value_RECOVERY = ValuesGetRECOVERY(catkind)
- value_NAME = ValuesGetNAME(catkind)
- value_KB = ValuesGetKB(catkind)
- value_ADDITIONAL = ValuesGetADDITIONAL(catkind)
- p "---------ckrs Infos LOADED-------"
- p value_ATK
- p value_HP
- p value_KB
- p value_NAME
- p value_RECOVERY
- p value_RANGE
- p value_COST
- p "--------ckrs Infos LOADED---"
- npwork = received_text[8]
- npatk = 0
- nphealth = 0
- if npwork == 'x'
- npatk = received_text[9..10]
- nphealth = received_text[11..12] #ckrsAAAAxBBBBCCC
- end
- lvget = received_text[-3..-1]
- p "--------ckrs word cut results:"
- p npwork
- p lvget
- p npatk
- p nphealth
- p "--------ckrs word cut END---"
- n_lvget = lvget.to_f
- n_catkind = catkind.to_f
- n_npatk = npatk.to_f
- n_nphealth = nphealth.to_f
- n_value_ATK = value_ATK.to_f
- n_value_HP = value_HP.to_f
- atk = ((n_lvget+ 4)/5 * (n_npatk+50) * 0.02 * n_value_ATK).round(0) #the White Value
- health = ((n_lvget+ 4)/5 * (n_nphealth+50) *0.02 * n_value_HP).round(0) #the White Value
- answer = "cat " + catkind + " " + value_NAME +"\n" + atk.to_s + " atk / " + health.to_s + " health\n" + "Range = " + value_RANGE + " Cost = " + value_COST + "\nRecovery = " + value_RECOVERY + "KB = " + value_KB + "\nHPNP= " + n_nphealth.to_s + " ATKNP= " + n_npatk.to_s + " LV = " + n_lvget.to_s + "||" + value_ADDITIONAL
- end
- if cmdkind =="nkrs"
- if received_text[6] == 'x' #nkrsAAAAxbbb
- catkind = received_text[4..5]
- strlen = 3
- elsif received_text[7] =='x'
- catkind = received_text[4..6]
- strlen = 4
- elsif received_text[8] =='x'
- catkind = received_text[4..7]
- strlen = 5
- end
- p "---------nkrs n_catkind----------"
- p strlen
- p catkind
- p "---------------------------------"
- n_catkind = NickNameGet(catkind)
- p "---------Working nkrs---------"
- value_ATK = ValuesGetATK(n_catkind)
- value_HP = ValuesGetHP(n_catkind)
- value_RANGE = ValuesGetRANGE(n_catkind)
- value_COST = ValuesGetCOST(n_catkind)
- value_RECOVERY = ValuesGetRECOVERY(n_catkind)
- value_NAME = ValuesGetNAME(n_catkind)
- value_KB = ValuesGetKB(n_catkind)
- value_ADDITIONAL = ValuesGetADDITIONAL(n_catkind)
- p "---------nkrs Infos LOADED-------"
- p value_ATK
- p value_HP
- p value_KB
- p value_NAME
- p value_RECOVERY
- p value_RANGE
- p value_COST
- p "--------nkrs Infos LOADED---"
- npwork = 0
- npatk = 0
- nphealth = 0
- lvget_original = received_text[-3..-1]
- lvget = lvget_original
- lvget = ValueGetLV(n_catkind,lvget)
- p "--------nkrs word cut results:"
- p npwork
- p lvget
- p npatk
- p nphealth
- p "--------nkrs word cut END---"
- n_lvget = lvget.to_f
- n_catkind = catkind.to_f
- n_npatk = npatk.to_f
- n_nphealth = nphealth.to_f
- n_value_ATK = value_ATK.to_f
- n_value_HP = value_HP.to_f
- atk = ((n_lvget+ 4)/5 * (n_npatk+50) * 0.02 * n_value_ATK).round(0) #the White Value
- health = ((n_lvget+ 4)/5 * (n_nphealth+50) *0.02 * n_value_HP).round(0) #the White Value
- answer = "cat " + catkind + " " + value_NAME +"\n" + atk.to_s + " atk / " + health.to_s + " health\n " + "Range = " + value_RANGE + " Cost = " + value_COST + "\nRecovery = " + value_RECOVERY + "KB = " + value_KB ++ "\nEqsLV = " + lvget_original.to_s + "||" + value_ADDITIONAL
- end
- if cmdkind == 'nkrt'
- answer = "UNWORKABLE and UNWRITE yet.\n"
- end
- if cmdkind == 'ckrt'
- answer = "UNWORKABLE and UNWRITE yet.\n"
- end
- return answer
- end
- # 關鍵字回覆
- # def keyword_reply(received_text)
- # 學習紀錄表
- # keyword_mapping = {
- # 'QQ' => 'I see GG',
- # '??' => '郭',
- # '010小貓' => '110hp120atk'
- # }
- # 查表
- # keyword_mapping[received_text]
- # end
- # 傳送訊息到 line
- def reply_to_line(reply_text)
- return nil if reply_text.nil?
- # 取得 reply token
- reply_token = params['events'][0]['replyToken']
- # 設定回覆訊息
- message = {
- type: 'text',
- text: reply_text
- }
- # 傳送訊息
- line.reply_message(reply_token, message)
- end
- # Line Bot API 物件初始化
- def line
- @line ||= Line::Bot::Client.new { |config|
- config.channel_secret = 'SECRET'
- config.channel_token = 'SECRET'
- }
- end
- def eat
- render plain: "please write down 6 number the first 3 is for the cat kind,the forth number is for the status,the fifth and sixth is for the HP's NPstatus,the seventh and eighth is for the ATK's NPstatus, and the next 3 is for the level.Fill 00 if Unuse, thank you."
- end
- def ValueGetLV(catkind ,lvget)
- p "------LOADED ValueGetLV-----"
- p catkind
- p lvget
- lveditor = lvget.to_f
- n2_lvget = lvget.to_f
- n2_catkind = catkind.to_f
- splender_crazys = 912
- splender_basics = 10#0012~0093
- splender_normal = 0
- nsplender_crazys = splender_crazys.to_f
- nsplender_basics = splender_basics.to_f
- if n2_catkind == nsplender_crazys..nsplender_crazys+92
- p "EDIT"
- if n2_lvget >= 20
- lveditor = n2_lvget/2+10
- elsif n2_lvget <= 20
- lveditor = n2_lvget
- end
- elsif n2_catkind == nsplender_basics..nsplender_basics+85
- if n2_lvget >=90
- lveditor = n2_lvget/4 + 67.5
- elsif n2_lvget >=70
- lveditor = n2_lvget/2+35
- elsif n2_lvget <70
- lveditor = n2_lvget
- end
- elsif splender_normal == 0
- if n2_lvget >=90
- lveditor = n2_lvget/4 + 67.5
- elsif n2_lvget >=70
- lveditor = n2_lvget/2+35
- elsif n2_lvget <70
- lveditor = n2_lvget
- end
- end
- p n2_lvget
- p n2_catkind
- p lveditor
- p "----------------------------"
- return lveditor
- end
- #FILES OF LIST
- def ValuesGetNAME(catkind) #Name White Value(Recovery of making)
- keyword_mapping = {
- '0012' => 'ネコビルダー',
- '0013' => 'ネコモヒカン',
- '0022' => 'ネコカベ',
- '0023' => 'ゴムネコ',
- '0032' => '勇者ネコ',
- '0033' => '暗黒ネコ',
- '0042' => '美脚ネコ',
- '0043' => 'ムキあしネコ',
- '0052' => 'ネコキリン',
- '0053' => 'ネコライオン',
- '0062' => 'ネコUFO',
- '0063' => '天空のネコ',
- '0072' => 'ネコクジラ',
- '0073' => 'ネコ島',
- '0082' => 'ネコドラゴン',
- '0083' => 'ネコキングドラゴン',
- '0092' => 'ネコダラボッチ',
- '0093' => 'ネコジャラミ',
- '0102' => 'ネコ聖母',
- '0103' => 'ネコマッチョ',
- '0112' => '酔拳にゃんこ',
- '0113' => 'ネコダンサー',
- '0122' => 'Super Mr.',
- '0123' => 'Hyper Mr.',
- '0132' => '猫縛りNEO',
- '0133' => '猫縛り極上',
- '0142' => '処刑人',
- '0143' => '暗黒嬢',
- '0152' => 'ネコギャング',
- '0153' => '重機C・A・T',
- '0162' => 'ネコ葉っぱ',
- '0163' => 'ネコぺろきゃん',
- '0171' => 'もねこ',
- '0172' => 'スターもねこ',
- '0182' => 'ネコワイルド',
- '0183' => 'イチリンリン',
- '0192' => 'ガマネコ忍者',
- '0193' => 'ムササビネコ忍者',
- '0202' => 'デビルネコ',
- '0203' => 'ネコボーン',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetATK(catkind) #ATK White Value
- keyword_mapping = {
- '0012' => '20',
- '0013' => '40',
- '0022' => '5',
- '0023' => '10',
- '0032' => '62',
- '0033' => '125',
- '0042' => '250',
- '0043' => '500',
- '0052' => '32',
- '0053' => '65',
- '0062' => '412',
- '0063' => '825',
- '0072' => '450',
- '0073' => '990',
- '0082' => '875',
- '0083' => '1000',
- '0092' => '700',
- '0093' => '1400',
- '0102' => '250',
- '0103' => '250',
- '0112' => '3025',
- '0113' => '3025',
- '0122' => '87',
- '0123' => '87',
- '0132' => '250',
- '0133' => '250',
- '0142' => '330',
- '0143' => '330',
- '0151' => '750',
- '0152' => '750',
- '0162' => '250',
- '0163' => '250',
- '0171' => '1000',
- '0172' => '1000',
- '0182' => '450',
- '0183' => '450',
- '0192' => '70',
- '0193' => '70',
- '0202' => '500',
- '0203' => '500',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetHP(catkind) #HP White Value
- keyword_mapping = {
- '0012' => '250',
- '0013' => '500',
- '0022' => '1000',
- '0023' => '1500',
- '0032' => '500',
- '0033' => '1000',
- '0042' => '1000',
- '0043' => '2000',
- '0052' => '1250',
- '0053' => '2500',
- '0062' => '750',
- '0063' => '1500',
- '0072' => '1750',
- '0073' => '3500',
- '0082' => '2000',
- '0083' => '2250',
- '0092' => '2500',
- '0093' => '5000',
- '0102' => '1000',
- '0103' => '1625',
- '0112' => '2250',
- '0113' => '2250',
- '0122' => '1250',
- '0123' => '1250',
- '0132' => '1750',
- '0133' => '3500',
- '0142' => '1750',
- '0143' => '1750',
- '0151' => '2000',
- '0152' => '2000',
- '0162' => '1000',
- '0163' => '1000',
- '0171' => '1500',
- '0172' => '2500',
- '0182' => '1000',
- '0183' => '1000',
- '0192' => '600',
- '0193' => '600',
- '0202' => '1750',
- '0203' => '1750',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetRANGE(catkind) #Range White Value
- keyword_mapping = {
- '0012' => '140',
- '0013' => '140',
- '0022' => '110',
- '0023' => '110',
- '0032' => '150',
- '0033' => '150',
- '0042' => '350',
- '0043' => '350',
- '0052' => '140',
- '0053' => '140',
- '0062' => '170',
- '0063' => '170',
- '0072' => '150',
- '0073' => '150',
- '0082' => '400',
- '0083' => '400',
- '0092' => '150',
- '0093' => '150',
- '0102' => '350',
- '0103' => '350',
- '0112' => '300',
- '0113' => '300',
- '0122' => '140',
- '0123' => '140',
- '0132' => '120',
- '0133' => '120',
- '0142' => '210',
- '0143' => '210',
- '0151' => '140',
- '0152' => '199',
- '0162' => '350',
- '0163' => '350',
- '0171' => '160',
- '0172' => '160',
- '0182' => '170',
- '0183' => '170',
- '0192' => '150',
- '0193' => '150',
- '0202' => '150',
- '0203' => '150',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetCOST(catkind) #Cost White Value(Default World_2 Value as most common.)
- keyword_mapping = {
- '0012' => '75',
- '0013' => '150',
- '0022' => '150',
- '0023' => '150',
- '0032' => '300',
- '0033' => '300',
- '0042' => '600',
- '0043' => '600',
- '0052' => '750',
- '0053' => '750',
- '0062' => '975',
- '0063' => '975',
- '0072' => '1200',
- '0073' => '1200',
- '0082' => '1500',
- '0083' => '1500',
- '0092' => '1950',
- '0093' => '1950',
- '0102' => '900',
- '0103' => '900',
- '0112' => '2250',
- '0113' => '2250',
- '0122' => '825',
- '0123' => '825',
- '0132' => '1035',
- '0133' => '1035',
- '0142' => '1440',
- '0143' => '1440',
- '0151' => '1125',
- '0152' => '1125',
- '0162' => '525',
- '0163' => '525',
- '0171' => '148',
- '0172' => '148',
- '0182' => '1050',
- '0183' => '525',
- '0192' => '300',
- '0193' => '225',
- '0202' => '1125',
- '0203' => '1125',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetRECOVERY(catkind) #Cost White Value(Recovery of making)
- keyword_mapping = {
- '0012' => '2s(60f)',
- '0013' => '2s(60f)',
- '0022' => 's(60f)',
- '0023' => 's(60f)',
- '0032' => 's(60f)',
- '0033' => 's(60f)',
- '0042' => 's(76f)',
- '0043' => 's(236f)',
- '0052' => 's(60f)',
- '0053' => 's(136f)',
- '0062' => 's(60f)',
- '0063' => 's(116f)',
- '0072' => 's(136f)',
- '0073' => 's(256f)',
- '0082' => 's(316f)',
- '0083' => 's(516f)',
- '0092' => 's(556f)',
- '0093' => 's(676f)',
- '0102' => 's(76f)',
- '0103' => 's(76f)',
- '0112' => 's(606f)',
- '0113' => 's(606f)',
- '0122' => 's(226f)',
- '0123' => 's(226f)',
- '0132' => 's(186f)',
- '0133' => 's(186f)',
- '0142' => 's(186f)',
- '0143' => 's(186f)',
- '0151' => 's(206f)',
- '0152' => 's(206f)',
- '0162' => 's(76f)',
- '0163' => 's(76f)',
- '0171' => 's(1744f)',
- '0172' => 's(1744f)',
- '0182' => 's(60f)',
- '0183' => 's(60f)',
- '0192' => 's(60f)',
- '0193' => 's(60f)',
- '0202' => 's(146f)',
- '0203' => 's(146f)',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetKB(catkind) #Knock Back
- # p "Loaded ValuesGetKB"
- # p catkind
- # p "The catkind loaded by ValueGetKB"
- keyword_mapping = {
- '0012' => '3',
- '0013' => '3',
- '0022' => '1',
- '0023' => '1',
- '0032' => '3',
- '0033' => '3',
- '0042' => '3',
- '0043' => '3',
- '0052' => '5',
- '0053' => '5',
- '0062' => '4',
- '0063' => '4',
- '0072' => '3',
- '0073' => '3',
- '0082' => '3',
- '0083' => '3',
- '0092' => '1',
- '0093' => '1',
- '0102' => '3',
- '0103' => '3',
- '0112' => '1',
- '0113' => '1',
- '0122' => '5',
- '0123' => '5',
- '0132' => '1',
- '0133' => '1',
- '0142' => '1',
- '0143' => '1',
- '0151' => '3',
- '0152' => '3',
- '0162' => '3',
- '0163' => '3',
- '0171' => '4',
- '0172' => '4',
- '0182' => '4',
- '0183' => '4',
- '0192' => '3',
- '0193' => '3',
- '0202' => '3',
- '0203' => '3',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def ValuesGetADDITIONAL(catkind) #Knock Back
- # p "Loaded ValuesGetKB"
- # p catkind
- # p "The catkind loaded by ValueGetKB"
- keyword_mapping = {
- '0012' => '',
- '0013' => '',
- '0022' => '',
- '0023' => '',
- '0032' => ' Good to red.',
- '0033' => ' Good to red',
- '0042' => '',
- '0043' => '',
- '0052' => '',
- '0053' => '',
- '0062' => '',
- '0063' => '',
- '0072' => '',
- '0073' => '',
- '0082' => '',
- '0083' => '',
- '0092' => '',
- '0093' => '',
- '0102' => '',
- '0103' => '',
- '0112' => '',
- '0113' => '',
- '0122' => '',
- '0123' => '',
- '0132' => '',
- '0133' => '',
- '0142' => '',
- '0143' => '',
- '0151' => '',
- '0152' => '',
- '0162' => '',
- '0163' => '',
- '0172' => '',
- '0173' => '',
- '0182' => '',
- '0183' => '',
- '0192' => '',
- '0193' => '',
- '0202' => '',
- '0203' => '',
- '0212' => '',
- '0213' => '',
- '0222' => '',
- '0223' => '',
- '0232' => '',
- '0233' => '',
- '0242' => '',
- '0243' => '',
- '0252' => '',
- '0253' => '',
- '0262' => '',
- '0263' => '',
- '0272' => '',
- '0273' => '',
- '0282' => '',
- '0283' => '',
- '0292' => '',
- '0293' => '',
- '0302' => '',
- '0303' => '',
- '0312' => '',
- '0313' => '',
- '0322' => '',
- '0323' => '',
- '0332' => '',
- '0333' => '',
- '0342' => '',
- '0343' => '',
- '0352' => '',
- '0353' => '',
- '0362' => '',
- '0363' => '',
- '0372' => '',
- '0373' => '',
- '0382' => '',
- '0383' => '',
- '0392' => '',
- '0393' => '',
- '0402' => '',
- '0403' => ''
- }
- # 查表
- return keyword_mapping[catkind]
- end
- def NickNameGet(catkind) #Get Cat's NickName
- p "Loaded NickNameGet"
- p catkind
- p "The catkind loaded by NickNameGet"
- keyword_mapping = {
- '小貓2' => '0012',
- '小貓3' => '0013',
- '小貓' => '0013',
- '牆貓' => '0022',
- '橡皮擦貓' => '0023',
- '1003' => '1003'
- }
- # 查表
- return keyword_mapping[catkind]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement