[Mod] EmpyrionCommandCrate v2.9.2 (EmpyrionSpotGuard addon)

Discussion in 'Empyrion API' started by Exacute, Jul 23, 2018.

  1. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    Got it working. Thank you again for spending the time with me. I can't stress enough how helpful this tool is, I hope others realize it and use it as well.

    I'm sure I'll be seeking advice when I screw something up as I merge on to bigger and better things and ideas.
     
    #61
    Ephoie and Exacute like this.
  2. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    So I have all my basic stuff working, and I was working on spawning bases for random events for my members to do for fun. I got it to work and it went well. However, sometimes the POI's I randomly pick are too easy.

    I noticed you can spawn in enemies using the debug menu, I am assuming those are hidden commands somewhere in the ai maybe?

    I would love to be able to spawn an enemy, or 5, within say 5 coord or so from a target players coords. Is this something that can be done with commandcrate?

    I can't find the actual internal game commands/process to spawn enemies to even start trying to write something for commandcrate to be able to send.

    any ideas?
     
    #62
    Ephoie likes this.
  3. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    something like /spawnmonster playername golemice 2

    and that would drop 2 golems on their heads as a surprise. :)
     
    #63
    Ephoie likes this.
  4. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    It would be nice
    I believe it *might* be possible with the new modAPI (not certain, but there were talk about it atleast I think)
    It is however not possible with current
    My best suggestion would be to make very simple POIs that just barely function + have a spawner or ten & spawn these, and delete them after
    (Destroying from console cmd destroy <entityid>)
     
    #64
    Ephoie likes this.
  5. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    10-4 Thanks.
     
    #65
    Ephoie likes this.
  6. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    So I am wanting to use cc to announce when a player levels. I see in 1.17 we can add Hooks and I see various types to use like playerdeath, connect, etc. I don't see one for PlayerLevel. does that exist? Can this be done with cc?
     
    #66
    Ephoie likes this.
  7. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    I don't quite recall what {PlayerExp} returns, but I believe you can determine what level they are based on that; If you make a script that runs every few secs, checking if this value is different than last threshold you want, you can prolly do something;
    There's nothing natively doing it, since frankly levels have been a bit of a joke so far :p (And would take some amount of ressources to check every so often just to toss an event for.. New API may have a better way to go about it, so might add it in the future)

    But atm, I think your best bet would be to store some data about the player, if PlayerExp works like I recall, you can use it to determine their level, and then every idunno minute? check if their resolved value is greater than stored when resolved to levels
     
    #67
    Ephoie likes this.
  8. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    Makes sense. Honestly I dunno if the idea of congratulations in chat is worth the resources to have a script run all the time. It was a cool thought, but probly worth way more effort than rewards. lol
     
    #68
    Ephoie and Exacute like this.
  9. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    You can ofc. make the delay whatever you feel like. Can run every min even, if you're fine with the messages being potentially delayed by a min (etc)
     
    #69
    Ephoie likes this.
  10. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    Hey boss, is there a hook that I can toss up a telnet text to when a player (any player) enters a certain playfield?
     
    #70
    Ephoie likes this.
  11. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Yeah, have a look at these;

    (Second and third)


    Code:
      1.17.1 - HookOn:   
       (String, required if you use Hooks (see 1.17))
       What detail do you want the mod to 'hook' onto.
       - 'gamestart': Will fire when the first player enters the game, since last server start. Might be usefull for setting some dynamic variables.
    
       - 'changedplayfield': Will fire when a player changes playfield. You may use {thisplayer}: triggering players entityid, {thissteam}: triggering players steamid, {thisplayfield}: playfield changed TO, {previousplayfield}: playfield changed FROM (names of playfield).
    
       - 'firstonplayfield': Similar to 'changedplayfield', but will only fire the first time any player enters the playfield, since last server start. You may use {thisplayer}: triggering players entityid, {thissteam}: triggering players steamid, {thisplayfield}: playfield changed TO
     
    #71
    Ephoie likes this.
  12. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    I can't believe I looked right over that section. lol. Thank you sir.
     
    #72
    Ephoie likes this.
  13. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    Ok, so....according to this section under 1.17.1

    - 'changedplayfield': Will fire when a player changes playfield. You may use {thisplayer}: triggering players entityid, {thissteam}: triggering players steamid, {thisplayfield}: playfield changed TO, {previousplayfield}: playfield changed FROM (names of playfield).

    I read that as I can use {thisplayfield} as the playfield the person is changing to.

    So when I use that, it resolves as a string as is, not the actual playfield name.

    If I use {PlayerPlayfield} or {TargetPlayfield} it resolves to the playfield the person is leaving, not going to, therefore fires when they leave....and I want it to fire when they enter.

    this is my code of a little practice thing I'm messing with to nail down the logic:


    Code:
    Entries:
    
    #PVP Gold Farming Zone#
    
    - EntryKey: EnterGoldZone
      Version: 1.0
      CommandEntry:
      - i: 0
        type: key
        key: gold
      Hooks:
      - HookOn: changedplayfield
        HookCommand: gold
      Actions:
      - Conditionals:
        - Conditions:
          - Condition: "{thisplayfield}==El Dorado Asteroid Field"
        ExecuteCommand:
        - TextAll: "{PlayerName} has entered El Dorado to search for riches.  Kill them."


    Ultimately I will like to make a message saying the person left the playfield and you missed your chance to kill them and take their ****, and a message that says a person entered teh area, go kill them and take their ****.

    Where am I going wrong on the playfield section?
     
    #73
    Ephoie likes this.
  14. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Ok, so
    The hook parameters can only be used in "HookCommand"
    So if you want to transfer the playfield they are changing to, you need to do like HookCommand: gold {thisplayfield}
    And in the commandentry have a second param for the playfield
    You may want to encase it in '{thisplayfield}' since it can contain spaces
     
    #74
  15. Killian

    Killian Ensign

    Joined:
    Dec 8, 2016
    Messages:
    1
    Likes Received:
    1
    cant dl mod. paypal link is down
     
    #75
    Ephoie likes this.
  16. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    Exacute, still around brother? I tried to send you a DM but I'm not sure I did it right as I never message via here, lol.
     
    #76
    Ephoie likes this.
  17. ASTIC

    ASTIC Captain

    Joined:
    Dec 11, 2016
    Messages:
    993
    Likes Received:
    707
    I'm afraid he turned away from Empyrion in frustration (like so many others) :-(
     
    #77
    Ephoie likes this.
  18. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    :-( Sad news.
     
    #78
    Ephoie likes this.
  19. Taelyn

    Taelyn Guest

    what you exaclty need? I can reach him if needed
     
    #79
    Ephoie likes this.
  20. Ernicus Maximus

    Ernicus Maximus Lieutenant

    Joined:
    May 7, 2019
    Messages:
    52
    Likes Received:
    28
    I was just going to reach out to him to see if he would be updating CC to work with recent updates; or to see if he had any suggestions on what I could to to make it work. It was an invaluable tool and I loved all that it could do and how much it simplified my workload as an admin.

    The ability to have custom scripting was great and I had automated 90% of the routine tasks through scripts I wrote via CC.
     
    #80
    Ephoie likes this.

Share This Page