View Full Version : Script help
wetsand
05-14-2020, 09:42 PM
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?
lexbubba
05-15-2020, 12:21 AM
can you adapt ;heal or ;heal2 to cover to what you need?
Tgo01
05-15-2020, 12:42 AM
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
wetsand
05-15-2020, 10:55 AM
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:
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.]
Greng
05-17-2020, 08:08 PM
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?
Tgo01
05-17-2020, 08:12 PM
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."
Tgo01
05-17-2020, 08:16 PM
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:
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.]
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
Elgrim
05-18-2020, 11:23 AM
Dreaven's face is awesome. That is all.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.