Results 1 to 8 of 8

Thread: Script help

  1. #1

    Default Script help

    I'm trying to write up a simple script to use a healing script on a f2p empath character.

    Basically what I'd like to do is:

    link to a target
    wait for link
    activate a healing script
    wait for healing script to end
    unlink from the target

    Anyone mind helping me put that together?

  2. #2

    Default

    can you adapt ;heal or ;heal2 to cover to what you need?

  3. #3

    Default

    Code:
    fput "touch #{script.vars[1]} link"
    waitfor "You sense a successful empathic link has been forged between you and #{script.vars[1]}."
    start_script "HEALING SCRIPT NAME HERE", [ "#{script.vars[1]}" ]
    wait_while{ running?('HEALING SCRIPT NAME HERE') }
    fput "unlink"
    So to use this script you would do (assuming you named it "link"): ;link wetsand

  4. #4

    Default

    Wonderful, thank you.

    edit: I forgot one thing, how would I make it exit if I can't link with the target?

    Heres the failed link messaging:

    Code:
    As you touch xxxx, you concentrate on establishing an empathic link, but the link fails.
    [Because your account is free, you cannot heal the same character repeatedly without first healing a few other characters.  You may purchase a Healing Pass to relax this restriction.  To purchase access, please visit the SimuCoins Store.]
    Last edited by wetsand; 05-15-2020 at 11:11 AM.

  5. #5

    Default

    I'd like to piggy back off this - I want to create a similar script for moving gems around, but can't seem to work the variable section for a two word noun, such as "white opal"

    What can I use instead of #{script.vars[1]} which grabs the first "white" it sees?
    Discord: Dante#0391

  6. #6

    Default

    Quote Originally Posted by Greng View Post
    I'd like to piggy back off this - I want to create a similar script for moving gems around, but can't seem to work the variable section for a two word noun, such as "white opal"

    What can I use instead of #{script.vars[1]} which grabs the first "white" it sees?
    #{script.vars[1]} #{script.vars[2]} would allow you to do "white opal."

  7. #7

    Default

    Quote Originally Posted by wetsand View Post
    Wonderful, thank you.

    edit: I forgot one thing, how would I make it exit if I can't link with the target?

    Heres the failed link messaging:

    Code:
    As you touch xxxx, you concentrate on establishing an empathic link, but the link fails.
    [Because your account is free, you cannot heal the same character repeatedly without first healing a few other characters.  You may purchase a Healing Pass to relax this restriction.  To purchase access, please visit the SimuCoins Store.]
    Code:
    fput "touch #{script.vars[1]} link"
    while line = get
    if line =~ /^You sense a successful empathic link has been forged between you and/
    	start_script "HEALING SCRIPT NAME HERE", [ "#{script.vars[1]}" ]
    	wait_while{ running?('HEALING SCRIPT NAME HERE') }
    	fput "unlink"
    	break
    elsif line =~ /^As you touch .*\, you concentrate on establishing an empathic link\, but the link fails\./
    	break
    end

  8. #8
    Join Date
    Feb 2010
    Location
    Louisville, KY
    Posts
    1,138

    Default

    Dreaven's face is awesome. That is all.


    Selling Stuff and Things
    Adakos#0001 on Discord or Elgrim on the Official GS Discord server under Nitro Boosters.

Posting Permissions

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