Results 1 to 6 of 6

Thread: Colour High Alcher

  1. #1
    Join Date
    Jul 2016
    Posts
    156
    Mentioned
    2 Post(s)
    Quoted
    81 Post(s)

    Default Colour High Alcher

    Name: Colour High Alcher
    What it does: Casts High Alchemy on noted items
    Where does it do this: Any safe area
    What does the script achieve: Magic XP
    Requirements: 55 Magic
    Note: I have a general idea of the program flow. I'm not proficient in SIMBA programming at all. Looking for someone to work with.

    Code:
    /**
     * Assumptions: 
     * 		55 Magic
     * 		Fire Staff Equipped
     * 		Start in spellbook
     * 		At least 1 nature rune and 1 noted item in start
     * Neccessary: 
     * 		Nature rune in row=0 col=0 
     * 		Noted items in row=3 col=3 
     * 
     * Note:		
     *      castHighAlch() must ensure quantities of both (0,0)
     * 	and (3,3) are greater than 1 to ensure next spell can
     * 	be cast  OR castHighAlch() checks the colour of the spell.
     *      castHighAlch() returns !0 if spell was not cast.
     *                              
     *                              
     * 
     * Concerns:                    
     *      Wait time is uniformly generated. Perhaps use
     *      box-muller for a normal distribution.
     *
    */
    
    #define ALCH_TIME 3		//Seconds
    #define MAX_WAIT 2e9		//Nanoseconds
    
    int
    main(void)
    {
    	struct timespec ts;
    	ts.tv_sec = ALCH_TIME;
    	ts.tv_nsec = 0;
    	srand(time(NULL));
    
    	while (1) {
    		ts.tv_nsec = rand() % (MAX_WAIT + 1);
    		nanosleep(&ts, NULL);
    		if (castHighAlch())
    			break;
    	}
    	return 0;
    }
    Edit:
    I forgot that setting tv_nsec above 1 second results in undefined behaviour. Easy adjustment there, just need to use quotient and remainder.

    Planning to mess around with Dan's script to get this running.

  2. #2
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

  3. #3
    Join Date
    Jul 2016
    Posts
    156
    Mentioned
    2 Post(s)
    Quoted
    81 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    I have used this one a few times, works well: https://villavu.com/forum/showthread.php?t=111100
    Thanks for the share. Pretty cool that something was 14 is still running strong.
    Maybe I'll come back to the idea of modifying your flaxer for high alching when I have more free time.

  4. #4
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    Not sure if this still works, but probably will, because it's color

    https://villavu.com/forum/showthread.php?t=112977

  5. #5
    Join Date
    Jul 2016
    Posts
    156
    Mentioned
    2 Post(s)
    Quoted
    81 Post(s)

    Default

    Awesome. Guess I should have done some more research before creating this post.

  6. #6
    Join Date
    Nov 2008
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    21 Post(s)

    Default

    i used aeromagic pro and it didnt end well ended up w/ ban so be careful

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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