Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

HTML5 Client Questions and Such

1246715

Comments

  • PaikPaik Member Posts: 12 ✭✭ - Stalwart
    Antonius said:
    In that code args is an object, so trying to concatenate it with a string will implicitly call its toString() function. The result of calling toString() on an object that doesn't explicitly declare its own version of that function is [object Object]. You probably want to be using something like send_direct("give " + args[1], false); instead but I'm not familiar enough with the HTML5 client to be positive about that.

    Also, minor semi-related rant: I hate, hate, hate writing posts that include code on the forums; I keep wanting to use Markdown syntax and then remember it's not supported (because we can't have nice things, apparently).
    I know sweet f.a. about coding in any form, but I think I get the gist of what you're saying. I already tried a workaround like what (I think) you're suggesting, like:

    Command line: give cupcake Antonius
    Function: send_direct("give " + args[1] + " to " + args[2], false);

    But when I do that, it returns args[1] and args[2] as undefined. And then I shrug.
  • OrzaansynOrzaansyn Member Posts: 663 @@ - Legendary Achaean
    @Tecton 

    I had missed the upward button called "save client settings"...

    image
    image
    CidusiiShibumiUnad
  • LeoendithasLeoendithas Member Posts: 9
    hey i want to make an alias for harvesting herbs. i have set the alias as harvest1 then in the command box ive put harvest burdock, simple enough. but i want to use harvest1 and harvest all the plants in that area, what do i use to compensate for recovering balance?
  • AraeusAraeus Member Posts: 22 ✭✭ - Stalwart
    I am having a triggering issue. I have an alias to smite at target, kt smite @tar, but when I try to use it, it works for denizens but not for adventurers. I got a message saying "I'm sorry, but I cant see anyone here by that name" or something similar. Also I have another alias where is contemplate, smite, and chasten in one alias. Script as follows

     contemplate @tar| smite @tar| Chasten @tar The contemplate and chasten part work, but the smite doesnt. Any ideas? I am really bad at scripting.
  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Looks like you were not setting the @tar variable in the client. I've made a couple of grabs of a basic target and attack aliases, for you, or anyone else who is in this particular situation - HERE
  • PaikPaik Member Posts: 12 ✭✭ - Stalwart
    I'm writing a letter in the HTML pop-up window, and trying to insert line breaks between paragraphs. But when I read the letter after composing, none of those line breaks show up.

    This is true if I try enter twice, shift-enter twice, *insertline, <br>, pipeshift, \n, or any other of the myriad suggestions I've received in-game.

    Ideas on what to try from here? Thanks!
    Sybilla
  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    I think that's an issue with the new renderer, we're investigating it now. It'll look fine for everyone else, if that's any consolation!
  • PaikPaik Member Posts: 12 ✭✭ - Stalwart

    Tecton said:
    I think that's an issue with the new renderer, we're investigating it now. It'll look fine for everyone else, if that's any consolation!
    As long as it looks sexy for everyone else, that's fine with me. Thanks!
  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Paik said:

    Tecton said:
    I think that's an issue with the new renderer, we're investigating it now. It'll look fine for everyone else, if that's any consolation!
    As long as it looks sexy for everyone else, that's fine with me. Thanks!
    And fixed now!
  • PaikPaik Member Posts: 12 ✭✭ - Stalwart
    Sorry to keep pestering on here, but I'm finally starting to get the hang of the HTML client. Is awesome!

    So, is there any way to set up something like a table, where a bunch of different possible triggers will all produce the one, same command? I'm trying to make a highlight script for house/city enemies. I could make a separate trigger for each and every one of them, but that feels pretty clunky to me. How would I do a Boolean "IF enemy OR enemy OR enemy...THEN highlight"?

    Total coding newb. This seems like something simple, but I've no idea how to start going about it.
  • OcrydOcryd Member Posts: 7
    Where can I find a manual for HTML5?

    I found some references to it, but not able to locate it anywhere.

    Thank you
  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Ocryd said:
    Where can I find a manual for HTML5?

    I found some references to it, but not able to locate it anywhere.

    Thank you
    http://client.achaea.com/help/ (also available through the settings window (the cogs in the bottom right of the main window)) 
  • OcrydOcryd Member Posts: 7
    Thank you very much, Tecton, found both with no problem.

    Looks like a lot of reading ahead.
  • ScotiaScotia Member Posts: 2
    I'm completely new to HTML5, and I was wondering: is it possible to trigger a highlight on a variable? And how would I do that?

    For instance, if I wanted to highlight my current target, what would I need to put as the trigger text? (because from experience, @tar doesn't work)
  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Scotia said:
    I'm completely new to HTML5, and I was wondering: is it possible to trigger a highlight on a variable? And how would I do that?

    For instance, if I wanted to highlight my current target, what would I need to put as the trigger text? (because from experience, @tar doesn't work)
    Unfortunately, that isn't something that the client offers at this time! I've added it to our list of things to implement though, so hopefully you'll see it in the very near future.

    (If you're feeling particularly adventurous, you could make a trigger to check every word against the variable with some custom scripting, but that would require some knowledge of JavaScript!)
  • ScotiaScotia Member Posts: 2
    That's a shame! I'll figure something out.
  • CidusiiCidusii Member Posts: 346 ✭✭✭✭✭ - Grand Achaean
    edited March 2014
    D: For some reason the logging button didn't work. I had it running for a bunch of stuff I really wanted to review later, but when I turned it off and the popup showed up, the "save to disk" button wouldn't click at all. So painful. Any idea why?

    Edit: That was on Firefox. I just tried on Chrome, and it let me download the log. Frustrations!
  • AshiiAshii Member Posts: 1
    edited March 2014
    image
    image
    image

    Can someone tell me what im doing wrong?

    Save as package and import or look at pastebin:


    .. The error message I get is "ReferenceError Delay is not defined"
  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Just started playing around with the html5 client today, one thing I noticed is that the only background options I could find were the picture or plain black, I'd really like to have an option where I can make it plain black over the main console but keep the background image for everything else...just a little thing but can't hurt to put it out there!

    Another more relevant thing I noticed is that tabbing into the html5 client from elsewhere (another windowing editing settings for example) puts my cursor helpfully into the command bar, but if I click to return to the client page it doesn't, which is troublesome if I'm tabbed over and notice something happening and try to quickly switch back.


  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Adioro said:
    Just started playing around with the html5 client today, one thing I noticed is that the only background options I could find were the picture or plain black, I'd really like to have an option where I can make it plain black over the main console but keep the background image for everything else...just a little thing but can't hurt to put it out there!

    Another more relevant thing I noticed is that tabbing into the html5 client from elsewhere (another windowing editing settings for example) puts my cursor helpfully into the command bar, but if I click to return to the client page it doesn't, which is troublesome if I'm tabbed over and notice something happening and try to quickly switch back.

    For #1 - you can disable the transparency in the the settings menu, which will put everything on a plain black background.

    For #2 - As soon as you start typing, it should default to the input window here too, even if it's not selected.
  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Another thing I noticed is that when I have it set to show me prompts after everything it randomly doesn't, I'm not sure what's different about the times it doesn't, but it only happens after I receive output, never after I send or do something. IE, when the NPCs in the intro are talking to me it just leaves off the prompt sometimes.

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Thanks @Tecton! I noticed as well a noticeable amount of lag in drawing the map in the map window when changing areas, and that any map zoom is reset on changing areas, which is a little annoying.

  • TectonTecton The Garden of the GodsAdministrator Posts: 2,507 Admin
    Adioro said:
    Thanks @Tecton! I noticed as well a noticeable amount of lag in drawing the map in the map window when changing areas, and that any map zoom is reset on changing areas, which is a little annoying.
    Yeah, we're investigating solutions for the map change issue, largely depends on how the client handles the background loading. Some handle it a lot better than others.
  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Actually not 100% sure if this is html5 client or game, but GIVE SHAMAN TO RIMBA when Rimba isn't in the room returns that I'm currently targeting pygmy (after I changed tar to something else anyway!) but don't see any, which is really confusing and even took me as an experienced mudder a minute to puzzle out.

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    edited April 2014
    Is there a way to move, or if not, to remove, the avatar and gauges in the html5? I figured out how to move everything else around...

    edit: Figured out I can right click to unselect the status one for the gauges...but clicking avatar in that list doesn't do anything.

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Okay stupid questions time.

    First, are there any quick resources for getting html5 help (ie mudlet has a mudlet clan in game)?

    Second, how do I do tables in html5? In mudlet, I've always adhered to the practice of putting all my stuff in a master table to avoid conflict with imported or personal scripts (ie, sys = {} and then functions will be sys.myFunction() and variables sys.myVar = 2 and so on). So one of the first things I want to do is make a list of balances. So like,

    sys = sys or {}

    sys.balance = {
    balance = true,
    equilibrium = true,
    elixir = true,
    herb = true,
    salve = true,
    tree = true
    }

    Also, can I make that more complex?

    sys.vitals = {
    current = {health = 0, endurance = 0, mana = 0, willpower = 0},

    old = {health = 0, endurance = 0, mana = 0, willpower = 0},

    loss = {health = 0, endurance = 0, mana = 0, willpower = 0},

    max = {health = 0, endurance = 0, mana = 0, willpower = 0},

    percent = {health = 0, endurance = 0, mana = 0, willpower = 0}

    }


    Sorry for being slow please bear with :(


  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    edited April 2014
    Learning learning learning...an hour and a half later, I've come up with this:

    [spoiler]
    var sys = new Array();

    sys['vitals'] = new Array();
    sys['vitals']['bleeding'] = 0;
    sys['vitals']['current'] = new Array();
    sys['vitals']['current']['health'] = 0;
    sys['vitals']['current']['mana'] = 0;
    sys['vitals']['current']['endurance'] = 0;
    sys['vitals']['current']['willpower'] = 0;
    sys['vitals']['max'] = new Array();
    sys['vitals']['max']['health'] = 0;
    sys['vitals']['max']['mana'] = 0;
    sys['vitals']['max']['endurance'] = 0;
    sys['vitals']['max']['willpower'] = 0;
    sys['vitals']['percent'] = new Array();
    sys['vitals']['percent']['health'] = 0;
    sys['vitals']['percent']['mana'] = 0;
    sys['vitals']['percent']['endurance'] = 0;
    sys['vitals']['percent']['willpower'] = 0;
    sys['vitals']['old'] = new Array();
    sys['vitals']['old']['health'] = 0;
    sys['vitals']['old']['mana'] = 0;
    sys['vitals']['old']['endurance'] = 0;
    sys['vitals']['old']['willpower'] = 0;
    sys['vitals']['loss'] = new Array();
    sys['vitals']['loss']['health'] = 0;
    sys['vitals']['loss']['mana'] = 0;
    sys['vitals']['loss']['endurance'] = 0;
    sys['vitals']['loss']['willpower'] = 0;

    sys['areas'] = new Array();
    sys['areas']['the Valley of Lodi'] = new Array();
    sys['areas']['the Valley of Lodi']['targets'] = ["a juvenile wildcat", "an adult wildcat", "a wildcat servant", "a wildcat soldier", "a guard pig", "a portly gnome sentry", "a gnome sentry", "a skinny gnome sentry", "a deputy constable", "a lithe weasel", "a cave bat"];

    [/spoiler]

    Is this the best way to do this? (yay I went from wtf am i doing plz halp to how 2 do better???)

    edit: jk new problem:

    sys['areas'][the Valley of Lodi']['items'] = ["an empty tin flask", "a miner's pick"];

    The ' in the miner's pick is making the colors freak out how fix :( Is there an escape character to make it realize it's part of the string? Like \ or % in lua?

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    Okay new question new question...let's say I put that really big block of defining arrays in a function called, say, init_vitals. Can I then call that function in the onLoad one to keep it tidy without having to put all that crap and all the other crap in the same place?

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    edited April 2014
    How to call functions plz. Have this in onGMCP:

    [spoiler]
    if (args.gmcp_method == 'Char.Vitals') {
        sys_gmcp_vitals()
    }
    else if (args.gmcp_method == 'Room.Info') {
        sys_gmcp_room()
    }
    else if (args.gmcp_method == 'Char.Status') {
        sys_gmcp_status()
    }
    [/spoiler]

    Have appropriately named functions created. See this:

    Error in Function [onGMCP]:
    ReferenceError: sys_gmcp_vitals is not defined


    edit: WAIT I FOUND IT. Nvm. :)

    edit2: Wait no I didn't halp :(

    edit3: Wait yes I did! Yesssssssssss...!

    run_function("sys_gmcp_vitals")

  • AdioroAdioro Member Posts: 98 ✭✭✭ - Distinguished
    edited April 2014
    I should probably go to bed but now I'm all excited about learning also I found answers to like half the things I asked so let me recap more briefly the ones I didn't...

    • Are there any resources for quick html5 help, like mudlet has the mudlet clan in game?
    • Is there any way to move the gauges/avatar (rearranging windows won't let me move those two) or to remove the avatar?
    • Is there an escape character that will let me use 's in strings without it doing weird things?

    And new questions cropping up...

    • I use stopwatches religiously in mudlet, is there an equivalent for the html5 or do I need to work with tempTimer type things?
    • In a similar vein, I really want to do something that tracks how long has passed since X and displays the time, is there an easier way to do this than what I'm thinking with stopwatches?

    Sorry to be crazy wish post edit timer was longer thanks for patience!

    edit: PS is there any way to make it save settings when you qq or...? Must not code tired will lose all settings. :(


Sign In to Comment.