assistance please

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: assistance please

Post by Belgarath »

Code: [show] | [select all] lua
function ill(ills)
   if illusions[ills] ~= nil then
      send("conjure " ..target.. " illusion " .. illusions[ills], false)
   end
end

local command = {
   "hallucinations",
   "hypersomnia",
   "masochism",
}

local which = command[math.random(#command)]

ill(which)
The problem was that you were trying to send the function 'ill' through 'send' ... which just includes a send command itself.

Israafiyl
Posts: 56
Joined: Mon Jul 16, 2012 12:29 am

Re: assistance please

Post by Israafiyl »

I had an idea I would have to do something like that.

What if I wanted to use my dstab()function within such a random command?
my dstab command looks something like this:

dstab("venom1","venom2","illusion")
dstab("kalmia","kalmia","curareSymptom")

I am utterly lost when doing this. Is there any manual you would recommend I read Mork to learn such Mork?

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: assistance please

Post by Belgarath »

The best reading you could do, really, is to read the manual (if you haven't already) and learn from other people's coding... That's how I learned.

As for a dstab function, you could make a function or a table to return a venom and use it as such:
Code: [show] | [select all] lua
local illusion = getRandomIllusion()
local venom = {}
-- Function Method --
venom[1] = getNextVenom()
venom[2] = getNextVenom()
-- Table Method --
venom[1] = table.remove(envenomList, 1)
venom[2] = table.remove(envenomList, 1)

dstab(venom[1], venom[2], illusion)
And another way is to manually choose which venoms with an alias. Vadi made one a long time ago: here.

Israafiyl
Posts: 56
Joined: Mon Jul 16, 2012 12:29 am

Re: assistance please

Post by Israafiyl »

Hello again all!
Quick question. I am wanting to make a new trigger that fires when I get this message:
^You leap from the shadows and plunge your dagger into .+'s unsuspecting back!$
followed imminently by the prompt
2918h, 3618m, 13490e, 13093w cexk-

and then another to fire when I get the same message but what follows is:
^\w+'s eyes close suddenly as (he|she) falls asleep.$

how may I go about this?
I believe I have to make multi-line triggers or a gateway trigger but am not sure and all attempts at such have not worked. All help is appreciated as always

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: assistance please

Post by Vadi »

It'd be much better if you created a thread for a specific thing - like "how do I make a multi-line trigger?" above, than keep a running thread for solving your personal issues. Threads would help others a lot more when they search for a specific thing, than a mega-thread of various problems, I think!

Israafiyl
Posts: 56
Joined: Mon Jul 16, 2012 12:29 am

Re: assistance please

Post by Israafiyl »

Hmm I suppose so, though I did not know if the solution was for sure a Multi-line trigger or a gateway trigger. Thanks for letting me know it is such! Would I just make another trigger line be returnPrompt() if the prompt follows the first line?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: assistance please

Post by Vadi »

Read what I wrote above? Make a thread for this :)

Post Reply