Quantcast

Jump to content


Photo

Auto negger?


  • Please log in to reply
38 replies to this topic

#26 compex

compex
  • 10 posts

Posted 25 December 2011 - 11:43 PM

Huh O_o, didn't know that. Won't the code only work through one version though? They aren't backwards compatible.


Correct, the code may not work with just any version. But you can have all python versions installed on your system independent of one another, and you can launch your scripts with any version you would like.

Each independent installation of python has its own installation files. You just have to invoke the interpreter manually, depending on which version you want to use. For example, my python 3.0 Windows installation is located at C:\python30. So to launch my python script, I would just do:
C:\python30\python.exe my_script.py
. If I want to use 27 install, C:\python27\python.exe my_script.py. So you can have all the latest python versions installed on your system, and if you happen to come across a script that is using an older python version, just use the older interpreter. The interpreter is just a program, python.exe. You "launch" your programs by passing the script as a command line argument to the interpreter.

In linux the first line of the script with the #! tells you the location of the interpreter that will be used to execute the script. You will often see this as the first line:
#! /usr/bin/env python
This gets the location of python from the $PATH.

You can explicitly specify the interpreter you want to use:
#! /usr/local/bin/python3.0

So there is no such thing as updating. You can have all versions installed simultaneously then launch your scripts with any version you would like. That is what the launchscript.bat and launchscript.sh do.

Edited by compex, 25 December 2011 - 11:45 PM.


#27 Abunaidesuka

Abunaidesuka
  • 85 posts

Posted 26 December 2011 - 06:01 PM

I have the program written but I can't test it because I don't have a dying pet :(


The timer and hunger check is off. Ideally, the first Negg would be done at Dying (to ensure that you start a fresh starving timer) and every check after that would include Starving as an option and come at 3601 seconds. Easy enough fix for anyone after they have downloaded the script. (As others have said, very primitive, but it will work as long as the Neggs are in your inventory.)

+ thanks compex.

Edit: finally got the chance to test it, and it completely fails to work on my Linux, Mac, and Windows machines; repeatedly logs in (tried to fix the code--never worked with Python before, and god this a truly awful program language ... giving up out of the shear hatred I now have for Crapthon.)

#28 Inkheart

Inkheart
  • 268 posts

Posted 27 December 2011 - 09:59 PM

I decided to give this a go. It checks for "dying" every five minutes, makes sure you stay logged in, tries to grab from SDB, checks for "dying" 61 minutes after a successful feeding, and keeps you updated every minute with what's going on so that you know the program is working.

Edited by Inkheart, 27 December 2011 - 10:00 PM.


#29 Abunaidesuka

Abunaidesuka
  • 85 posts

Posted 28 December 2011 - 01:59 AM

I decided to give this a go. It checks for "dying" every five minutes, makes sure you stay logged in, tries to grab from SDB, checks for "dying" 61 minutes after a successful feeding, and keeps you updated every minute with what's going on so that you know the program is working.


Looks like you're missing
#!/usr/bin/env ruby
in the first line. Also, the hunger check should allow for Starving 61 mins (rounding up a minute as you did) after the initial feeding.

Unable to test it at the moment, but looks good at a glance.

#30 compex

compex
  • 10 posts

Posted 28 December 2011 - 06:11 PM

The timer and hunger check is off. Ideally, the first Negg would be done at Dying (to ensure that you start a fresh starving timer) and every check after that would include Starving as an option and come at 3601 seconds. Easy enough fix for anyone after they have downloaded the script. (As others have said, very primitive, but it will work as long as the Neggs are in your inventory.)

+ thanks compex.

Edit: finally got the chance to test it, and it completely fails to work on my Linux, Mac, and Windows machines; repeatedly logs in (tried to fix the code--never worked with Python before, and god this a truly awful program language ... giving up out of the shear hatred I now have for Crapthon.)


Works locally o.o I know that the "timer is off" - The OP said it'd be OK if you check every 30 mins or so. Honestly this was more of a starting point for anyone wishing to write something like this, I had intended to make it more shiny when I got some time.... But I don't know what to say. Are you sure you are using this with python3? Gah. I hate python myself for deployment problems... It is no problem sharing scripts with fellow programmers because they generally know what to do with them, but you can't really expect the end user to keep track of dependencies/etc.

#31 Abunaidesuka

Abunaidesuka
  • 85 posts

Posted 29 December 2011 - 02:21 AM

Are you sure you are using this with python3?

Positive. Either way, I modded Inkheart's a tad and it works perfectly for me.

Correction, apparently his isn't feeding for me; can find the item in the SDB and withdraw it, but isn't processing the feeding portion.

Edit: the regex formula is off a bit ... works fine with only (1) Negg in your inventory, but any other items or multiple Neggs causes errors.

---

Rough fix to Inkheart's script ...

Find
(puts "Only #{hunger}..."; return sleeper(0, 6)) if hunger != 'dying'
Replace with
(puts "Only #{hunger}..."; return sleeper(0, 6)) if !(hunger == 'dying' || hunger == 'starving')

Find
negg_id = inv.scan(/win\((.+)\).+?Armoured Negg/)[0][0] rescue nil
Replace with
negg_id = inv.scan(/win\((\d+)\).{408,410}?Armoured Negg/)[0][0] rescue nil


#32 themetagame

themetagame
  • 64 posts

Posted 31 December 2011 - 06:25 AM

Hey so, negg feeding based on a timer is all well and good, but what about something simpler - like, that will read all 50 books to a certain pet, grab next 50 from SDB and keep reading? Or, make something exactly like an Auto Negger, but for Stat potions... there is no time limit on items like 'Bomberry Elixir' ,'Jar of Forest Earth', or 'Essence of Drackonack', but each of those items is best used in large numbers and it can be tedious to have to sit on the inventory page for mass time.

#33 Neoquest

Neoquest
  • 1760 posts


Users Awards

Posted 01 January 2012 - 10:18 AM

Hey so, negg feeding based on a timer is all well and good, but what about something simpler - like, that will read all 50 books to a certain pet, grab next 50 from SDB and keep reading? Or, make something exactly like an Auto Negger, but for Stat potions... there is no time limit on items like 'Bomberry Elixir' ,'Jar of Forest Earth', or 'Essence of Drackonack', but each of those items is best used in large numbers and it can be tedious to have to sit on the inventory page for mass time.


You should probably just use this script: http://userscripts.o...ipts/show/33964
A little easier than editing the program.

#34 supertrap

supertrap
  • 149 posts

Posted 01 January 2012 - 12:36 PM

So whats the word.
Which one works best?

I decided to give this a go. It checks for "dying" every five minutes, makes sure you stay logged in, tries to grab from SDB, checks for "dying" 61 minutes after a successful feeding, and keeps you updated every minute with what's going on so that you know the program is working.


Im feeling stupid. What is this written in? .rb is that ruby or something. Anyone have a compiled version?

edit: ok so it is ruby, anyone got a link to a tutorial for easy running of ruby scripts?
Still offering USD for a compiled .exe
Im not only programming challenged, but using a loaner laptop.

Edited by supertrap, 01 January 2012 - 12:39 PM.


#35 weaboo

weaboo
  • 218 posts

Posted 03 January 2012 - 03:22 PM

I can probably try making one.

#36 supertrap

supertrap
  • 149 posts

Posted 05 January 2012 - 07:08 PM

I can probably try making one.


Pretty please.
lol. I dont care if its in visual basic. Something simple puhpuhpuhlease.
Im paying lol

Edited by supertrap, 05 January 2012 - 07:16 PM.


#37 Strategist

Strategist
  • Sadmin

  • 10012 posts


Users Awards

Posted 05 January 2012 - 09:29 PM

if you wanted to try with inkhearts .rb file heres the installer for ruby

it also works quite well, thanks to inkheart for creating it and Abunaidesuka for the altered coding.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users