Author Topic: Guadah's Alchimests Assistant  (Read 20229 times)

0 Members and 1 Guest are viewing this topic.

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #15 on: August 19, 2011, 02:00:13 PM »
0
I know what the problem is and where it is in the script.  I've re-written some of it, and am testing it, but have to re-write a lot of the changes I made last night... since I saved over them with the previous version of the script.

@#^@**@)#%$

OUCH!  Sorry to hear it Guadah...that really blows.

Offline gimlet

  • Very Super Secret
  • Global Moderator
  • *
  • *
  • Posts: 6191
  • Activity:
    3%
  • Reputation Power: 71
  • gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!gimlet is awe-inspiring!
  • Gender: Male
  • Respect: +273
  • Referrals: 3
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #16 on: August 19, 2011, 02:23:44 PM »
0
Been there done that - I feel your pain!

Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #17 on: August 19, 2011, 07:18:56 PM »
0
Alright, beta is back up.

I have added a counter to the right side of the Amount box that counts up as you get closer to your desired amount, have also cleaned up the code in a number of different subs... mostly because as I corrected one thing, I broke 2 others... etc etc.

Now I'm at the final stages, but there is just one hitch...

The way this script works is I have put in a base amount of resources to grab of each item.  i.e. Empty Potions are set at 100.  So when you run out it will clear the Finished Potions and grab more... however I've also tied the counter into this process.

