Results 1 to 10 of 10

Thread: crosscharcom and other lich scripts

  1. #1

    Default crosscharcom and other lich scripts

    Just getting my feet wet with crosscharcom and wondering: is there a way I can send a command to another character to execute something like ;go2 or ;waggle, or a custom .script built into stormfront/wizard? Thanks in advance.

  2. #2

    Default

    If you're not too script savvy the easiest way is to just use whispers or private LNet messages.

    Be careful not to run afoul of the bot policy if you decide to use whispers.

  3. #3

    Default

    I guess I'm pretty unsavy because I don't even know how to make anything work with a whisper!
    Discord: danteprimus

  4. #4

    Default

    My bad, I didn't know you meant literally with crosscharcom because I thought that script broke a while ago.

    But if you wanted to get your feet wet with in the scripting world here is an easy way to do what you're asking for via whispers:

    Code:
    while line = get
    	if line =~ /^Greng whispers\, \"Waggle\.\"/
    		start_script "waggle"
    	elsif line =~ /^Greng whispers\, \"Go2 (\d+)\.\"/
    		start_script "go2", [$1]
    	end
    end
    This is a simple loop that feeds all game lines to the script, referred to as "line" in the script. If the line makes a match with one of the if commands it executes the code under the if command.

    For example:

    if line =~ /^Greng whispers\, "Waggle\."/

    Looks for the game line: Greng whispers, "Waggle."

    Once it sees that game line it starts the script waggle.

    The ^ just makes sure that is the beginning of the game line, all of the \'s is because it's best to put a \ before symbols when using a regex if you want to make a literal match of that symbol because many symbols mean something else on their own, so if you're matching a ? in a regex you want to escape out of it by doing \?

    The line:

    elsif line =~ /^Greng whispers\, "Go2 (\d+)\."/

    Is similar but the (\d+) part is specifically looking for numbers. When putting something in ()'s that makes a group, the first set of ()'s is group 1 referred to as $1, second group as $2 and so on.

    So if Greng whispers "Go2 400" to your character then 400 would be in the ()'s and thus be group 1 so

    start_script "go2", [$1]

    Would start the script ;go2 with the command to go to room 400.

    Scripting is fun!
    Last edited by Tgo01; 05-09-2019 at 02:15 AM.

  5. #5

    Default

    Alt +tab
    standing between the living and the dead

  6. #6

    Default

    This looks fun. Thanks for the tips.

    The reason I'm looking into this is because I've been alt+tabbing too long.
    Discord: danteprimus

  7. #7

    Default

    I would echo the advice to use a private lnet channel... don't use whispers. I find lnet channel much superior to crosscharcom, no connection issues, no issues with multiple computers, etc.

  8. #8

    Default

    Quote Originally Posted by Rjex View Post
    I would echo the advice to use a private lnet channel... don't use whispers.
    You don't want the GMs to see every whisper you send your alts?!

    You're not the voyeur I thought you were.

  9. #9

    Default

    Quote Originally Posted by Greng View Post
    Just getting my feet wet with crosscharcom and wondering: is there a way I can send a command to another character to execute something like ;go2 or ;waggle, or a custom .script built into stormfront/wizard? Thanks in advance.
    I'm assuming that you have figured out how to send basic in game commands like: sit,stand,kill... etc?

    You can execute code with crosscharcom by using "exec" as in...

    ;send to crosscharcom charactername exec start_script "waggle"

    You can do anything after exec that you could do with a ;eq one liner... you'll most likely have to hard code them into aliases..
    As an example, this is an alias I use:

    comehere => ;eq comehere = Room.current.id;send_to_script "crosscharcom", "wall exec start_script 'go',['#{comehere}']"

    wall just sends it to all connected clients since I use more than one. even if you are only using one, it'll work the same as entering the actual character name, it will also work both ways... from client -> server, and server -> client, or even client -> server and other clients


    If Dreaven and friends were all connected via crosscharcom... Dreaven could run by himself to the rift from the landing... type "comehere" and every single one of his followers would make their way to the rift on their own at the same time
    Last edited by adred; 05-12-2019 at 03:56 PM.
    adred0111 (discord)

  10. #10

    Default

    Excellent, thank you for that tip!

Similar Threads

  1. Lich Scripts
    By ryaden in forum Scripting Discussion
    Replies: 3
    Last Post: 10-28-2016, 08:41 PM
  2. Non Lich Scripts
    By everan in forum Scripting Discussion
    Replies: 2
    Last Post: 05-16-2016, 02:38 PM
  3. Recommended Lich Scripts
    By Shimmy in forum The Lich Project
    Replies: 7
    Last Post: 03-02-2012, 05:57 PM
  4. Best/favorite Lich scripts
    By Drew in forum The Lich Project
    Replies: 2
    Last Post: 08-18-2009, 09:50 PM
  5. Favorite lich scripts
    By Swami71 in forum The Lich Project
    Replies: 49
    Last Post: 06-05-2009, 06:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •