Author Topic: Snow's Scribe Scroll Maker  (Read 5174 times)

0 Members and 1 Guest are viewing this topic.

Offline TidusTopic starter

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Snow's Scribe Scroll Maker
« on: February 21, 2010, 02:03:47 PM »
0
Currently working on this but there will be no updates til i have a working product on my end.
« Last Edit: April 02, 2011, 11:34:02 AM by Tidus »
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #1 on: February 21, 2010, 03:15:43 PM »
0
it askes me to targethte  container and i do so, nothing happens.

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #2 on: February 22, 2010, 07:29:47 AM »
0
Will run this tonight and lat ya know.

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #3 on: February 22, 2010, 07:57:00 AM »
0
ok i get a big  menu, set it to what i was after, target hte container, then the menu drops back  to emepty and nothing happens. Looking good tho !!!!

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #4 on: February 22, 2010, 10:16:58 AM »
0
I will give this a look over tonight as well. There are currently no working whole book filler inscription scripts out there, as they all broke with the recent craft updates and have not been fixed. This could really help fill that void.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline TidusTopic starter

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Snow's Scribe Scroll Maker
« Reply #5 on: February 22, 2010, 11:17:06 AM »
0
i just ran the debugger in SUO...  alot of fixes to be made.  this will be done tonight when i get home.  So be prepared for a new version.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #6 on: February 23, 2010, 09:30:37 PM »
0
i will give it a whirl  in the AM.

Offline madatu

  • Full Member
  • ***
  • Posts: 146
  • Activity:
    0%
  • Reputation Power: 2
  • madatu has no influence.
  • Respect: +11
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #7 on: February 24, 2010, 06:24:46 AM »
0
Tidus,

        I need tomake a few spells wall of stone. When i start it i set it to the correct type of desired scroll and place the quanity desired. I start it and target the container. It grabs a pen, blank scrolls and garlic but does not grab blood moss. The script seems to freeze at that point. So i went a little further. I reset the script and set it to all of the first level spells but only two of each, it went thru the same process but this time it grabbed several reagants and out of the desired scrolls it only made two ofthe desired 8. It made one deeble mind and one weaken. Not sure if this is ready to do it yet but it isnt putting the unused material back when the scripts says it is finished. It is getting there. I wonder if the huge menu could be compressed somehow? Great work tho.

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #8 on: February 24, 2010, 12:24:18 PM »
0
Okay, To simplify Some Coding you might just use a generic sub for Supplying your resources, I'll send you mine when I get home but basics of it is this..... hell that might actually be more efficient than what I have....... (Need to add in #findcol for Items of the same type into this too...)
Anyways.....
Code: [Select]
Gosub Resource (Type) (Minimum) (Maximum)

Sub Resource
Finditem %1 C_ , #Backpackid ; Locates them in secure
set %amount_Found 0
for #findindex 1 #findcnt
{
set %Amount_Found %Amount_Found + #findstack
}
if %Amount_Found > %2
return
finditem %1 C_ , %secure ; Locates them in secure
if #findcnt < 1
display Out of Reagants
set %Amount_Drag %3 - %Amount_Found
Exevent drag #findid %Amount_Drag
wait 10
Exevent dropc #backpackid
wait 20
return

The Basic Idea behind the Script is that you check what you want to make, and enter in the quantity Right? Next I'd probably Just Get Rid of the set %Done, and just have a #findstack Check in your secure container for how many Scrolls are present.

Code: [Select]
Sub Make_Scroll
set %Done False
Finditem %Desired_Scroll C_ , %Secure
if #findstack >= %Desired_Amount
Return
Repeat
{
For %resource_Number 1 %Total_Resources
{
set %Resource %resource . %resource_number ; This is setup in your menu check
Gosub Resource %Resource (Min) (Max)
}
Gosub Craft
Finditem %Desired_Scroll C_ , %Secure
if #findstack >= %Desired_Amount
set %Done True
}
until %Done = True
Return

And then you would go through the logic you already have in place.

Code: [Select]
menu get Waterelemental
if #menures = #true
   {
set %Total_Resources 3 ; Gives it a number to loop through checking the resources
set %Resource1 ;Blood moss
set %Resource2 ; Mandrake Root
set %resource3 ; Spiderssilk
  menu get Waterelemental1
   set %Amount_Desired #menures ; Sets quantity to check for in your secure
   set %selectionx %selection6x
   set %selectiony %selection6y
   set %catx %cat4x
   set %caty %cat4y
   set %clicknext #true
   gosub craftsetup
gosub Make_Scroll
}
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline Paulonius

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #9 on: February 24, 2010, 12:47:38 PM »
0
T,

