View Full Version : Gem Sining script
Tenzle
02-27-2011, 05:38 PM
Is there a nice gem singing script anywhere out there? I know there used to be a nice one on the repos but I cant seem to find anything on there now. I'd love it if someone could point me in the correct direction.
Edit -- Neg rep for a typo now on an online forum, you have got to be kidding me.
Joseph
02-28-2011, 04:32 AM
erm..yeah can't log in to see if its still on repo or not.. but here.. slight editing required... shouldn't be difficult to figure out.
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
if Char.name == 'Emislity'
$pure_gemsack = GameObj.inv.find {|inv| inv.noun == 'backpack'}
$pure_orbsack = GameObj.inv.find {|inv| inv.noun == 'longcoat'}
$pure_sellsack = GameObj.inv.find {|inv| inv.noun == 'cloak'}
end
unless $gemnames.defined?
start_script('database_setup')
sleep 1
unless $gemnames.defined?
pure_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.")
Tenzle
02-28-2011, 09:19 AM
Perfect, thank you very much!
Tenzle
02-28-2011, 10:46 AM
I made a couple of changes to the script if anyone would like to use it:
now it uses the gameobj-data.xml instead of looking for the database script (which is not on the repository anymore)
I also have it set up for a slightly lower bard -- so that i stop singing at the improves somewhat message, so I blow up a lot fewer gems
$pure_gemsack = GameObj.inv.find {|inv| inv.noun == 'pack'}
$pure_orbsack = GameObj.inv.find {|inv| inv.noun == 'sack'}
$pure_sellsack = GameObj.inv.find {|inv| inv.noun == 'cloak'}
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|more perfect/
$pure_count += 1
$gemstatus = 'notdone'
elsif result =~ /shatter/
$pure_shattered += 1
$gemstatus = 'shattered'
elsif result =~ /cannot be|somewhat/
$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 gem.type =~ /gem/
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.")
DaCapn
02-28-2011, 10:09 PM
I just use gibs_purify which is on the repo. There may be a minor mistake concerning tusks, tooths, nuggets, and/or ivory. I think one or some of those are in the list of gems that shouldn't be or vice-versa. Whatever the case, you won't need to edit it for it to function.
I usually run such scripts with a wrapper that adds in some other features. For purification specifically I have a script that detects wounds, pauses purification, heals down, etc.
Tenzle
03-01-2011, 01:38 PM
I'm pretty sure all of gibs scripts are down off the repos as of pretty recently.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.