View Full Version : Pure.lic
Swami71
08-26-2009, 01:41 AM
The pure script seems to have a bug in it. When a gem can't be purified further it sings to the gem to check if its an orb. But it puts it in the orb container whether its and orb or not. Anyone willing to update it?
IFAIL@scripting
Joseph
08-26-2009, 06:03 AM
No guarntees but you can try this.
if Char.name == 'Trace'
$pure_gemsack = GameObj.inv.find {|inv| inv.noun == 'tunic'}
$pure_orbsack = GameObj.inv.find {|inv| inv.noun == 'shirt'}
$pure_sellsack = GameObj.inv.find {|inv| inv.noun == 'satchel'}
end
unless $gemnames.defined?
start_script('database_setup')
sleep 1
unless $gemnames.defined?
jars_message('Unable to define $gemnames please download database_setup.lic')
exit
end
end
def pure_message(message)
if $fake_stormfront then puts("\034GSL\r\n") else puts("<pushBold\/>") end
puts("===========================================")
puts("| " + message)
puts("===========================================")
if $fake_stormfront then puts("\034GSM\r\n") else puts("<popBold\/>") end
end
$pure_loresong = " that I hold,;let your purpose be told."
$pure_start_time = Time.now
$pure_gems = 0
$pure_shattered = 0
$pure_madeorb = false
$pure_recharge = false
def pure_1004(gemid)
until checkmana(10)
end
waitcastrt?
fput "prepare 1004"
fput "sing ##{gemid}"
prep = waitfor("You don't have a spell prepared!","you weave", "You sing a melody")
if prep =~ /have a spell prepared/
return 'casterr'
end
result = waitfor('essence',"gem becomes more perfect","shatter","crack","appearing smoother and more pure", "improves somewhat","cannot be")
if result =~ /more perfect|improves somewhat|crack|shatter|cannot be|smoother and more pure in color/
nextline = get
if nextline =~ /essence/
$pure_count += 1
$gemstatus = 'orb'
end
if result =~ /smoother and more pure in color|crack|somewhat|more perfect/
$pure_count += 1
$gemstatus = 'notdone'
elsif result =~ /shatter/
$pure_shattered += 1
$gemstatus = 'shattered'
elsif result =~ /cannot be/
$pure_count += 1
if $pure_count > 1
$gemstatus = 'done'
else
$gemstatus = 'loresing'
end
end
end
end
def pure_loresing(gem)
until checkmana(10)
end
fput("loresing #{gem.name}#{$pure_loresong}")
result = waitfor("pulse", "pulses", "draw power", "gem of some kind")
if result =~ /pulse/
pure_message("*** THIS GEM IS MAGE RECHARGABLE ***")
$gemstatus = 'mr'
elsif result =~ /draw power/
$gemstatus = 'orb'
else
$gemstatus = 'done'
end
waitrt?
end
$pure_gemsack.contents.each {|gem|
if $gemnames.include?("#{gem.name}")
fput "get ##{gem.id}"
$pure_gems += 1
$pure_count = 0
$gemstatus = 'notdone'
until(($gemstatus == 'orb') or ($gemstatus == 'mr') or ($gemstatus == 'done') or ($gemstatus == 'shattered'))
if $gemstatus == 'loresing'
pure_loresing(gem)
elsif $gemstatus == 'shattered'
$pure_shattered += 1
elsif $gemstatus == 'notdone'
pure_1004(gem.id)
end
end
if $gemstatus == 'mr'
until GameObj.right_hand.name == 'Empty'
sleep 0.7
end
elsif $gemstatus == 'orb'
fput "_drag ##{gem.id} ##{$pure_orbsack.id}"
elsif $gemstatus == 'done'
fput "_drag ##{gem.id} ##{$pure_sellsack.id}"
elsif $gemstatus == 'shattered'
until !checkstunned
sleep 0.7
end
end
end
}
pure_message("#{$pure_gems} purified | #{$pure_shattered} broken")
pure_message("and that took #{Time.now - $pure_start_time} seconds... exiting.")
Swami71
08-26-2009, 06:54 AM
Is it the same format/syntax to run it. Unpure container, pure container, orb container? I don't think it even looks in my backpack.
;pure backpack greatcloak sack
--- Lich: pure active.
===========================================
| 0 purified | 0 broken
===========================================
===========================================
| and that took 0.001 seconds... exiting.
===========================================
--- Lich: pure has exited.
Joseph
08-26-2009, 07:04 AM
ok you have to use tillmen's lich hence GameObj. and you have to interact with your gemsack atleast once.. look into it or put something in it. before starting this script (as well as having a stow sack set and having Display Inventory Boxes toggled to on)
ugh.. and also you are starting the script incorrectly edit this part to put your variables in
if Char.name == 'Trace'
$pure_gemsack = GameObj.inv.find {|inv| inv.noun == 'tunic'}
$pure_orbsack = GameObj.inv.find {|inv| inv.noun == 'shirt'}
$pure_sellsack = GameObj.inv.find {|inv| inv.noun == 'satchel'}
end
Use your name aswell as the NOUNS for the containers you use.
Swami71
08-26-2009, 07:07 AM
ok you have to use tillmen's lich hence GameObj. and you have to interact with your gemsack atleast once.. look into it or put something in it. before starting this script (as well as having a stow sack set and having Display Inventory Boxes toggled to on)
Tillmen's lich - check
interact with gemsack - will do now
stow sack set - I have to have my sack (orb container) set as my stow default in SF?
Inventory boxes in SF - Check
Joseph
08-26-2009, 07:09 AM
stow sack set - I have to have my sack (orb container) set as my stow default in SF?
no, you just need to have it set. And since another bard ran into this problem... if you use a heavily (and poorly) scripted container as the orbsack .contents will not work for that container.
Swami71
08-26-2009, 07:12 AM
Okay it sang once and then froze.
;pure
--- Lich: pure active.
[pure]>get #87678450
You remove a star sapphire from in your spidersilk backpack.
>
[pure]>prepare 1004
You begin your musical chant for Purification Song...
Your spellsong is ready.
>
[pure]>sing #87678450
You sing a melody, directing the sound of your voice at a star sapphire.
In response to your voice, the star sapphire glows luminously, its crystalline structure reforming as the gem becomes more perfect.
When the song ends, you notice the star sapphire sparkles a little more and is void of some natural imperfections.
Sing Roundtime 3 Seconds.
>
Joseph
08-26-2009, 07:18 AM
I think you have to have some other script interfering with the way it works, becuase it works fine and dandy for me.
--- Lich: pure2 active.
[pure2]>get #87690824
You remove a green sapphire from in your grey elven tunic.
[pure2]>prepare 1004
You change your tune slightly, adding the element for Purification Song to your song...
[pure2]>sing #87690824
You weave another verse into your harmony, directing the sound of your voice at a green sapphire.
In response to your voice, the green sapphire glows luminously, its crystalline structure reforming as the gem becomes more perfect.
When the song ends, you notice the green sapphire sparkles a little more and is void of some natural imperfections.
[pure2]>prepare 1004
You change your tune slightly, adding the element for Purification Song to your song...
[pure2]>sing #87690824
You weave another verse into your harmony, directing the sound of your voice at a green sapphire.
In response to your voice, the green sapphire glows luminously, its crystalline structure reforming as the gem becomes more perfect.
When the song ends, you notice the green sapphire sparkles a little more and is void of some natural imperfections.
[pure2]>prepare 1004
You change your tune slightly, adding the element for Purification Song to your song...
[pure2]>sing #87690824
You weave another verse into your harmony, directing the sound of your voice at a green sapphire.
In response to your voice, the green sapphire glows luminously, its crystalline structure reforming as the gem becomes more perfect.
When the song ends, you notice the green sapphire sparkles a little more and is void of some natural imperfections.
[pure2]>prepare 1004
You change your tune slightly, adding the element for Purification Song to your song...
[pure2]>sing #87690824
You weave another verse into your harmony, directing the sound of your voice at a green sapphire.
In response to your voice, the green sapphire glows luminously, its crystalline structure reforming as the gem becomes more perfect.
When the song ends, you notice the green sapphire sparkles a little more and is void of some natural imperfections.
>;k pure2
--- Lich: pure2 has exited.
Swami71
08-26-2009, 07:23 AM
>;l
--- Lich: pure.
Joseph
08-26-2009, 07:30 AM
LOL fix inc.. sorry I have never seen a bard that dosn't leave other songs running.
Joseph
08-26-2009, 07:33 AM
Origional post updated w/ script that works for a bard not running any other songs.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.