Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- this is what I would do:
- Pattern: ^(\w+) quickly eats (?:some|an|a) (.*)\.$
- local herb_table = {
- ["galingale flower"] = "galingale",
- ["hyssop stem"] = "hyssop",
- ["juniper berry"] = "juniper",
- ["piece of kelp"] = "kelp",
- ["maidenhair leaf"] = "maidenhair",
- ["mandrake root"] = "mandrake",
- ["nightshade root"] = "nightshade",
- ["orphine seed"] = "orphine",
- ["wormwood root"] = "wormwood",
- }
- local herb = herb_table[matches[3]]
- if herb then
- cecho(" <yellow>Person ate "..herb)
- TrackSlice(herb)
- if shadowplanted and shadowplant == herb then
- shadowplanted = false
- killTimer(shadowplantTimer_init)
- killTimer(shadowplantTimer_exec)
- end
- end
- Trigger:
- ^You force a small opening in your wormhole and a shadowy replica of (?:some|a|an) (.*) pops out of it and lands in .+ hands.$
- local herb = matches[2]
- local herb_table = {
- ["galingale flower"] = "galingale",
- ["hyssop stem"] = "hyssop",
- ["juniper berry"] = "juniper",
- ["piece of kelp"] = "kelp",
- ["maidenhair leaf"] = "maidenhair",
- ["mandrake root"] = "mandrake",
- ["nightshade root"] = "nightshade",
- ["orphine seed"] = "orphine",
- ["wormwood root"] = "wormwood",
- }
- herb = herb_table[herb]
- shadowplanted = false
- shadowplant = ""
- if shadowplantTimer_init then killTimer(shadowplantTimer_init) end
- if shadowplantTimer_exec then killTimer(shadowplantTimer_exec) end
- shadowplantTimer_init = tempTimer( 1, function()
- shadowplanted = true
- shadowplant = herb
- if shadowplantTimer_init then killTimer( shadowplantTimer_init ) end
- end)
- shadowplantTimer_exec = tempTimer( 4, function()
- shadowplanted = false
- shadowplant = ""
- if shadowplantTimer_init then killTimer( shadowplantTimer_init ) end
- if shadowplantTimer_exec then killTimer( shadowplantTimer_exec ) end
- end)
- cecho("<orange_red>\nSHADOWPLANTED: "..herb)
- function TrackSlice(name)
- if shadowplanted then
- if combat.afflictions.paralysis and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.sensitivity and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.slickness and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.numbness and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.frostbite and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.limbparalysis and shadowplant == "maidenhair" then
- cecho("<orange_red>\nSHADOWPLANT <green>MAIDENHAIR <orange_red> EATEN")
- elseif combat.afflictions.asthma and shadowplant == "kelp" then
- cecho("<orange_red>\nSHADOWPLANT <cyan>KELP <orange_red> EATEN")
- elseif combat.afflictions.hemotoxin and shadowplant == "kelp" then
- cecho("<orange_red>\nSHADOWPLANT <cyan>KELP <orange_red> EATEN")
- elseif combat.afflictions.butisol and shadowplant == "kelp" then
- cecho("<orange_red>\nSHADOWPLANT <cyan>KELP <orange_red> EATEN")
- elseif combat.afflictions.clumsiness and shadowplant == "kelp" then
- cecho("<orange_red>\nSHADOWPLANT <cyan>KELP <orange_red> EATEN")
- elseif combat.afflictions.weakness and shadowplant == "kelp" then
- cecho("<orange_red>\nSHADOWPLANT <cyan>KELP <orange_red> EATEN")
- ..yadayadayada..
- else
- for _,v in ipairs(tarcuringorder[name]) do
- if combat.afflictions[v] then
- combat.afflictions[v] = false
- combat.afflictions.anorexia = false
- echo("\nCombatSystem: ENEMY CURED " .. string.upper(v) .. " (herb/slice)")
- enemyAffshow()
- return
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement