Author Topic: AFK Silver Farmer  (Read 21905 times)

0 Members and 1 Guest are viewing this topic.

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
AFK Silver Farmer
« on: June 17, 2009, 09:23:38 PM »
+1
This is a simple script for farming silver with a hidden naked tamer. It will sit there while your Cu kills silver serpents in blighted. It will recognize if you are taking damage and send back silver and log out. It will log out if any of the named monsters are lured to your hunting grounds. It will check your weight and send silver when you get close to max weight. If you are out of powder it will refill your bag if you have more on you. It will even log you out before server down so you do not lose your pet for lack of loyalty.

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
AFK Silver Farmer V.2.txt
« Last Edit: June 20, 2009, 06:48:58 PM by DeadIssue2 »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: AFK Silver Farmer
« Reply #1 on: June 18, 2009, 05:18:34 AM »
+1
Cool script. Whenever I do math, I like to enclose it....
Code: [Select]
If #weight => #Maxweight -50
Code: [Select]
If #weight => ( #Maxweight - 50 )
That -50 might give you an issue.

I've migrated away from #findKind, and have been using #findCnt a lot more

Code: [Select]
If #findkind <> -1
Code: [Select]
If #findCnt > 0
For the BoS portion, TM has a great sub already available thats true tested to work excellent. You should consider using it.

I'm assuming that your char is hidden FAR away from any monster types... thats why you log out if one is spotted within 4 spaces of you?

Overall, looks pretty good. Consider the changes mentioned, and utilizing TM's BOS sub.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: AFK Silver Farmer
« Reply #2 on: June 18, 2009, 05:33:06 AM »
+1
Thank you for the input , I had tested this thing left and right and was working properly until this morning when it went all wonky on me. These should fix the problem. I have it in testing for V2.0 right now
« Last Edit: June 18, 2009, 06:08:43 AM by DeadIssue2 »

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: AFK Silver Farmer
« Reply #3 on: June 18, 2009, 07:48:23 AM »
+1
Hi,

I have to agree to Cerveza's comment about the weight issue.

Weight calculation is Shard and Race dependent:

Regular Shard:
-> HUMAN Char
Code: [Select]
   Set %MaxFreeLoad ( #MAXWEIGHT + 60 ) - #WEIGHT->Elf Char
Code: [Select]
   Set %MaxFreeLoad #MAXWEIGHT - #WEIGHT
SP Shard
-> Elf and Human Char
Code: [Select]
   Set %MaxFreeLoad #MAXWEIGHT - #WEIGHT
So I usually do a shard and a race check
when I have to worry about weight in a script.

cu
« Last Edit: June 18, 2009, 08:06:26 AM by rana70 »

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: AFK Silver Farmer
« Reply #4 on: June 18, 2009, 08:28:18 AM »
+1
I have to be honest I do not understand how race or shard could effect weight as compared to max weight. I do understand how one race can hold more than another but not sure why that would matter. And I really did not know each shard could carry different weight max.

I have the changes in place and I am testing it now. This will be updated today.

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: AFK Silver Farmer
« Reply #5 on: June 18, 2009, 08:55:21 AM »
+1
..... I do not understand how race or shard could effect weight as compared to max weight.

Basicly it is all about to make sure a char is not becomming "overweighted",
in this state the char is unable to walk or recall.

So the calculations simply shows there is a difference in Race (humans and elfs) on regular shard,
this came up with the intruduction of the new elf race like the other differences Night Sight and stuff.

I am not sure why thy did not do this on SP in the same way, mybe someone else knows an answer.

I figured this out because a human char using one of my scripts on SP became overweighted ...
even when the same script on a regular shard never had this issue

cu

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: AFK Silver Farmer
« Reply #6 on: June 18, 2009, 09:04:21 AM »
+1
The difference is that Humans can hold more weight before becoming overloaded. But... if your strength is high enough and your human, your PACK can't hold that much weight.

So waiting for you to be 50 under your maximum might not work if the char is a Human, because your pack won't support more then 100 under your maximum... it would cause a loop and the script would fail.

Lemme see if I have something already written....
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: AFK Silver Farmer
« Reply #7 on: June 18, 2009, 09:07:53 AM »
+1
This is what I use ....

in the scriptheader you have to call it ones with
GoSUB RANA_WeightCheck INIT
to get the basic data colected

Later just use it without parameter and you can use the vars
it provides in the comment part



Code: [Select]
; Char Weight Handling SUB
; Version 1.0
; %1 OPTION: INIT
;            Prepair Data for propper Weight Calculations
; Vars that can be used:
; %WC_RACE         -> HUMAN / ELF
; %WC_ServerTypeSP -> TRURE Server is Siege Perilous
; %WC_ServerName   -> Name of Server
; %WC_MaxFreeLoad  -> Max amount of stones before you overweighted
;------------------------ Routine -----------------------------
SUB RANA_WeightCheck %1
  Set !MODE %1
  ;Makre sure Data can be gathered
   if #MAXWEIGHT = N/A
    {
     Event Macro 8 2
     Wait %DelayEvent
     }
  ; INIT the WeightCheck and Collect needed Data
  if INIT in !MODE
   {
    Set %WC_RACE N/A
    Set %WC_ServerTypeSP #FALSE
    Set %WC_ServerName Regular
    ; Check out Race ELFs and Humans have differend weight limits
    FindItem #CHARID *
     if #FindType notin XU_AV
      Set %WC_RACE HUMAN
     if #FindType in XU_AV
      Set %WC_RACE ELF
    ; Check out Sever Name because SP has other Limits
    If Siege , #SPC , Perilous in #SHARD
     {
      Set %WC_ServerName SP
      Set %WC_ServerTypeSP #TRUE
     }
    ;Check Status of BackPack
    GoSUB RANA_ContainerItemCheck #BackPackID
    Set %WC_MaxFreeItems #RESULT
   }
   ; Calculate Weight Limits
   if HUMAN in %WC_RACE
    Set %WC_MaxFreeLoad ( #MAXWEIGHT + 60 ) - #WEIGHT
   if ELF in %WC_RACE || %WC_ServerTypeSP = #TRUE
    Set %WC_MaxFreeLoad #MAXWEIGHT - #WEIGHT
   ; Check if Data is in Range
   if %WC_MaxFreeLoad > 550
    Set %WC_MaxFreeLoad 550
   if %WC_MaxFreeLoad < 0
    Set %WC_MaxFreeLoad 0
RETURN
« Last Edit: June 18, 2009, 09:12:50 AM by rana70 »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: AFK Silver Farmer
« Reply #8 on: June 18, 2009, 09:15:23 AM »
+1
Wow thats a lot of code there Rana....

Here's mine

Code: [Select]
set %backpackmaxweight 550
gosub fix_maxweight
set %maxweight #result


sub fix_maxweight
  if #maxweight = N/A
  {
    event macro 8 2
    wait 10
    event macro 10 2
  }
  set %_dummyvar #maxweight
  finditem #charid
  if #findtype notin AV_XU ; NOT ELF
    set %_dummyvar #maxweight + 60
  ;Backpack max
  if %_dummyvar > %backpackmaxweight
    set %_dummyvar %backpackmaxweight
return %_dummyvar
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: AFK Silver Farmer
« Reply #9 on: June 18, 2009, 09:25:44 AM »
+1
Cerveza you are true .. yours is much shorter...

This long and commented code is because I am a kind of noob with scipting
and I like to understand what I was doing .. and .. why I did what :-O)
I try to get regular stuff I do over and over in scripts ... into multi useable
SUBs .. and this Weigtht Handler is one of the results


But I guess yours will struggle on SP ...
a human on SP hasn't the + 60

DeadIssue2 sorry for spam your script thread ... but I am sure TM and Cerveza
will delete this for you :-)
cu

« Last Edit: June 18, 2009, 09:27:39 AM by rana70 »

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: AFK Silver Farmer
« Reply #10 on: June 18, 2009, 09:38:47 AM »
+1
NP Rana, my sub surely won't work on SP. I'll leave these posts as they are, great example of different coding trains of though. But if you look deeply, you see they are very similar at the core.

Hopefully DI2 has a clear understanding of what's going on. It's not about how much weight a char can carry, but how much weight the backpack will support. Chars now are capable of carrying more then the pack can hold LOL.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: AFK Silver Farmer
« Reply #11 on: June 18, 2009, 02:27:04 PM »
+1
Thank you both so much don't delete a thing for a day or 2 I am finally understanding what your talking about (i think) and I wanna pick thru both codes you guys posted. And hell maybe someone else can learn at the same time.

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: AFK Silver Farmer
« Reply #12 on: June 20, 2009, 06:50:14 PM »
+1
Okay fixed the weight math and it runs like a charm. I will still work on the stuff that was mentioned as far as different shards go this coming week. But as is seems to work wonders for me. Farmed 80k silver in 1 night.

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: AFK Silver Farmer
« Reply #13 on: February 27, 2011, 09:26:37 AM »
+1
Well i am new to farming silver.  I did as said and got my tamer to blighted grove. Was dressed. Does the silver fall into the pack? I didnt see anything on the bodies nor in my pack. I am in a faction. Well joined one today.

Offline Kalaka

  • Full Member
  • ***
  • Posts: 215
  • Activity:
    0%
  • Reputation Power: 2
  • Kalaka has no influence.
  • Respect: +25
  • Referrals: 0
    • View Profile
Re: AFK Silver Farmer
« Reply #14 on: February 27, 2011, 09:48:59 AM »
+1
Make sure you're not in TB, and in fel..

Tags: