View Full Version : Fletch script in 4.6.22?
critter
03-21-2015, 05:48 PM
I had been using Fletching, but now if I don't have a branch of wood in my pack, instead of checking for wood that's already been broken up into shafts, the script bugs and ends. Does anyone know of another that'll work with the new version of Lich?
Tgo01
03-21-2015, 05:52 PM
sammu doesn't work?
critter
03-22-2015, 01:27 PM
Seems not. I just tried setting it up; I got everything entered, and when I hit Save, it gave me an error message and didn't save anything.
--- Lich: error: undefined method `smsg' for #<Scripting::SAmmu:0xba035e8>
sammu:649:in `block in setup'
sammu:647:in `loop'
--- Lich: sammu has exited.
>;sammu setup
I'm going to tinker with it and see if I can get it to work, but I never actually learned how to use Ruby, so if it's not obvious, I doubt I'll have luck.
Whirlin
03-22-2015, 01:28 PM
I was using ultrafletch with some limited success until the latest Lich patch.
critter
03-22-2015, 01:33 PM
Nope. I can see what the issue is, but I don't know what it should be instead.
loop {
if save
smsg '-- settings saved', :all
gtk.save_new
save = false
end
break if done
sleep 0.10
}
Donquix
03-22-2015, 03:38 PM
is sammu still trying to use the old "slib" functions spiffy was putting in a separate script for a while? i thought he took those all out.
critter
03-24-2015, 02:45 PM
I don't *think* so. The issue seems to be the smsg command, third line of what I copied. Is that the proper command for Ruby to show a message? Or has it changed? I'll gladly keep tinkering, but I haven't had any luck yet.
m444w
03-24-2015, 03:02 PM
smsg appears to be a custom method that was removed at some point.
replace:
smsg '-- settings saved', :all
with:
respond '-- settings saved'
Arulisse
03-24-2015, 03:06 PM
Are you making arrows you actually plan to use or leveling in artisan skill ranks?
Whirlin
03-24-2015, 03:50 PM
smsg appears to be a custom method that was removed at some point.
replace:
smsg '-- settings saved', :all
with:
respond '-- settings saved'
SMSG was used a lot of places in the code... should it be replaced with respond, and remove the :all for all instances?
m444w
03-24-2015, 04:19 PM
Well, in that case to get it back up and running again without having to do a bunch of find&replace operations add this to the top of the file:
def smsg(msg, *who_cares)
respond msg
end
provided it always has the String it wants to send as the first argument in the code it should prevent it from breaking on that anymore, but retain the output capabilities of the function.
Let's just hope it's not some overloaded function that had a bunch of cases.
Whirlin
03-24-2015, 04:22 PM
Well, in that case to get it back up and running again without having to do a bunch of find&replace operations add this to the top of the file:
def smsg(msg, *who_cares)
respond msg
end
provided it always has the String it wants to send as the first argument in the code it should prevent it from breaking on that anymore, but retain the output capabilities of the function.
Let's just hope it's not some overloaded function that had a bunch of cases.
Urgh... more... It's trying to utilize SLIB to do a check silvers function... is there an easier variable it can use?
also:
--- Lich: error: undefined method `get_item' for #<Scripting::SAmmu:0xf9a2ea0>
sammu:794:in `get_shaft'
sammu:825:in `check_state'
--- Lich: sammu has exited.
[ Haste: +0:01:07, 0:01:07 remaining. ]
m444w
03-24-2015, 04:36 PM
is slib no longer on the repo?
Tillmen
03-24-2015, 04:49 PM
What version of Lich are you using? I know it says 4.6.22 in the thread title.. but it would explain a lot if that was a mistake.
Whirlin
03-24-2015, 06:55 PM
I know I'm running 4.6.22
critter
03-25-2015, 11:03 AM
I'm looking for a script that'll make useable arrows, not rank me up.
I'm certain I'm using 4.6.22. "--- Lich v4.6.22 is active. Type ;help for usage info."
critter
03-25-2015, 11:13 AM
Hm. I tried both changing that particular instance of smsg to msg and Adding the definition at the beginning. It's saving my info now, but still giving me a similar error:
--- Lich: error: undefined method `msg' for #<Scripting::SAmmu:0x10411e18>
sammu:649:in `block in setup'
sammu:647:in `loop'
--- Lich: sammu has exited.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.