GMCP room exits help, please
GMCP room exits help, please
hello again, I am trying to figure out how to pull the exits in the room I am currently in from GMCP as I was told this was something I can do. Could someone point me in the right direction or explain how I can do this? Very appreciated.
Re: GMCP room exits help, please
I want to make an alias "RUN" and when I send the command it looks at GMCP exits and then goes in one of the exit directions can someone help me?
Re: GMCP room exits help, please
I haven't tested this so there may be a couple errors in the script.
It will choose only one direction and send it once. It will not see hidden directions, nor does it differentiate doors or blocked exits.
Re: GMCP room exits help, please
THank you both so very much
Re: GMCP room exits help, please
Couldn't resist. Code consolidation and all...
Re: GMCP room exits help, please
You win this round!phasma wrote:Couldn't resist. Code consolidation and all...
Re: GMCP room exits help, please
when I try and use send(next(gmcp.Room.Info.exits)) there is some sort of error....
When I use
^run$
local dir = {}
for i,_ in pairs(gmcp.Room.Info.exits) do
table.insert(dir, i)
end
send(dir[math.random(#dir)])
I am wondering for a new alias how I could make myself force someone to go the direction what I had though about was
send(force "..attacker.. (dir[math.random(#dir)])
but this does force attackere or force attackerw how can I separate attacker and direction?
When I use
^run$
local dir = {}
for i,_ in pairs(gmcp.Room.Info.exits) do
table.insert(dir, i)
end
send(dir[math.random(#dir)])
I am wondering for a new alias how I could make myself force someone to go the direction what I had though about was
send(force "..attacker.. (dir[math.random(#dir)])
but this does force attackere or force attackerw how can I separate attacker and direction?
Re: GMCP room exits help, please
send("force " .. attacker .. " " .. dir[math.random(#dir)])