View Full Version : Bored...anyone need a script written?
Tgo01
12-14-2014, 09:16 PM
I usually just use the last npc in the room.
person = GameObj.npcs.last
Well sure if you wanna do it the easy way.
Whirlin
12-23-2014, 09:33 AM
1) Can you update the OP with all the scripts you made. Repo? F that.
2) http://forum.gsplayers.com/showthread.php?93855-Ambush-RT&p=1730643 Make me a script to record pre and post-hasted RT, while keeping haste active, and dropping/picking up coins up to whatever a character's weight limit allows. If you add a little interface to give a report at the end, including Level, air ranks, and MjE ranks, that'd be super.
kthxbye
Tillmen
12-23-2014, 02:06 PM
1) Can you update the OP with all the scripts you made. Repo? F that.
;repo list --author=Tgo01
Tgo01
12-23-2014, 04:17 PM
1) Can you update the OP with all the scripts you made. Repo? F that.
2) http://forum.gsplayers.com/showthread.php?93855-Ambush-RT&p=1730643 Make me a script to record pre and post-hasted RT, while keeping haste active, and dropping/picking up coins up to whatever a character's weight limit allows. If you add a little interface to give a report at the end, including Level, air ranks, and MjE ranks, that'd be super.
kthxbye
stop_at = 59
pre_haste = Array.new
post_haste = Array.new
amount = nil
if script.vars[1] == nil
number = 0
else
number = script.vars[1].to_i
end
stuff = proc{
fput "withdraw #{amount} silvers"
fput "drop #{amount} silvers"
if Spell[506].timeleft < 0.1
fput "stop haste" if Spell[506].active?
Spell[506].cast
end
fput "get #{amount} coins"
}
show_stats = proc{
if script.vars[1] == nil
number = 0
else
number = script.vars[1].to_i
end
loop{
if pre_haste[number] == nil
respond "Level: #{Stats.level}"
respond "Air Lore Ranks: #{Skills.elair}"
respond "Major Elemental Ranks: #{Spells.majorelemental}"
undo_before_dying
exit
end
respond "--------------"
respond "Pre-Haste: #{pre_haste[number]}"
respond "Post-Haste: #{post_haste[number]}"
respond "--------------"
number += 1
sleep 0.1
}
}
start_test = proc{
show_stats.call if number > stop_at
amount = 625 + (number * 1250)
echo "Test number: #{number}"
stuff.call
while line = get
if line =~ /You gather (\d+) of the coins?\./
echo "Couldn't gather all coins, trying to fix the problem."
sleep 10
fput "withdraw 10 silvers"
fput "drop 10 silvers"
fput "get coins"
echo "Waiting a few more seconds."
sleep 10
waitrt?
fput "depo all"
stuff.call
break
end
if line =~ /You gather the remaining (\d+) coins\./
break
end
end
while line = get
if line =~ /Roundtime\: (\d+) sec\./
pre_haste[number] = $1
if $1.to_i == 1
post_haste[number] = $1
break
end
end
if line =~ /Roundtime changed to (\d+) seconds?\./
post_haste[number] = $1
break
end
end
waitrt?
fput "depo all"
number += 1
start_test.call
}
before_dying { show_stats.call }
start_script 'go2', [ 'bank', '--disable-confirm' ]
wait_while{ running?('go2') }
fput "depo all"
start_test.call
The stop_at variable is how many times you want to run this test + 1. So a value of 59 would run the test 60 times. Also this all takes place at the bank so if you can't cast spells at the bank (like Landing bank) it won't work but it'll work at the Icemule bank because Icemule > Landing.
Also while testing I noticed for some reason my character would start only picking up a fraction of the silvers on the ground; this was completely random and nothing to do with encumbrance or anything because it happened sometimes when he was just trying to pick up 625 silvers.
The problem seemed to be resolved by dropping more silvers and then trying to gather the coins again to pick them all up so the script tries to fix this problem whenever it crops up. Also waiting a few seconds sometimes seemed to fix it also so the script does this as well.
At anytime you can kill the script and it will show you the stats you have up to that point.
ETA: Updated the script so you can start the script as ;script-name 10 for example and it will start at the 10th test instead of the 1st (0th.) This would be useful in case you run in to the bug I mentioned and the script can't fix it, the script will tell you which test number it's on before each test so you can kill the script, get the problem fixed then start back up where it left off.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.