mudlet influencer

edited September 2013 in Mechanic's Corner
wrote an auto-influence thingy, simple and effective. Requires that you have at least to 'praise' in influence.
note: if you want this, and do NOT have up to praise, send me a message with your highest influence skill and ill tweak it for you.

I'm a beginner, but this is effective and works well.

Aliases:

inf <target> = sets influence target (target variable is 'tar' you may replace it with something else)

einf = empower start
pinf = paranoia start
winf = weaken start
cinf = charity start
sinf = seduction start

the aliases can be entered to either toggle on or off. So entering the aliases again turns off the influencer.


available for download at: http://www.fileswap.com/dl/eTcWdPruUg/


Any bugs, just post here.

Comments

  • ZouviqilZouviqil Queen of Uberjerkiness
    Hum. Interesting choice of aliases.

    Mine is something like (as Mudlet is closed at the moment)...

    ^inf(type|tar)? ?([0-9a-zA-Z]+)?$

    inftype <type> to set the type (empower, paranoia, weaken, charity, or seduction)
    inftar <target> to set the target
    inf to start.
  • Zouviqil said:
    Hum. Interesting choice of aliases.

    Mine is something like (as Mudlet is closed at the moment)...

    ^inf(type|tar)? ?([0-9a-zA-Z]+)?$

    inftype <type> to set the type (empower, paranoia, weaken, charity, or seduction)
    inftar <target> to set the target
    inf to start.
    its like this because I'm just beginning to script, and while it is a bit inefficient it does indeed work. It used to have a different trigger for every influence type, haha, before I finally figured out how to condense it into one trigger
  • ZouviqilZouviqil Queen of Uberjerkiness
    Malikai said:
    Zouviqil said:
    Hum. Interesting choice of aliases.

    Mine is something like (as Mudlet is closed at the moment)...

    ^inf(type|tar)? ?([0-9a-zA-Z]+)?$

    inftype <type> to set the type (empower, paranoia, weaken, charity, or seduction)
    inftar <target> to set the target
    inf to start.
    its like this because I'm just beginning to script, and while it is a bit inefficient it does indeed work. It used to have a different trigger for every influence type, haha, before I finally figured out how to condense it into one trigger
    If you know how to use conditional statements (if ____ then _____ elseif ____ then _____ else _____ end), you could do it quite easily. Just requires knowledge of if-elseif-else statements and some regex. I think my tutorial's still on the forums if you've not seen it.

    Each to their own on the construction of their code and scripts, though. Glad it works for you. :)
  • If you want a fun challenge to learn more about scripting, you could see about reading out GMCP information to see what skills a player has in the influence set, and build up an array with the skills for each influence type, and then use those to have an always-working script. Pro points if you build in error handling for cases like someone not having any skills of an influence type :)
    image
    You have received a new honour! Congratulations! On this day, you have shown your willingness to ensure a bug-free Lusternia for everyone to enjoy. The face of Iosai the Anomaly unfolds before you, and within you grows the knowledge that you have earned the elusive and rare honour of membership in Her Order.
    Curio Exchange - A website to help with the trading of curio pieces in Lusternia.
  • edited September 2013
    Rialorm said:
    If you want a fun challenge to learn more about scripting, you could see about reading out GMCP information to see what skills a player has in the influence set, and build up an array with the skills for each influence type, and then use those to have an always-working script. Pro points if you build in error handling for cases like someone not having any skills of an influence type :)
    could you give me a basic run-through of doing this, or a link to a resource where I can learn how? And is there a way to implement it into the code I already have here, or should I write from scratch?
  • ZouviqilZouviqil Queen of Uberjerkiness
    Malikai said:
    Rialorm said:
    If you want a fun challenge to learn more about scripting, you could see about reading out GMCP information to see what skills a player has in the influence set, and build up an array with the skills for each influence type, and then use those to have an always-working script. Pro points if you build in error handling for cases like someone not having any skills of an influence type :)
    could you give me a basic run-through of doing this, or a link to a resource where I can learn how? And is there a way to implement it into the code I already have here, or should I write from scratch?
    For gmcp, this is generally a good start.
  • Typing 'lua gmcp' in the command box of Mudlet while logged on should dump the big table with variables. Use the document that Zou linked to help you navigate it. Skills should be under gmcp.Char.Skills.List, again you can use the lua alias that comes with Mudlet by default to echo just that part of the table. Mudlet keeps everything in a nicely nested table structure so that is half the work done. You can use the table.contains function of Mudlet to check if a table contains a specific value, and use that to determine if a player has a skill. The Mudlet wiki is an excellent resource if you are not looking at that already. I haven't looked at your code yet but it should be easy enough to tack it on.

    To keep things easy, write a function in a scrip that goes and gets the information from GMCP and build a table per influence type with the skills a player has by using an if structure with table.contains. Execute that function by having a trigger call it when logging in, that is an easy way to do it (more advanced would be to tie it to GMCP events, but let's not go there for now). Then you can have your influencer loop through the different influence types of the table relevant to the type you want to run, for example your charities table when using your cinf alias.

    Keeping this vague intentionally so you can puzzle a bit on your own, if you do get stuck let us know.
    image
    You have received a new honour! Congratulations! On this day, you have shown your willingness to ensure a bug-free Lusternia for everyone to enjoy. The face of Iosai the Anomaly unfolds before you, and within you grows the knowledge that you have earned the elusive and rare honour of membership in Her Order.
    Curio Exchange - A website to help with the trading of curio pieces in Lusternia.
  • NeosNeos The Subtle Griefer
    A shortcut could be to check the last skill listed, and go from there.
    Love gaming? Love gaming stuff? Sign up for Lootcrate and get awesome gaming items. Accompanying video.

     Signature!


    Celina said:
    You can't really same the same, can you?
    Zvoltz said:
    "The Panthron"
  • NeosNeos The Subtle Griefer
    edited September 2013
    Just noticed this double post.
    Love gaming? Love gaming stuff? Sign up for Lootcrate and get awesome gaming items. Accompanying video.

     Signature!


    Celina said:
    You can't really same the same, can you?
    Zvoltz said:
    "The Panthron"
  • IF you look in my package, the influencer I include does a gmcp scan for the skills you have available. I believe I checked the last skill listed, like Neos said.
  • for anybody using this script: the paranoia alias needs fixing, as do the triggers. just change the weaken names to the proper paranoia names and it will work fine.
    A whisper from the trees and a frosty presence tells you, secretly, "But you are strong, little 
    flower, and wise." The voice shifts and expands, becoming more real. "And everything you just said 
    in the ritual made me feel safer. You should, too."
Sign In or Register to comment.