I am pretty raw myself, but I will help as best I can.

A couple of thoughts.

100% agree with MW's suggestions for moving stuff. Standardize the format and you can use one sub to move everything.

I was looking through your gump issues and I have not sorted them out yet, but I suspect its in the click structure you are using.  I don't think you care where the gumps are on the screen and I would not bother moving them around for a craft script.  You are using gump clicks, but it looks like your script assigns #ContPosX and Y to a variable %gumpx and y and uses these to perform gump clicks. The problem you are having might be that if the container, in this case the craft gump, moves, then those values will be wrong. I like the system TM has posted for gump clicks because it continually calculates the gump offset based on the current value. It won't matter if the gump moves if you are always using the current position value. I don't see much value in re-assigning container variables, but maybe I am missing something. Its at: http://www.scriptuo.com/index.php?topic=505.0;highlight=offset+click

Switching over might fix your problem.

It looks like you are hard-coding the waits after the clicks.  This works fine for lots of scripts.  I often see a "wait 20" or something like that in craft scripts after a gump click with a check to see if it worked.  Personally I prefer a gumpwait sub that will give me a return result if the gump doesn't open within a time window.  You can set the timeout to a length of time that should never occur (its a craft script!) and then if it doesn't work, then you put in code to cycle back to the beginning of the click series.  I would start with sorting out your gump clicks though, as I suspect that is where things are going wrong.

Here is the structure of gumpwaits I have been using for craft scripts:

Code: [Select]
SomethingWentWrongLoop:
Gosub OffSetClick 280 450      ; make last
    gosub waitforgump %cwin
          if ! #result
          {
          Goto SomethingWentWrongLoop
          }

Code: [Select]
;================== Wait for gump ======================
sub waitforgump
set %timeout #scnt + 10
while #contsize <> %1
      {
      wait 1
      if #scnt > %timeout
         {
          return #false
         }
      }
wait %gumpwait
return #true

You also need to have defined the gumps you will use in the script and the gump wait interval in your setup like this:

Code: [Select]
set %cwin 530_507            ; Crafting window size
set %gumpwait 1 ; Increase number to slow down clicks on menus.  20 = 1 second.

As an aside, I would never start working from on a script with the menu.  Although that's where most scripts start from the user side, beginning your draft work there introduces another layer of opportunity to introduce errors. Better to get the script doing what its supposed to first and then put the menus on -- although I generally never get to that!!  

Ps.  Just a heads up, the real coders on this board abhore goto's and don't like the loop I use in my gump-waits because you can't proof the script.  If I find a cleaner way to do the same thing I will change my ways!!

« Last Edit: February 24, 2010, 12:51:23 PM by Paulonius »
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline TidusTopic starter

  • Lazy
  • Administrator
  • *
  • *
  • Posts: 1291
  • Activity:
    0%
  • Reputation Power: 15
  • Tidus is working their way up.Tidus is working their way up.Tidus is working their way up.
  • Gender: Male
  • Mind Blown
  • Respect: +151
  • Referrals: 2
    • View Profile
    • Ultimate Apparel
Re: Snow's Scribe Scroll Maker
« Reply #10 on: September 26, 2010, 04:33:55 PM »
0
UPDATED 09/26/2010 to V 1.3
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Magier

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Magier has no influence.
  • Gender: Male
  • Respect: +11
  • Referrals: 6
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #11 on: February 17, 2011, 04:06:51 AM »
0
I was trying to go thru and fill some of my stock on scrolls and decided to pull this n try it again.  It will make a single scroll that you chose but it wont make the selected amount.  It also takes a very long time to decide whats next to make.

seems to run good as far as picking and choosing the things it needs tho.
Drop out, all the cool kids are doing it.

Offline Outlaw Josey Wales

  • Full Moon Rising!
  • Hero Member
  • *
  • Posts: 595
  • Activity:
    0%
  • Reputation Power: 7
  • Outlaw Josey Wales has no influence.
  • Gender: Male
  • Respect: +59
  • Referrals: 2
    • View Profile
Re: Snow's Scribe Scroll Maker
« Reply #12 on: April 04, 2011, 09:28:08 PM »
0
noticed the download link was missing was going to look over the code

Tags: