Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

GMCP assistance

AgeranuAgeranu Member Posts: 16
Hey guys,

I was playing with a bashing script to find targets for me, and I was playing around with this:

function bashCheck()
for i, v in ipairs(gmcp.Char.Items.List.items) do
  if v.attrib=="m" then
    target = v.id
  end
end
end

Which works for the intial target grab, but it won't update once that target is dead.  I've tried using 'ql' or even leaving/reentering the room, but it won't trigger again without some sort of server side intialised update.  How can I get this to update, or initiate an update from the server?
Tagged:

Comments

  • AgeranuAgeranu Member Posts: 16
    Actually.. I think I worked it out, so nevermind the question anymore.
  • EoghanEoghan Member, Immortal Posts: 1,073 mod
    As with most "list" type messages, the message is not sent every time there's a change in the room. Instead, update, add, and delete messages are sent, which you can use to keep track of your own lists.

    The Char.Items.List.items message is sent for items in-room:

    In response to a "char.items.room" request sent by a client
    When you enter a new room

    All other changes, you need to track the 
    gmcp.Char.Items.Add, gmcp.Char.Items.Remove, and gmcp.Char.Items.Update messages yourself.
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
  • EoghanEoghan Member, Immortal Posts: 1,073 mod
    The forums are a great place to ask this question. Another place that works well is our Discord server, which has a channel for different client scripting questions! (For example, this one could have gone in the #mudlet-scripting channel)
    Like what we're doing? Why not take a second to vote? Vote for Imperian at http://www.imperian.com/vote
Sign In or Register to comment.