Each time a potion is made I count.  example:
Code: [Select]
finditem %finished_items C_ , #backpackid
set %finished_count ( #findstack + %old_stack )
menu set %currently_crafting %finished_count

%finished_items are a list of every single 'finished' item the script makes.  %old_stack I will get to in a minute... but just assume that at this point the value is 0, so the second line will add up to whatever you have currently in your backpack (which is ONLY what your making because I clear the backpack during the beginning of the script)

Now after you run out of the empty potion bottles, it will clear the backpack of finished items.  Here is where I run into my major problem.  If somebody wants to make 2000 Greater Cure potions, they obviously can not keep that many in their backpack, so I used the variable %old_stack to count how many you cleared out of your backpack.  Example:

Code: [Select]
finditem %finished_items C_ , #backpackid
set %old_count ( %old_stack + #findstack )

The first time through the sub, it just does

set %old_count #findstack

Which would set %old_count at the value of 10.  Now I know I've only had Calculus, and that was over 15 years ago, but the second time it goes into that Sub, %old_stack should still be the value of 10, and the #findstack value will be 10 (if you're making something that has no failure %, which we are assuming for this experiment)... so it should be

set %old_count ( 10 + 10 )

and now %old_count should be 20... but THIS Is not the case.

The rest of the sub just clears out Finished items, so I left that out.  Now that part above I STILL think should work, but after the second cycle through, it keeps resetting back as if it was just the first time through.

Example
Say the Max amount you can pull into your pack is 10.  The script will make 10 potions, transfer those finished into the chest, then grab 10 more.  The counter will work as intended up to 20.  At this point the script takes those new 10 finished potions out of your backpack, drops into the chest, grabs 10 more but the counter starts back up at 11, not at 21.

I hope to God this makes sense to somebody here, even reading it I get a little confused.  I have to do something different because it's not like I can count attempts (Deadly Poison has a lot of failures), and at times I've lost Empty Potions when you fail and lose resources.  So I can't guarantee that I will ALWAYS send an equal amount to the chest each time and just do a multiplier.

At this point I've been fighting with this for a day and a half, and have tried everything I can think of.  Any of you have an idea?

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #18 on: August 20, 2011, 08:35:32 AM »
0
e.g you could use something like this.
Code: [Select]
if #findcol = 333
set %Green_potion_ammount %Green_potion_ammount + #findstack

or
Code: [Select]
 event Property #findid
  if Apple , #spc , Crab in #property
    set %Apple_Crab_ammount %Apple_Crab_ammount + #findstack
« Last Edit: August 20, 2011, 09:47:59 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #19 on: August 20, 2011, 06:47:16 PM »
0
Isn't that the same as
Code: [Select]
set %old_count ( %old_stack + #findstack )
So if I write it as
set %old_count %old_stack + #findstack

That will return different results?

Offline camotbik

  • Sr. Member
  • *
  • Posts: 349
  • Activity:
    0%
  • Reputation Power: 3
  • camotbik has no influence.
  • Gender: Male
  • Hello! I'm a UO addict.
  • Respect: +38
  • Referrals: 0
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #20 on: August 21, 2011, 01:48:43 AM »
0
Well yeah, but why use two variables if you can use just one(the one you need for the exact potion type)? e.g. in the future if you will insert an option to make 2000 greater heals and 2000 stamina potions your timer would be f up.

yeah and your problem is
Code: [Select]
if %old_stack >= 1 ; <--------- LOOK HERE!
   {
   set %old_count ( %old_stack + #findstack ) ; < ------ LOOK HERE
   for %i 1 #findcnt
       {
       finditem %finished_items C_ , #backpackid
       exevent drag #findid #findstack
        wait 10
       exevent dropc %dump_bag
        wait 15
       }
   return

You are setting %old_count %old_stack e.g. 55 + #findstack e.g. 33 so %old_count is 88 - you never use the variable latter in the code. The other thing after a lap you again are doing the same thing,getting  %old_count 55 to #findstack e.g. 44. I hope you understand this. I would use the method i stated above, it would eliminate much problems.
« Last Edit: August 21, 2011, 01:51:16 AM by camotbik »
What you witness -- is whatver..
uogamers hybrid.

Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #21 on: August 21, 2011, 07:28:34 AM »
0
I think I get what your saying.  I have had an idea on what to do, but if I open up Easy UO and/or UO before helping clean the house, my wife may remove one, or both, of my testicles.

So off to fold some laundry, then I'll get knee deep into this.

Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #22 on: August 22, 2011, 12:56:05 PM »
0
Fixed the counting issue.  Thank god.

Still need to get my account upgraded to the High Sea's Booster pack to get the ID value of the Endless Water and test it in the script.  Will need to add a bit of code in to pull that before grabbing normal water's etc.  Otherwise the script is working like a boss.

Offline MeWonUo

  • Hero Member
  • *
  • Posts: 913
  • Activity:
    0%
  • Reputation Power: 11
  • MeWonUo barely matters.MeWonUo barely matters.
  • Gender: Male
  • Respect: +85
  • Referrals: 1
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #23 on: August 22, 2011, 01:21:58 PM »
0
Endless Decanter of water = VBM

I think that's what you were referring to. :)

Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #24 on: August 22, 2011, 01:58:54 PM »
0
I thank you sir.

* Front page is updated.
« Last Edit: August 22, 2011, 02:13:57 PM by Guadah »

Offline NecroFox

  • Jr. Member
  • **
  • Posts: 58
  • Activity:
    0%
  • Reputation Power: 1
  • NecroFox has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 2
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #25 on: August 29, 2011, 08:30:57 PM »
0
Works like a dream thank you very much
Sorry for spelling I hate spelling and im really bad at it
----------------------------------------------------
New to writing Scripts need Help accepting from all.
Good Learner
----------------------------------------------------
The Fox is cunning so watch your back....

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #26 on: November 02, 2011, 08:04:54 PM »
0
Congratulations your Script has been moved to the script library
(if you dont think the section is appropriate please pm me)
Thank you for your submission
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline LV

  • Jr. Member
  • **
  • Posts: 16
  • Activity:
    0%
  • Reputation Power: 1
  • LV has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #27 on: March 31, 2012, 01:41:12 PM »
0
Hi Gudah,

Wondering if your still updating this script.  I tried using it on siege to make black powder, and it is not working right.  The object id's are good, but it moves things around in a very strange way.  I have not had time to debug it, and before I do wanted to see if you are or are not actively updating it.  If not, let me know (or will assume if I dont hear from you that you are not.).  Anyways, it is moving 100 (i think) of the ingredients in, making one black powder, then moving ALL the ingredients out (2 extra moves), increments the counter by like a couple thousands, then says complete after making a couple black powders if i set quantity to say 10000.  If you need more info let me know, but I am sure this problem is not shard specific, and it DOES make 1 or 2 black powders so its not an object id problem due to upgrade either.


Regards,
LV



Offline GuadahTopic starter

  • Full Member
  • ***
  • Posts: 119
  • Activity:
    0%
  • Reputation Power: 3
  • Guadah has no influence.
  • Gender: Male
  • Who farted?!
  • Respect: +29
  • Referrals: 3
    • View Profile
    • L%N Website
Re: Guadah's Alchimests Assistant
« Reply #28 on: May 06, 2012, 06:14:53 PM »
0
Hi Gudah,

Wondering if your still updating this script.  I tried using it on siege to make black powder, and it is not working right.  The object id's are good, but it moves things around in a very strange way.  I have not had time to debug it, and before I do wanted to see if you are or are not actively updating it.  If not, let me know (or will assume if I dont hear from you that you are not.).  Anyways, it is moving 100 (i think) of the ingredients in, making one black powder, then moving ALL the ingredients out (2 extra moves), increments the counter by like a couple thousands, then says complete after making a couple black powders if i set quantity to say 10000.  If you need more info let me know, but I am sure this problem is not shard specific, and it DOES make 1 or 2 black powders so its not an object id problem due to upgrade either.

Regards,
LV

If you feel up to digging through the code please feel free.  My class schedule is currently keeping me out of any games, I hardly have time to do anything but attend class, study, drink and sleep.  I need to install UO on my computer anyways!  If you find something go ahead and post it in an attachment and shoot me a PM.  I'll update the script and post your credits in the front page and in the script.  This is my favorite script of everything I wrote back in the day, so I'd love to see it continue to get updated.

Offline cdavbar

  • Jr. Member
  • **
  • Posts: 36
  • Activity:
    0%
  • Reputation Power: 2
  • cdavbar has no influence.
  • Respect: +2
  • Referrals: 1
    • View Profile
Re: Guadah's Alchimests Assistant
« Reply #29 on: August 06, 2012, 05:17:52 PM »
0
After looking through the script I found two things concerning the black powder.

The first was an easy fix.  The script was pulling the wrong amounts of each resource (pulling 600 charcoal and only 1 saltpeter and 1 sulfurous ash).

Code: [Select]
set %resource3 SZF ; sulfurous ash
   set %resource2_name Charcoal
   set %resource1_name Saltpeter
   set %resource3_name Sulfurous , #spc , Ash
   set %amount_to_grab1 600
   set %amount_to_grab2 100
   set %amount_to_grab3 100
   set %minimum_required_resource1 6
   set %minimum_required_resource2 1
   set %minimum_required_resource3 1

Should read like this:

Code: [Select]
set %resource3 SZF ; sulfurous ash
   set %resource2_name Charcoal
   set %resource1_name Saltpeter
   set %resource3_name Sulfurous , #spc , Ash
   set %amount_to_grab1 100
   set %amount_to_grab2 600
   set %amount_to_grab3 100
   set %minimum_required_resource1 1
   set %minimum_required_resource2 6
   set %minimum_required_resource3 1

The second issue concerning blackpowder I am a little stumped on since I am not used to using resourse names or color id's.  However I believe the reason the script ends after just making a few blackpowders is becuase it is counting the saltpeter and charcoal as blackpowder based of the code AFZ.

Code: [Select]
set %finished_items ZUF_AVF_NUF_UUF_XUF_YUF_TUF_OUF_AFZ
Since they all use that AFZ id then the script assumes you have made the requested amount based off of the resources it pulls to make the blackpowder.

*EDIT*

I also came to this conclusion on the %finished_items AFZ code since the script places the saltpeter and charcoal in the finished items container instead of back into the resource container.
« Last Edit: August 06, 2012, 05:22:45 PM by cdavbar »

Tags: