SRL Archive - Reflection

PoW Forger - Varrock West Smither [R]


Goobs

2011-07-15 02:19:32

ProphesyOfWolf presents

:norris:PoW Forger:norris:


This script scripts any item with any bar (that exists) using Varrock west anvils.

SETUP

Start characters anywhere in RuneScape with Iron bars visible in the bank and your golden hammer equipped.

Variables YOU set

DEBUG – Set to true if you want debug information, please leave this be as it will be helpful to me, but turn off if it seems to work fine for you :)

ANTIBAN
– Set it to a higher number for a lesser change to antiban

Players[X].Strings[0]
– name of metal you wish to forge

Players[X].Strings[1] – name of item you want to make


FEATURES
  • Multiplayer
  • Antiban/Antirandoms
  • Levelup Checker
  • Walks from anywhere in runescape
  • Experience tracking
  • Detailed progress report/debugging
  • Pretty much all Reflection
  • Fast
  • Reliable
  • Simplicity! (THAT'S RIGHT, SIMPLICITY)

PROGRESS REPORTS

=====================================================================
============================PoW Forger=============================
========== Time Running: 0 hour(s), 34 minute(s), and 36 second(s).
=====================================================================

=== Player 0: ***
=== Loads : 5
=== Successfully smithed 450 bars
=== EXP Gained : 11250
=== Active : True
====================================================================

=== Player 1: ***
=== Loads : 5
=== Successfully smithed 575 bars
=== EXP Gained : 14375
=== Levels Gained : 2
=== Active : True
====================================================================

Adding 475 to variable Iron Bars Smithed
Adding 11875 to variable Total EXP Gained
=== Bars per hour: 1776
=== Smithing EXP/hour: 44400
(Just to benchmark Bars/H and EXP/H)
EDIT: Using IRON bars, making platebodies ^^^^^

From: Alaska
============================PoW Forger=============================
========== Time Running: 0 hour(s), 52 minute(s), and 18 second(s).
================================================== ================

=== Player 0: **********
=== Loads : 55
=== Successfully smithed 1350 bars
=== EXP Gained : 33750
=== Levels Gained : 5
=== Active : False
================================================== ================



Apparently my load counter only works per each session they are logged in for - I will fix this in future versions

PLEASE, PLEASE, PLEASE post with bugs :D

Namaste, friends!~

PoW

Version Info


[B]Version 1.02[/B] - Small tweaks in banking to avoid a divide by zero *facepalm*, plus lots of stupid bugs I made for myself last night.. It works BEAUTIFULLY now

[B]Version 1.01[/B] - I did what Coh3n and Narcle suggested and it worked fine :) However, on the off
chance that the smithing NPC walks in front of the anvil, you have a slight chance of
using your bar on him, but only if he's standing in front of where the mouse will click.
I also added the Lowecase and Uppercase failsafes so you should be able to input the
strings any way you want to! :)

[B]Version 1.0[/B] - Initial release

Yago

2011-07-15 10:48:48

Nice… good job on the release :) Good to see an old timer getting his hands dirty again ;)

Goobs

2011-07-15 16:44:09

Yes indeed! I am tired of the inactivity xD - people need to appreciate the art that is SIMBA. I have almost perfected this I think, albeit other computer's performance may make me change some things. I NEED TESTERS! :)

Narcle

2011-07-15 17:34:16

Quick suggestion, small and makes setup more fool proof.

Players[X].Strings[0] – name of metal you wish to forge, do first letter lowercase as in script

Players[X].Strings[1] – name of item you want to make, please capitalize first letter

for String 0 you can do:
LowerCase(Players[X].Strings[0]);

for String 1 you can use this:
Capitalize(LowerCase(Players[X].Strings[1]));

kylerperson

2011-07-15 17:41:45

Can this smith knifes? I seem to be getting an error when i try to run this, it brings up an error in the handle bank procedure at this line.

IncEx(Players[CurrentPlayer].Integers[0], (SmithCount * Floor(28 / BarsDone)));

[Reflection] Randoms var set!
[0:14:56] Walking to bank
[0:14:56] ==Try 1
[0:14:56] Opening bank
[0:14:56] We are counting having done 0 Iron knifes
Error: divide by Zero at line 324
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]

Goobs

2011-07-15 20:34:34

Was that the first load? It shouldn't do that unless BarsDone = 0.. What is the exact name of the knife? That could be the problem..

From: Narcle
Quick suggestion, small and makes setup more fool proof.

for String 0 you can do:
LowerCase(Players[X].Strings[0]);

for String 1 you can use this:
Capitalize(LowerCase(Players[X].Strings[1]));


I will do this in my next version – i Hadn't realized there was a lowercase because it wasn't listed in Simba on the left >.< I knew there used to be one

kylerperson

2011-07-16 04:04:42

It never completed a first turn. This happens right after it logs in.

Goobs

2011-07-16 09:25:18

It sounds like something is going wrong with the item counting - it is completely reliant on uptexts.. This means that the setup information in DeclarePlayers MUST exactly match that which you are wanting to smith. If you want to make Iron Platebody you must type in iron Platebody (will be changed later), so in your case make sure it says

Strings[0] := 'iron';
Strings[1] := 'Knife';

Otherwise it will fail

Coh3n

2011-07-16 12:52:36

From: ProphesyOfWolf
I will do this in my next version – i Hadn't realized there was a lowercase because it wasn't listed in Simba on the left >.< I knew there used to be one
I don't think the PS methods show in the function's list. Things like pos(), lowercase(), uppercase(), random(), etc.

This looks nice though, I'll definitely be using it when I get around to smelting my surplus of ores. :p

Goobs

2011-07-16 21:47:18

I appreciate it, Coh3n :) You're one of my heroes

Coh3n

2011-07-17 11:35:53

Ever need any help, just ask. :)

Goobs

2011-07-17 18:09:21

I most definitely will do so. I have some ideas in mind and a script that needs some speeding up xD

There have been ALOT of commits, but no bars smithed added by someone on Anonymous (whom I'm sure was kylerperson, as he reported an error with the line that adds the bars that is KEY to everything but the level and randoms counts, and I'm sure he just deleted it to get it to work correctly with his needs). Whoever is running this, I will make any changes to make you happy, but PLEASE do not remove the lines that make stats work.

kylerperson

2011-07-21 00:15:58

Nah i got it to work by keeping that line in actually. It still doesnt seem to count bars though. Now i am having an issue with smithing bronze bars. It attempts to find the anvil, then does repeatedly, but only examining the anvil.

Coh3n

2011-07-21 03:18:13

Check the debug when you call stats_commit(). It should give the error if it's not working.

Goobs

2011-07-21 03:49:19

I'm pretty sure stats should be working fine, if he kept that line in. They work fine for me O.o

Maybe I messed something up.. Could I get you to look at my script, Coh3n, and see if I did something stupid? My scripting technique is a little… random.. but it works somehow.

I think it's a bug in reflection, kyler - it has to be. I use ID finding to get the closest anvil's tile and convert it directly to a MSpoint. I then do:

      if(IsUptext('nvil')) then Mouse(AnvPt.x, AnvPt.y, 4, 4, True) else
begin
Mouse(AnvPt.x, AnvPt.y, 4, 4, False);
Wait(randomrange(200, 300));
ChooseOptionMulti(['nvil', 'Use', 'bar']);
end;

I can't wait till reflection 2 is fully working!

Coh3n

2011-07-21 06:39:41

Try using WaitUptext and WaitOption and just use 'Use', 'se' for the option. With 'nvil' there, it can choose the Examine option sometimes. As for the stats thing, I can't see anything wrong. :unsure:

Silent

2011-07-21 14:09:08

I have about a 1000 bars that I'll be testing with this… I'll edit and put a proggy up later.

Goobs

2011-07-21 19:14:49

From: Coh3n
Try using WaitUptext and WaitOption and just use 'Use', 'se' for the option. With 'nvil' there, it can choose the Examine option sometimes. As for the stats thing, I can't see anything wrong. :unsure:


I will switch to those two functions, but the only problem with just using Use is that the smithing NPC occasionally walks in front of the anvil when it goes to click it, resulting in using the bar with the anvil. I honestly have no idea why it would do so, situation being that it checks for the uptext before clicking.. Very strange O.o Thank you for looking over me script! :)

@SilentSpy Sounds good, hope it works well for you :)

EDIT: Version 1.01 released! I did what Coh3n suggested and it worked fine :) However, on the off chance that the smithing NPC walks in front of the anvil, you have a slight chance of using your bar on him, but only if he's standing in front of where the mouse will click. I also added the Lowecase and Uppercase failsafes so you should be able to input the strings any way you want to! :)

Coh3n

2011-07-22 00:54:44

You can still use 'nvil' as the uptext. To solve the NPC problem:

if (waitUptext('nvil', 200)) then
mouse(x, y, 0, 0, true)
else begin
mouse(x, y, 0, 0, false);
waitOption('Use', 500);
end;

Goobs

2011-07-22 01:03:25

The problem is, it right clicks the place where the anvil is, waits 2 seconds, and then chooses the option with the npc name instead of the anvil one. I thought it was quite odd as my code looks like:


if(WaitUptext('nvil', 3000)) then Mouse(AnvPt.x, AnvPt.y, 4, 4, True) else
begin
Mouse(AnvPt.x, AnvPt.y, 4, 4, False);
Wait(randomrange(200, 300));
WaitOptionMulti(['Use', 'Anvil'], 5000);
end;

You'd think it would only choose the one that says Anvil instead of the other guy, but I dunno.. I probably just did something stupid xD

Coh3n

2011-07-22 01:06:30

You didn't do anything stupid. :p It's because WaitOptionMulti doesn't look for all the strings, just one of them, so it's finding 'Use' which appears on the NPC as well. You could try WaitOption('Use -> Anvil', 200) or whatever the exact text would be. Need to choose something that unique to the option you want only and not any other options.

Goobs

2011-07-22 23:27:58

VERSION 1.02 RELEASED! It works great now, please download and use this script! It is absolutely BEAUTIFUL! BEAUTIFUL I TELL YOU

Goobs

2011-07-23 22:29:59

I am not joking, THIS SCRIPT IS AMAZING! Please download and try the new version for many bug fixes and speed increases! PLEASE COMMENT BELOW

grats

2011-07-26 22:35:18

awesome with the golden hammer.

biggest fix I can see just running it a few minutes is make it not click the first bank tab everytime it goes to withdraw.. iirc that's reflections withdraw problem.. but some others have fixed it

also for clicking the anvil it should right click if there are too many people there and left if there aren't.. in my case there were a lot of people there and it had troubles clicking till it right clicked (it looks randomized) maybe 5+ people in the area = right click or something

also when there are less than 28 bars left it stops.. possibly it can just make the rest of whatever the user specifies to make and then quit when there aren't enough ores
great random detection.. I got a random event and it picked up on it right away

Goobs

2011-07-26 23:28:31

It's supposed to right click it only when the uptext is not 'bar -> Anvil', so any amount of players would only mess it up if they were below the anvil you were trying to click. Usually. At least, that's how it is on my computer, but then again this one is a beast :)

litoris

2011-07-27 04:48:05

Tried this for like half an hour. Artisan's is way better both $$$ and xp-wise, but the script works great.

grats

2011-07-27 09:33:56

From: ProphesyOfWolf
It's supposed to right click it only when the uptext is not 'bar -> Anvil', so any amount of players would only mess it up if they were below the anvil you were trying to click. Usually. At least, that's how it is on my computer, but then again this one is a beast :)


ah, probably from runescape being slow and the script reacting fast… it's just clicking right when someone gets in the way :P

the world I was in was extremely crowded

Goobs

2011-07-27 17:17:02

This script is designed to run forever, as long as you have bars. Eventually Artisan will stop :) Though I admit it is a beautiful script

Goobs

2011-07-27 19:20:59

As for worlds, I usually use 161 as it's a quick chat only world :) Not many people bother you

Alaska

2011-08-02 10:15:54

This script runs beautifully. I've been baby sitting it and watching it function and it's flawless in my eyes. I'll post a proggy later on when it's done with the bars I have if I can remember.

EDIT:
============================PoW Forger=============================
========== Time Running: 0 hour(s), 52 minute(s), and 18 second(s).
==================================================================

=== Player 0: **********
=== Loads : 55
=== Successfully smithed 1350 bars
=== EXP Gained : 33750
=== Levels Gained : 5
=== Active : False
==================================================================

Goobs

2011-08-03 16:24:36

From: Alaska
This script runs beautifully. I've been baby sitting it and watching it function and it's flawless in my eyes. I'll post a proggy later on when it's done with the bars I have if I can remember.

EDIT:
============================PoW Forger=============================
========== Time Running: 0 hour(s), 52 minute(s), and 18 second(s).
==================================================================

=== Player 0: **********
=== Loads : 55
=== Successfully smithed 1350 bars
=== EXP Gained : 33750
=== Levels Gained : 5
=== Active : False
==================================================================


Thank you very much! I will put your report in my thread :)

Heavenzeyez1

2011-09-02 11:57:08

Does it support those sacred clay hammers?

~Eerik.

therealmerlin

2011-09-08 11:34:55

hey i'm having trouble setting this up…

Unknown identifier 'GetObjectByID' at line 140


heres line 140
Anvil := GetObjectByID(2783, 0, 10);

I can't find any other reference to that procedure in the script so maybe I don't have the right version of something? (smart, simba, srl) idunno

Coh3n

2011-09-08 21:00:11

From: therealmerlin
hey i'm having trouble setting this up…



heres line 140
Anvil := GetObjectByID(2783, 0, 10);

I can't find any other reference to that procedure in the script so maybe I don't have the right version of something? (smart, simba, srl) idunno
Sounds like this script needs to be converted to Reflection 2.

Tuning1st

2012-01-02 13:27:39

Help pls

function DoneSmithing: Boolean;
begin
Result := (R_CountItem('bar') < 4);
end;

[Error] (171:14): Unknown identifier 'R_CountItem' at line 170
Compiling failed.

shstiger2009

2012-01-02 13:29:52

From: Tuning1st
Help pls


Reflection is broken and the script won't work.