SRL Archive - First Scripts

[First Script] Lama's Edgeville Dougher!


Lama

2014-10-05 17:56:28

Lama's Edgeville Dougher v1.1!
Turns Pots of Flour into Pastry Dough for profit


FEATURES:
  • Presets
  • SRL Player Form
  • Painted Progress Report
  • Define Loads
  • See profit and profit per hour in real time!
  • Currently effectively makes up to 400k profit per hour!

SETUP:
  1. Place character in Edgeville bank (near counters)
  2. Setup whichever preset (defined in the Player Form) with 14 pots of flour
  3. Have pots of flour in your 10th bank slot
  4. Make sure your client is setup properly (go here, and look at "Setting up in-game graphics and interfaces")
  5. Hit RUN
  6. Fill out information in the form (make sure bank preset matches what you set in game)
  7. Hit 'Start Script'

SRL Player Form
[ATTACH=CONFIG]24157[/ATTACH]

Banking
[ATTACH=CONFIG]24158[/ATTACH]



KNOWN ISSUES:
  • Too many TPA arrays, doesn't affect performance, just inefficient probably… how to truncate after first 4 or 5?
  • Progress Image not going transparent near bottom (where it fades to black, not script breaking)
  • Super rarely doesn't make it within eyesight of a banker (silly SPS, script breaking) } Failsafes now implemented in 1.1!
  • Superer rarely skips waiting to get to well before proceeding with script… for no reason (script breaking)

TO DO:
  • Make that painted report image fade to transparent near bottom (advice?)
  • Failsafes for getting back to bank (advice?)

SUPER SPECIAL THANKS TO:
~ The Mayor, he pretty much taught me everything (by Skype, and by his tutorials) THANK YOU!

DOWNLOAD:
[ATTACH]24174[/ATTACH] <— most up to date, don't click the one below this line (how do I work this forum)

ibot101

2014-10-05 19:58:12

Can't run, get this:

'NOTIFICATION: Paint image does not exist - Downloading it now!.
CreateFile - Exception. Could not create file: C:\Simba\Scripts/lamascripts/doughpaint.png
Error: Invalid FileNum passed: -1 at line 165
Execution failed.'


Edit: debugged this on my own, you have to go into your scripts folder and change its name to 'lamascripts' - by default it names it something else


quick proggy:
[ATTACH=CONFIG]24160[/ATTACH]

Ross

2014-10-05 20:13:42

From: Lama
..


Super cool! Why do you need to have pots in 10th bank slot if using presets though?

ibot101

2014-10-05 20:15:28

taking another wild guess here (I seem to be doing this all day :P) but he probably uses the amount in your bank to determine how much was made/done rather than going by how many runs were made? I don't see why else lol

Ross

2014-10-05 20:28:13

From: ibot101
taking another wild guess here (I seem to be doing this all day :P) but he probably uses the amount in your bank to determine how much was made/done rather than going by how many runs were made? I don't see why else lol


Doesn't look like it based on profit calc.

Clarity

2014-10-05 20:52:32

Cool! Seems like a very nice job for a first release. Congratulations, best of luck with your future scripts :)

The Spark

2014-10-05 21:09:08

Nice!! Congratz on your first release man!

ibot101

2014-10-05 21:23:01

I get this error every 15 mins or so now which terminates the script:

'Error: Access violation at line 430'

Lipcot

2014-10-05 21:51:16

gratz on first release!

Lama

2014-10-05 21:56:47

From: Ross
Super cool! Why do you need to have pots in 10th bank slot if using presets though?


I use it for a function that checks if there is still pots of flour left in the bank, so if loadsToDo doesn't get met before you run out, it should terminate. I actually haven't tested that feature out yet though… so I don't know if it works yet :eek:

From: ibot101
I get this error every 15 mins or so now which terminates the script:

'Error: Access violation at line 430'


Does it point into another simba file, or does it point to line 430 in my script?
I'll look into it, sadly I have to get some sleep first…

From: Clarity
Cool! Seems like a very nice job for a first release. Congratulations, best of luck with your future scripts :)


Thank you! I already have more ideas to get out (though I should polish this one up a bit first)…



Thanks everyone for the input so far :D

Ross

2014-10-05 22:02:56

From: Lama
I use it for a function that checks if there is still pots of flour left in the bank, so if loadsToDo doesn't get met before you run out, it should terminate. I actually haven't tested that feature out yet though… so I don't know if it works yet :eek:


Have it look for a DTM, that way users can put it in any slot :)

ibot101

2014-10-05 22:06:00

From: Lama

Does it point into another simba file, or does it point to line 430 in my script?
I'll look into it, sadly I have to get some sleep first…


430 of your script

bonsai

2014-10-05 22:06:02

Congratulations on the release.

You picked my favorite script. I made so many pastry doughs with mine!!

They used to sell ok too, I didn't know people bought them.

Lama

2014-10-05 22:14:41

From: Ross
Have it look for a DTM, that way users can put it in any slot :)


I think the function does look for a DTM, maybe I accidentally limited the DTM search for slot 10. I'll look at it tomorrow. Thanks for the thought.

From: ibot101
430 of your script


Ahhh, I believe you ran into the bug where it doesn't walk far enough into the bank, so it couldn't find a banker, therefor it through out that error. I need to make a failsafe for that…

From: bonsai
Congratulations on the release.

You picked my favorite script. I made so many pastry doughs with mine!!

They used to sell ok too, I didn't know people bought them.


Thanks! However, they aren't really selling right now. Takes a while, but a profit is eventually turned, heh.

The Mayor

2014-10-05 22:28:58

From: bonsai
Congratulations on the release.

You picked my favorite script. I made so many pastry doughs with mine!!

They used to sell ok too, I didn't know people bought them.


I keep thinking you're riwu when i see that hat :p

@OP grats on release ;) Once it's really stable you should release in cooking/money section. I could probably take a look later tonight if you wanted some feedback.

Incurable

2014-10-05 22:49:51

Congratulations for releasing your first script!



Very nice for a first script, especially your use of functions in multiple places as checks for failsafes, well done. ;)

The Mayor

2014-10-05 23:39:28

Looks very good for a first release!

Instead calling things through the player form settings:
 if (strToBool(playerForm.players[currentPlayer].settings[2])) then 
you should should call things through the players integers/booleans:

if players[currentPlayer].booleans[2] then

That's why you assign them in the declare players procedures.

Hoodz

2014-10-06 04:39:31

Nice name

Ashaman88

2014-10-06 13:07:33

Looking good man, congrats on the first release!

Lama

2014-10-06 14:25:39

From: The Mayor
Looks very good for a first release!

Instead calling things through the player form settings:
 if (strToBool(playerForm.players[currentPlayer].settings[2])) then 
you should should call things through the players integers/booleans:

if players[currentPlayer].booleans[2] then

That's why you assign them in the declare players procedures.


I did try that actually, and it didn't seem to work, I will try again later today when I get home.

From: hoodz
Nice name


Nice picture… heh…

From: Ashaman88
Looking good man, congrats on the first release!


It's an exciting time for sure! Thank you :)

Lama

2014-10-07 20:09:02

Version 1.1 Released


Changes include:

  • So many banking failsafes
  • Antiban buffed (as it's only called once)
  • Tweaking playerForm variables (as per The Mayor's suggestion… it works!)

Things to still do:

  • Implement something (that works) to check if there is still pots of flour in bank
  • Find the problem with downloading images (and the script accessing them?)?
  • Truncate irrelevant/useless TPAs from the big ATPA variable while @ the well (ideas? The closest 4 or 5 are the only relevant TPAs)
  • Get some darn transparency on the bottom of the painted progress image!

Thanks everyone for all the useful input so far!

Main post attachment updated.

the bank

2014-10-09 14:18:28

gratz on first release, I can't get it working right now but I'll try and find the issue and get back to ya :)

Lama

2014-10-09 19:34:49

From: the bank
gratz on first release, I can't get it working right now but I'll try and find the issue and get back to ya :)


Thanks for checking it out. There is a problem that happens sometimes on start where it finds an out of bounds error on some box and points to line 77 of drawing.simba, however I can't figure out what the problem is. However, it usually works when I stop and restart the script (it's seemingly by chance that it gets this error).

So, you may be having that problem. Let me know :)

bonsai

2014-10-09 19:54:08

From: Lama
Thanks for checking it out. There is a problem that happens sometimes on start where it finds an out of bounds error on some box and points to line 77 of drawing.simba, however I can't figure out what the problem is. However, it usually works when I stop and restart the script (it's seemingly by chance that it gets this error).

So, you may be having that problem. Let me know :)


smartImage.debugATPA(ATPA);

It's probably this. I've had that happen, it tries to draw the labels offscreen or something. Maybe cut down on that stuff for the release version.

Lama

2014-10-09 22:38:57

From: bonsai
smartImage.debugATPA(ATPA);

It's probably this. I've had that happen, it tries to draw the labels offscreen or something. Maybe cut down on that stuff for the release version.


Ah, maybe yeah. I mainly kept it in there since it kind of looks cool, but it probably makes more sense to remove it, especially if it's causing errors. Thanks for the suggestion.

The Mayor

2014-10-09 23:44:18

You could just throw it in a try except statement, so if it throws an error, it won't break the script


try
smartImage stuff
except
end;

Lama

2014-10-10 11:05:29

From: The Mayor
You could just throw it in a try except statement, so if it throws an error, it won't break the script


try
smartImage stuff
except
end;


Alright, so I'm pretty sure I found where the problem is. The error was pointing to an out of area error with a smartImage.clearArea procedure in drawing.simba, and it happened after orientPlayer(), so there was only one spot, and it was in paintStatus, which has this:

smartImage.clearArea(intToBox(chatbox.x2-320,chatbox.y2-19, chatBox.x2, chatBox.y2));

which I then turned into:

try
smartImage.clearArea(intToBox(chatbox.x2-320,chatbox.y2-19, chatBox.x2, chatBox.y2));
except
end;

Other than that, I don't see what could have gone wrong. The error occurs after orientPlayer() is called, and before doBanking() (in the main loop) is called. Hopefully this clears that bug up a bit.

wowgnomes

2014-10-12 16:24:39

Error while reading stream: Wrong image format at line 745
Execution failed.
The following bitmaps were not freed: [Minimap Mask, SMART Debug Image]
File[C:\Simba\Includes\SRL-6/logs/SRL log (13-10-14 at 01.25.07 PM).txt] has not been freed in the script, freeing it now.


It won't start and the image it downloads is 0 bytes, any help would be appreciated!