Quick Coding Questions

1679111224

Comments

  • As far as I'm aware it should. It was given to me a long time ago.




    Penwize has cowardly forfeited the challenge to mortal combat issued by Atalkez.
  • edited April 2016
    on svo whenever I pause the system it instantly unpauses, it also is repeating basically everything for some weird reason, I'm seeing double targetting and everything.....what happened what did I do and what can I do to fix it!


    imageimage
  • You probably have more than one instance of svof installed. Check your package manager to make sure you only have one, and if you really wanna check, just uninstall everything that says svof, and reinstall (1) version of it
  • And then restart Mudlet after doing the above.
  • What's the gmcp string for wielded items? I'm not seeing anything regarding items on a gmcp echo.
  • It's the attribute (key attrib) of Char.Items 'l' for left, 'L' for right and 'lL' for two hands. See https://github.com/keneanung/GMCPAdditions/blob/master/README.md#charitemslist
  • Ah, thanks! Looks like the protocol wasn't enabled, so I was just getting blank lines.
  • edited April 2016
    Usually gmcp.Char.Items.List and gmcp.Char.Items.Update. When you wield or unwield an item, a gmcp.Char.Items.Update event is raised.

    You can use the sendGMCP function to force an update of gmcp.Char.Items.List. It will populate gmcp.Char.Items.List with the contents of your inventory and raise that event.
    Example command: lua sendGMCP([[Char.Items.Inv]]) send("\n")

    Events are explained here:
    http://wiki.mudlet.org/w/Manual:Event_Engine

    Note the attributes for wielded items. Some weapons show up as worn and wielded (bows for example - attribute: wlL)
    https://github.com/keneanung/GMCPAdditions#charitems
  • Hmm, bit more convoluted than I'd thought it'd be. I was hoping there was just a dedicated value like in other IREs, eg gmcp.char.vitals.wield_left
  • I'm trying to show what I'm wielding in the ScoreBox on Zulahs GUI, as I'm 2H, it'll either be Sword, Hammer or Bow so would use the IL gmcp tag

    cecho("scorebox", "<white> Weapon:<yellow>"..gmcp.Char.Items.List.Attrib.IL.. " " )

    I've also tried ..gmcp.Char.Items.List.IL.. and ..gmcp.Char.Items.Attrib.IL..

    This won't work, any idea why?

    For reference, other settings like this do work:

    cecho("scorebox", "<white> Level:<gold>" ..gmcp.Char.Status.level.." ")

     cecho("scorebox", "<white>Gold:<gold>"..gmcp.Char.Status.gold.." ")


    (Party): Mezghar says, "Stop."
  • 1. Attrib should be "attrib"
    2. it's a string that can contain the wield status. Not a table with tgose keys
  • edited May 2016

    Also, much more importantly, that's not how the majority of GMCP (including Items, but also Defences, Afflictions, and Players) works. You have to use the individual events that are raised to build your own tracking table client-side. I don't know if there's another static GMCP field that tracks what you're wielding, but if you're using gmcp.Char.Items then you'll need to create event handlers for gmcp.Char.Items.Update to track when what you're wielding changes.

    The gmcp.Char.Items.List variable inside your client is just the content of the last gmcp.Char.Items.List message sent by the game, but that doesn't mean it's the current contents of whatever location you care about (because individual items being added or removed are sent using gmcp.Char.Items.Add and gmcp.Char.Items.Remove) or that it's even the right location (you get gmcp.Char.Items.List when you move rooms, which means that - most of the time - gmcp.Char.Items.List refers to the [initial] contents of whatever room you're in; you only get gmcp.Char.Items.List for something other than your current room if you explicitly request it using sendGMCP).

  • AustereAustere Tennessee
    I recommend Phoenix's gmcp tracker for wielded and items in room tracking. It should already have everything you need.  I do remember seeing an error in the wield portion in certain scenarios, but I fixed it and can't remember where.  If you can tell me which script you need, I can send you my version:

    http://forums.mudlet.org/viewtopic.php?f=6&t=3356

  • edited May 2016
    For svof - does anyone know why it's not actually changing parry to the last hit limb in my case?

    https://ada-young.appspot.com/pastebin/7375acfb

    Alright, now it does -

    https://ada-young.appspot.com/pastebin/e3999321

    What actually triggers the parry mode to start working?

    [ SnB PvP Guide | Link ]

    [ Runewarden Sparring Videos | Link ]
  • Does svof even handle trueparry properly, with lastlimbhit? Can always code it in yourself:
     if svo.me.lastlimbhit == "right arm" then
       send("trueparry right")
     elseif

    etc etc
        

  • Yep, I have trueparry in my code but in general, svof doesn't handle trueparry. I'm using a timer script to switch parry on last hit with my queueing attacks.

    Though, svof itself isn't recognizing last hits until something triggers it. I enabled dragon class.

    [ SnB PvP Guide | Link ]

    [ Runewarden Sparring Videos | Link ]
  • Try checking some of the svof triggers, some of them are wonky / incomplete. I know I had to add in quite a few.

  • I had to add a bunch for 2h limb hits.  But svo.valid.limb_hit should be what sets things in motion.  svo.sp contains all the parry functioning, as far as I can tell - in case you wanted to tinker with it for your trueparry stuffs.  All of that inevitably leads to the dreaded make_gnomes_work function.    make_gnomes_work is where I get lazy/indignant and start coding my own halfassed fixes again.
  • Yep, I have trueparry in my code but in general, svof doesn't handle trueparry. I'm using a timer script to switch parry on last hit with my queueing attacks.

    Though, svof itself isn't recognizing last hits until something triggers it. I enabled dragon class.
    I figured you can actually change the timer to a function, and call the function every balance to set the trueparry, instead of putting it on timer, cos there times the timer would miss updating the parry variable, also, timer is heavy I think, but it allows for...random parry shit.
  • Timer is better-ish, I think. Makes you less predictable since you don't parry switch on your balance all the time.

    [ SnB PvP Guide | Link ]

    [ Runewarden Sparring Videos | Link ]
  • Depends on the length of the timer. How it lines up with your balances is also not that relevant, it's all about how it lines up with your opponent's balances (and how your balances line up with your opponent's balances). You could always randomise actually switching your parry on each attack instead, which would remove the need for the timer.
  • I considered that but overlapping of balances will always happen given how most limb prep classes have balance time deviations of around 1 second of each other. Randomizing would definitely work but I think using a timer is an easier solution.

    [ SnB PvP Guide | Link ]

    [ Runewarden Sparring Videos | Link ]
  • There was an animated timer scirpt up here at some stage. Reading up on some docs for it it says it's not really working with Mudlet 3.0+. Can anyone confirm this?
  • Afaik, @Klendathu is using it for the ragetracker and it's been working well for 3.0+ for me.
  • KlendathuKlendathu Eye of the Storm
    I make use of Demonic's animated timers in both my rage tracker and harmonics tracker, had zero issues on Mudlet 3.0D with any of them.

    Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."
  • <3 Thanks guys
  • RaizenRaizen Somewhere
    Does anyone know how to pull the current "target" from Keneanung's bashing script for a CONSIDER trigger?
  • AhmetAhmet Wherever I wanna be
    Raizen said:
    Does anyone know how to pull the current "target" from Keneanung's bashing script for a CONSIDER trigger?
    keneanung.bashing.targetList[keneanung.bashing.attacking]
    Huh. Neat.
  • Not sure why you'd need a consider trigger though. gmcp.IRE.Target.Info.hpperc should have the current health state of the target.
  • So I am attempting to convert the prompt list of svo affs (from the @affs tag) into a table or something that I can instead echo into a miniConsole within my gui instead of in my prompt.

    I can get things working via cecho to display in the MiniConsole, but I can't populate a table/variable with the relevant data needed to have it echo in the miniConsole.

    Help?
Sign In or Register to comment.