Thank you again Mork. I had actually tried something similar and get the error:
<[string "function Alias226()..."]:3: bad argument #1 to 'pairs' (table expected, got nil)>
with both mine and your code. I am just not sure how else I could do this, do you have any ideas?
assistance please
Re: assistance please
I just noticed that in my code was a spelling error... tempExactMathTrigger should be tempExactMatchTrigger.
As for that error there, it seems that no table was given, hence the nil. I'm not too familiar with gmcp, so what does the output look like in display(gmcp.Room.Info.exits)?
As for that error there, it seems that no table was given, hence the nil. I'm not too familiar with gmcp, so what does the output look like in display(gmcp.Room.Info.exits)?
Re: assistance please
exits in gmcp::
Room = {}
Info = {}
exits = {
ne = 11104,
u = 11095,
e = 12453,
d = 11089,
w = 13229,
nw = 11142
}
Room = {}
Info = {}
exits = {
ne = 11104,
u = 11095,
e = 12453,
d = 11089,
w = 13229,
nw = 11142
}
Re: assistance please
Perhaps you have something misspelled or not set?
This worked fine for me:
This worked fine for me:
Re: assistance please
It seems because my snipe command sends all directions at once lastSnipeDir is set to the last room it tries to shoot even if I am off balance having shot in another direction
Re: assistance please
What is your snipe command sending? It should stop at the first direction using 'break'.
Also, if it is doing it while you're off balance, make sure you actually have the checks in there to see if you have balance..
Also, if it is doing it while you're off balance, make sure you actually have the checks in there to see if you have balance..
Re: assistance please
Ahh it seems I had taken out the break. As it is in your code it will only let me fire one directon, that being the first one on the gmcp.exits list. I tried to place it within the tempTrigger and that didn't seem to work either. I am unsure what the logical solution to this would be.
Again thank you for all your help Mork. I am a novice programmer who has just starting taking classes on such and this discussion has really been helping me with Java as well. I love how coding really makes you think! Cheers mate Ill keep playing with all you have helped me with
Again thank you for all your help Mork. I am a novice programmer who has just starting taking classes on such and this discussion has really been helping me with Java as well. I love how coding really makes you think! Cheers mate Ill keep playing with all you have helped me with
Re: assistance please
Also if anyone could. How would I go about making this work?
tempExactMatchTrigger("You prick "..target.." twice in rapid succession with your dirk.", [[
phase1Counter = phase1Counter % #phase1Commands + 1
killTrigger(tempDstabTrigg)
]]
the tempExactMatch wont match my target. I am unsure how else I may do such. I also tried
tempExactMatchTrigger("You prick \w+ twice in rapid succession with your dirk.", [[
and it did not seem to work either
tempExactMatchTrigger("You prick "..target.." twice in rapid succession with your dirk.", [[
phase1Counter = phase1Counter % #phase1Commands + 1
killTrigger(tempDstabTrigg)
]]
the tempExactMatch wont match my target. I am unsure how else I may do such. I also tried
tempExactMatchTrigger("You prick \w+ twice in rapid succession with your dirk.", [[
and it did not seem to work either
Re: assistance please
Make sure it matches the correct case! What I would suggest is make it into a regex trigger like this:
![Smile :)](./images/smilies/icon_e_smile.gif)
Happy that you're learning, mate
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: assistance please
Okay I have ran into another issue I cannot seem to solve...
I have a function:
function ill(ills)
if illusions[ills] ~= nil then
send("conjure "..target.. " illusion ".. illusions[ills],false)
end
end
This function pulls from my illusion database.
e.g. ill("hallucinations")
I want to make an alias that sends a random illusion from the list:
command = {
ill("hallucinations"),
ill("hypersomnia"),
ill("masochism"),
}
which = math.random(#command)
send(command[which])
But it keeps repeating the first function in the list and I get the error: bad argument #1 to 'random' (interval is empty)>
How may I get this to function properly?
Thank you!
I have a function:
function ill(ills)
if illusions[ills] ~= nil then
send("conjure "..target.. " illusion ".. illusions[ills],false)
end
end
This function pulls from my illusion database.
e.g. ill("hallucinations")
I want to make an alias that sends a random illusion from the list:
command = {
ill("hallucinations"),
ill("hypersomnia"),
ill("masochism"),
}
which = math.random(#command)
send(command[which])
But it keeps repeating the first function in the list and I get the error: bad argument #1 to 'random' (interval is empty)>
How may I get this to function properly?
Thank you!