Page 26 of 26 FirstFirst ... 16242526
Results 251 to 254 of 254

Thread: Bored...anyone need a script written?

  1. #251

    Default

    Quote Originally Posted by Tillmen View Post
    I usually just use the last npc in the room.
    person = GameObj.npcs.last
    Well sure if you wanna do it the easy way.

  2. #252
    Join Date
    Jul 2009
    Posts
    4,798
    Blog Entries
    1

    Default

    1) Can you update the OP with all the scripts you made. Repo? F that.
    2) http://forum.gsplayers.com/showthrea...h-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


    >forage for snapdragon stalk
    d100(Open): -251
    You stumble about in a fruitless attempt at foraging.

    1/6/2014: Setheve completes the promotion ritual and says, "Congratulations, Whirlin, for achieving Guild Master status! We trust you'll serve your guild well."
    1/11/2014: Grandmaster Alchemist
    1/14/2014: Capped, and got Loralaii killed by a GM.
    7/11/2016: Founded the Hand of the Arkati
    9/20/2016: T5 on my bow (Thanks to Isola)... Managed as far as T4 myself.

  3. Default

    Quote Originally Posted by Whirlin View Post
    1) Can you update the OP with all the scripts you made. Repo? F that.
    ;repo list --author=Tgo01
    Get Lich - Vote for Gemstone (topmudsites.com)

  4. #254

    Default

    Quote Originally Posted by Whirlin View Post
    1) Can you update the OP with all the scripts you made. Repo? F that.
    2) http://forum.gsplayers.com/showthrea...h-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
    Code:
    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.
    Last edited by Tgo01; 12-23-2014 at 03:56 PM.

Similar Threads

  1. Looking to buy player written books
    By Morchal in forum Wanted
    Replies: 2
    Last Post: 04-23-2011, 10:31 PM
  2. Player-written Books
    By grossm in forum GSIV Merchant's Market
    Replies: 8
    Last Post: 12-01-2009, 03:59 PM
  3. The Greatest Plays Ever Written
    By Bobmuhthol in forum Off-Topic
    Replies: 10
    Last Post: 04-19-2007, 05:43 PM
  4. One of the best sci-fi short stories ever written
    By Numbers in forum Social Forum
    Replies: 4
    Last Post: 01-30-2007, 06:54 PM
  5. I got written up
    By Percocet in forum Social Forum
    Replies: 64
    Last Post: 09-08-2004, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •