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: danteprimus

  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,165

    Default

    Dreaven's face is awesome. That is all.


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

Similar Threads

  1. Learn how to script with this simple hunting script
    By Tgo01 in forum The Lich Project
    Replies: 69
    Last Post: 08-24-2020, 03:20 PM
  2. adding a custom script to my script folder
    By sentral in forum The Lich Project
    Replies: 1
    Last Post: 08-09-2016, 10:05 AM
  3. Replies: 19
    Last Post: 02-03-2010, 09:49 PM
  4. In Search of COL Script and a Huntin Script...
    By Gizmo in forum Scripting Discussion
    Replies: 5
    Last Post: 01-13-2005, 06:15 PM
  5. Pookas: Smart cone script and 906 bolt script.
    By J-Tech in forum Scripting Discussion
    Replies: 27
    Last Post: 01-15-2004, 03:06 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
  •