Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##REPAIRSCRIPT
- ## inv combat; inv armor
- DEBUG 4
- ACTION var contents $1 when ^In the haversack you see (.*)
- setvar container1 haversack
- armor_Check:
- counter set 0
- ## **********
- hand_Check:
- pause 0.1
- matchre remove_Armor (hand wraps|handwraps|knuckles|hand claws|knuckleguards|footwraps|blades|spikes|stick)
- matchre armor_Check1 You have nothing of that sort|You are wearing nothing of that sort|You aren't wearing anything
- put inv weapon
- matchwait 2
- goto armor_Check1
- ## **********
- armor_Check1:
- matchre armor_Check1 ^\.\.\.wait|^Sorry, you may only type
- matchre remove_Armor (gauntlet|gloves|shield|claw guards|steel mail gloves|parry stick|handwraps|\bhat\b|hand claws|jacket|armwraps|footwraps|aegis|buckler|\bhood\b|\bcowl\b|\bheater|pavise|scutum|shield|sipar|\btarge\b|aventail|backplate|balaclava|barbute|bascinet|breastplate|\bcap\b|coat|\bcowl|cuirass|fauld|greaves|hauberk|helm|\bhood\b|jerkin|leathers|lorica|mantle|mask|morion|pants|(?<=(field|fluted|full|half) )\bplate\b|handguards|robe|sallet|shirt|sleeves|ticivara|tabard|tasset|thorakes|\blid\b|vambraces|vest|collar|coif|mitt|steel mail)
- matchre armor_None You have nothing of that sort|You are wearing nothing of that sort|You aren't wearing anything
- put inv armor
- matchwait
- ## **********
- armor_Check2:
- matchre armor_Check1 ^\.\.\.wait|^Sorry, you may only type
- matchre remove_Armor (gauntlet|gloves|shield|claw guards|steel mail gloves|parry stick|handwraps|\bhat\b|hand claws|jacket|armwraps|footwraps|aegis|buckler|\bhood\b|\bcowl\b|\bheater|pavise|scutum|shield|sipar|\btarge\b|aventail|backplate|balaclava|barbute|bascinet|breastplate|\bcap\b|coat|\bcowl|cuirass|fauld|greaves|hauberk|helm|\bhood\b|jerkin|leathers|lorica|mantle|mask|morion|pants|(?<=(field|fluted|full|half) )\bplate\b|handguards|robe|sallet|shirt|sleeves|ticivara|tabard|tasset|thorakes|\blid\b|vambraces|vest|collar|coif|mitt|steel mail)
- matchre Armor_Complete You have nothing of that sort|You are wearing nothing of that sort|You aren't wearing anything
- put inv armor
- matchwait
- ## **********
- remove_Armor:
- var armor $0
- var LAST remove_Armor
- pause 0.1
- matchre stow_Armor ^\.\.\.wait|^Sorry, you may only type
- matchre stow_Armor ^You work|^You remove|^You pull|^You take|^You loosen|^You sling|^You slip|^You slide
- matchre armor_Check ^You have nothing of that|^Remove what
- put remove %armor
- matchwait
- ## **********
- stow_Armor:
- var LAST stow_Armor_1
- pause 0.1
- matchre stow_Armor ^\.\.\.wait|^Sorry, you may only type
- matchre stow_Armor_2 any more room in|closed|no matter how you arrange
- matchre armor_Done ^You put your
- put put %armor in my %container1
- matchwait
- ## **********
- stow_Armor_2:
- var LAST stow_Armor_2
- matchre stow_Armor_2 ^\.\.\.wait|^Sorry, you may only type
- matchre no_More_Stowing any more room in|closed|no matter how you arrange
- matchre armor_Done ^You put your
- put put %armor in my %container2
- matchwait
- ## **********
- armor_Done:
- counter add 1
- pause 0.1
- var total_armor %c
- var armor%c %armor
- goto hand_Check
- ## **********
- armor_None:
- ECHO **** NO ARMOR FOUND!
- var ARMOR_STOW OFF
- goto Armor_Complete
- ## **********
- Armor_Complete:
- ## EVERYTHING STOWED
- pause 1
- send look in my haversack
- pause 1
- eval contents replacere("%contents", " and |, ", "|")
- var contents |%contents|
- eval total count("%contents", "|")
- action instant var temparray %temparray|$2 when ^@(a|an|some) .* (\S+)$
- var i 0
- var temparray
- ## ***************
- LOOP:
- put #parse @%contents(%i)
- math i add 1
- pause 0.1
- if (%i>=%total) then goto repairstart
- goto loop
- repairstart:
- var i 1
- repair:
- if (%i>=%total) then goto done
- matchre GIVE-ITEM ^You get|^You are already holding that
- matchre STOW-RIGHT ^You need a free hand
- send get %temparray(%i) from my haversack
- matchwait 5
- GOTO repair
- ## ***************
- DONE:
- EXIT
- ## ***************
- GIVE-ITEM:
- math i add 1
- matchre GIVE-ITEM ^\.\.\.wait|^Sorry\.
- matchre GIVE-ITEM Just give it to me again if you want|It will cost|Just ask me again
- matchre STOW-RIGHT isn't broken|That isn't damaged|Please don't lose this ticket|I don't work on those here
- send give %1
- matchwait 1
- ## ***************
- STOW-RIGHT:
- wait .5
- send stow right
- GOTO repair
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement