ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Crafting => Topic started by: manwinc on May 06, 2009, 11:51:54 PM

Title: Mwinc. Enchanted Apple Crafter
Post by: manwinc on May 06, 2009, 11:51:54 PM
Directions are Included In the Script. Use potions, not kegs. Will Craft Tools For you.

Code: [Select]
;=======================================================
; Script Name: MWinc. Enchanted Apple
; Author: MWinc.
; Version: 1.2
; Client Tested with: Baja
; EUO version tested with: 148
; Shard OSI / FS:  OSI
; Revision Date:
; Public Release:
; Purpose: Crafts Enchanted Apples
;=======================================================
; Directions
; 1. Have a Secure with Plenty Of Apples, and Greater Heal "POTIONS"
; 2. Have Either Enough Cooking Tools On You To make A Bunch
; 3. Or Plenty of COoking tools in your Secure
; 4. Or Tinkering Tools In your Backpack,
; 5. Or Tinkering TOols In your Secure.......
; 6. If You are Using Tinkering Tools to make Skillets... have
;    Iron Ingots in your Secure, And ONLY iron ingots in your secure.
; That seemed like way too many Directions.....
; Set Intro To anything But True To skip that Funny Intro
;======================================================
set %intro True
if %intro = True
gosub Intro
gosub setup

;================================================================
; My setup Stuff
set %Craftmenu 530_497
set %fletchingtool UFG
set %tailoringtool HAG
set %alchemytool RQF
set %tinkeringtool JTL
set %blacksmithingtool OBG_FBG_TLH
set %cookingtool OGG_DND_BCG
set %carpentrytool BIG_AIG_EGG_AGG_ZHG_CGG_CIG_IGG_WFG_KGG

; gosub craft "Tool Type" , " setting " , "categorie" , " Page " , " number Down " ,
; gosub makelast "Tool Type"
; gosub resource "item" , Min , Max
;=====================================================================
Finditem %CookingTool C_ , #Backpackid
if #findcnt > 0
gosub craft Cooking N/A 5 1 2
Main:
Gosub Check_Tools
gosub resource UUF 1 10
gosub resource QQD 1 10
gosub makelast Cooking
finditem CBS C_ , #backpackid
if #findstack > 20
gosub drag #findid #findstack %Secure
goto main





sub Check_Tools
Finditem %CookingTool C_ , #backpackid
if #findcnt > 0
return
Check_Tools:
Finditem %CookingTool C_ , #backpackid
if #findcnt > 0
{
gosub craft cooking N/A 5 1 2
return
}
finditem %tinkeringtool C_ , #backpackid
chooseskill Tink
if #findcnt < 2 && #findcnt > 0 && #skill >= 300
{
gosub resource ENK 10 20
gosub craft Tinkering iron 2 1 4
goto Check_Tools
}
if #findcnt > 1 && #Skill >= 300
{
Gosub resource Enk 10 20
gosub Craft Tinkering Iron 2 2 9
goto check_Tools
}
if #Findcnt = 0 || #Skill < 300
{
Finditem %cookingtool C_ , %Secure
if #findcnt < 1
gosub end outoftools
Gosub Drag #findid #findstack %secure
return
}
if #Findcnt = 0 && #Skill >= 300
{
Finditem %TinkeringTool C_ , %Secure
if #findcnt < 1
gosub end outoftools
gosub Drag #findid #findstack #backpackid
goto Check_Tools
}
Return

sub drag
set %DropWeight #weight
exevent drag %1 %2
exevent dropc %3
set %Time_Limit #Scnt + 3
while #weight = %dropweight && %Timer_Limit > #Scnt
wait 1
if %Timer_Limit < #Scnt
{
Wait 20
Gosub backpack
goto resource
}
Wait 20
return

sub craft
gosub ToolEval %1
Finditem %tool C_ , #backpackid
if #findcnt < 1
gosub End OutOfTools
if #lobjectid <> #findid || #contsize <> %CraftMenu
{
set #lobjectid #findid
event macro 17 0
}
gosub contsizewait %Craftmenu
gosub setting %2
gosub category %3
gosub page %4
gosub rownum %5
return

sub makelast
gosub tooleval %1
finditem %tool C_ , #backpackid
if #findcnt < 1
gosub end outoftools
if #lobjectid <> #findid || #contsize <> %CraftMenu
{
set #lobjectid #findid
event macro 17 0
gosub contsizewait %craftmenu
}
set %xclick #contposx + 280
set %yclick #contposy + 450
click %xclick %yclick
wait 20
return

sub resource
Resource:
finditem %1 C_ , #backpackid
set %bagamount #findstack
if #findstack > %2
return
finditem %1 C_ , %secure
if #findcnt < 1
gosub end Resources
set %dragamount %3 - %bagamount
gosub Drag #findid %dragamount #backpackid
return

sub rownum
set %xclick #contposx + 235
set %starty #contposy + 50
set %yclick ( %starty + ( %1 * 20 ) )
click %xclick %yclick
wait 20
return

sub category
set %starty #contposy + 70
set %xclick #contposx + 30
set %yclick ( %starty + ( %1 * 20 ) )
click %xclick %yclick
gosub contsizewait %craftmenu
return

sub page
if %1 = 1
return
set %clicknum %1 - 1
set %xclick #contposx + 385
set %yclick #contposy + 270
click %xclick %yclick x %clicknum
return


sub Tooleval
if %1 = alchemy
set %Tool %Alchemytool
if %1 = fletching
set %tool %Fletchingtool
if %1 = blacksmithing
set %tool %blacksmithingtool
if %1 = tailoring
set %tool %Tailoringtool
if %1 = tinkering
set %tool %Tinkeringtool
if %1 = carpentry
set %tool %Carpentrytool
if %1 = cooking
set %tool %Cookingtool
set %tool2 %1
return

sub Contsizewait
Contsizewait:
wait 15
set %Time_Limit #scnt + 4
finditem #lobjectid
if #findcnt < 1
return
while #contsize <> %1 && %Time_Limit > #Scnt
wait 1
if %Time_Limit <= #scnt
{
event macro 17 0
goto Contsizewait
}
return

sub setting
set %setting % . setting . %tool2
if %setting = %2
return
gosub contsizewait %craftmenu
set %clickx #contposx + 31
set %clicky #contposy + 372
click %clickx %clicky
wait 10
set %clickx #contposx + 230
if %2 = iron
set %clicky #contposy + 70
if %2 = Dullcopper
set %clicky #contposy + 90
if %2 = shadowiron
set %clicky #contposy + 110
if %2 = copper
set %clicky #contposy + 130
if %2 = bronze
set %clicky #contposy + 150
if %2 = gold
set %clicky #contposy + 170
if %2 = Agapite
set %clicky #contposy + 190
if %2 = Verite
set %clicky #contposy + 210
if %2 = Valorite
set %clicky #contposy + 230
if %2 = wood
set %clicky #contposy + 70
if %2 = oak
set %clicky #contposy + 90
if %2 = ash
set %clicky #contposy + 110
if %2 = yew
set %clicky #contposy + 130
if %2 = heartwood
set %clicky #contposy + 150
if %2 = bloodwood
set %clicky #contposy + 170
if %2 = Frostwood
set %clicky #contposy + 190
click %clickx %clicky
gosub Contsizewait %Craftmenu
set % , setting , %tool2 %2
wait 10
return

Sub End
if %1 = OutOfTools
Display You are Out of Tools
if %1 = Resources
Display Need more resources
halt

sub setup
menu window Title setup
menu window size 200 100
menu show 0 0
menu window color silver
menu font bgcolor silver
menu font size 14
menu text setup 20 25 Target Your Secure
set #targcurs 1
set %time #systime
while #targcurs = 1
{
if #random < 25
{
menu clear
menu font Bgcolor silver
menu font color black
menu font size 40
menu text setup 40 10 KILL!
wait 1
menu clear
menu font bgcolor silver
menu font size 14
menu text setup 20 25 Target Your Secure
}
wait 1
}
set %secure #ltargetid
set #lobjectid %secure
event macro 17 0
while #contid <> %Secure
wait 1
Contpos 0 0
wait 20
menu Hide
return

sub INTRO
menu window Title Apples
menu window size 300 100
menu show 0 0
menu window color silver
menu font bgcolor silver
menu font size 16
menu font color black
menu text apples 75 75 Loading....
menu image create apples 0 0 200 200
set #lpc 400
menu clear
menu font bgcolor silver
menu font size 16
menu text apples 75 75 Loading....
menu image create stick1 0 0 300 300
menu image rectangle stick1 69 46 85 60 black #true 2
menu image ellipse stick1 70 1 85 16 black 1
menu image line stick1 77 16 77 36 black 2
menu image line stick1 77 20 100 20 black 2 ;arm 1
gosub BOW
menu image line stick1 77 36 83 46 black 2
menu image line stick1 77 36 71 46 black 2
menu image create head 0 0 300 300
menu image ellipse head 170 15 185 30 black 1 ;end stick1
menu image ellipse head 174 10 180 15 red 1
menu image line head 177 7 177 10 black 1
menu image line head 170 20 185 20 white 2
menu image line head 185 20 190 25 white 2
menu image create apples 0 0 300 300
menu image line apples 177 30 177 50 black 2
menu image line apples 177 34 172 43 black 2
menu image line apples 177 50 183 60 black 2
menu image line apples 177 50 171 60 black 2
menu image Rectangle apples 220 0 250 60 2511000 #true 2
menu image create Arrow 0 0 300 300
menu image line arrow 80 20 120 20 black 2
menu image line Arrow 120 17 120 23 black 2
menu image line arrow 120 17 125 20 black 2
menu image line arrow 120 23 125 20 black 2
menu image line arrow 85 20 80 17 black 2
menu image line arrow 85 20 80 23 black 2
for %number 1 6
{
set %x_Menu_Pos ( %number * 10 + 0 )
menu image pos arrow %x_Menu_Pos 0 300 300
wait 1
}
set %X_Menu_Pos2 0
for %number 1 4
{
set %X_Menu_pos %X_menu_Pos + 10
Set %x_Menu_Pos2 %X_Menu_Pos2 + 10
menu image pos arrow %x_Menu_Pos 0 300 300
menu image pos Head %X_Menu_Pos2 0 300 300
wait 1
}
for %number 1 10
{
set %y2 %number + 30
menu image line apples 220 30 220 %y2 Red 3
wait 5
}
menu font bgcolor silver
menu font color black
menu font size 16
menu text apples 100 0 BOOM!
wait 15
menu text apples 100 20 HEAD
menu text apples 100 40 SHOT!
wait 15
menu clear
menu Font Color Black
menu font bgcolor Silver
menu font size 25
menu text apples 13 20 ~ Man Whores Inc ~
menu font size 12
wait 3
menu text apples 90 60 "Obey Us"
wait 3
menu text apples 70 80 " We have candy "
wait 10
menu clear
return


sub bow
menu image line stick1 100 11 100 29 black 2
menu image line stick1 100 11 90 1 black 2
menu image line stick1 100 29 90 39 black 2
menu image line stick1 90 1 90 39 black 1
return

sub Backpack
Backpack:
event macro 9 7
wait 20
event macro 8 7
set %Timer_Limit #scnt + 2
while #contid <> #backpackid  && %Timer_Limit > #Scnt
wait 1
if %Timer_Limit <= #scnt
goto Backpack
contpos 700 525
return


 
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: THERA on March 29, 2010, 05:25:15 PM
i seem to be having trouble getting this script to work. it asks me to click secure so i do then it open the menu but wont craft anything any ideas ???
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on March 30, 2010, 03:48:52 PM
HAHAHAHA, Its probably so old it never got updated for the menu changes. I'll look it over tonight.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on March 30, 2010, 03:50:18 PM
Yeah I can tell right there.

set %Craftmenu 530_437

needs to be changed to 530_507

and in sub makelast
set %yclick #contposy + 410

needs to be changed to
set %yclick #contposy + 450


I think that fixes it. I'll test it and change it once I'm home though.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Paulonius on March 30, 2010, 04:49:51 PM
Craft menus changed today.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: THERA on March 31, 2010, 12:35:03 PM
if u changed it then it still wont work for me, it opens the menu but doesnt pull anything into my pack or craft anything or even crash just stops at the menu i seriouslly would love for this to work for me :D
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on March 31, 2010, 06:22:09 PM
try it now
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: THERA on March 31, 2010, 07:27:13 PM
Works awesome thanks a bunch !!!!! i appreciate this and so will my guildmates haha !!
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: THERA on April 12, 2010, 06:23:32 PM
its me again !!! since the patch the script wont work could someone fix it for me prettttttty pleasesssssss!! thanks a bunches
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: JustAnotherFace on April 12, 2010, 06:56:56 PM
its me again !!! since the patch the script wont work could someone fix it for me prettttttty pleasesssssss!! thanks a bunches
Thera,

This is a really simple fix, and it was explained to you the last time it broke on how to fix it.  I understand that you said in the chat box that you dont know how to script.... but dude, now would be a perfect time for you to at least ATTEMPT to learn something.  Look back in the comments above, they tell you exactly what to change.... i will give you one hint, the new numbers are 530_497.  At least try....you cant expect someone to just keep handing you something because you are too lazy to even attempt to fix it.

Just my opinion of course, and this isnt my script. Sorry if I stepped on anyone's toes... especially the author Manwinc.  Not trying to steal your glory or support your work Man....

JaF
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: THERA on April 12, 2010, 07:42:15 PM
its me again !!! since the patch the script wont work could someone fix it for me prettttttty pleasesssssss!! thanks a bunches
Thera,

This is a really simple fix, and it was explained to you the last time it broke on how to fix it.  I understand that you said in the chat box that you dont know how to script.... but dude, now would be a perfect time for you to at least ATTEMPT to learn something.  Look back in the comments above, they tell you exactly what to change.... i will give you one hint, the new numbers are 530_497.  At least try....you cant expect someone to just keep handing you something because you are too lazy to even attempt to fix it.

Just my opinion of course, and this isnt my script. Sorry if I stepped on anyone's toes... especially the author Manwinc.  Not trying to steal your glory or support your work Man....

JaF
i understand where u are comming from but i have kids and work and house work i barely have time to play let alone fix something i have no clue how to fix im just a sngle mom looking for some fun didn need that rudeness thanks for making me feel like crap though great job
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Krusty The Klown on April 12, 2010, 08:00:51 PM
uh oh i think that means slap on the wrist for making someone do alittle work rather than someone do it for them. My own opinion sorry I can shut up now little ole me :(
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: TrailMyx on April 12, 2010, 09:00:15 PM
Well, some people just don't script author.  Some people don't play with the code at all.   So I wouldn't throw them under the bus.  However, it IS a simple fix and a GREAT time to dabble in the tweakage of a script.  There's nothing like the first script you can "tweak" to work for your own function.  It really is fun to start at that level.  You don't have to write the next CLAw, but a useful tweak can be just as fulfilling.  :)

If you'd like to try and modify the script, you'll get lots of support to help you learn. 
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: JustAnotherFace on April 13, 2010, 04:28:03 AM
its me again !!! since the patch the script wont work could someone fix it for me prettttttty pleasesssssss!! thanks a bunches
Thera,

This is a really simple fix, and it was explained to you the last time it broke on how to fix it.  I understand that you said in the chat box that you dont know how to script.... but dude, now would be a perfect time for you to at least ATTEMPT to learn something.  Look back in the comments above, they tell you exactly what to change.... i will give you one hint, the new numbers are 530_497.  At least try....you cant expect someone to just keep handing you something because you are too lazy to even attempt to fix it.

Just my opinion of course, and this isnt my script. Sorry if I stepped on anyone's toes... especially the author Manwinc.  Not trying to steal your glory or support your work Man....

JaF
i understand where u are comming from but i have kids and work and house work i barely have time to play let alone fix something i have no clue how to fix im just a sngle mom looking for some fun didn need that rudeness thanks for making me feel like crap though great job

Thera,

Didnt mean to come off exceptionally rude or make you feel like crap... though I admit, I guess I did mean to be a tiny bit rude.  Your post / track history here is 11 posts so far, 6 of those are saying something is broken and begging for a fix, 3 are in your new member thread......Just saying that perhaps you could take this opportunity to stop lurking and leeching and actually try to fix the tiniest problems your self.

This is a super simple 3 line fix.  Manwinc even gave you the 3 lines that need to be fixed in an earlier post. I gave you the number combination that needs to go into the first line that needs to be fixed.  The other numbers are simple to figure out.

The sympathy thing doesnt work with me, as I work and have all the responsibilities that you do, plus my company has me flying around the globe about 60% of the year.  Your time is what you make of it... if you are willing to learn then you can spend less time begging for fixes to be applied by someone else and actually fix them your self and get back to playing.

If you care to take a stab at it I would be MORE THAN WILLING  to help walk you through the fix.  And I am sure that I am not alone in this offer.

JaF
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on April 13, 2010, 10:38:51 AM
Fixed, Lol there was no harm in her asking to fix it. I wrote it and posted it, my responsibility while I am still active to keep it up to date.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: TrailMyx on April 13, 2010, 10:57:57 AM
Fixed, Lol there was no harm in her asking to fix it. I wrote it and posted it, my responsibility while I am still active to keep it up to date.

Get crack'in bucko!!  lol.  ;)

p.s. Thanks for the fix....  (waves magic Reputation wand....)
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on April 13, 2010, 04:14:26 PM
Yeah, I was hunting for the rest of my crafting scripts to fix and realized I never put them in the script library, just in the finished script board. Guess I'll fix em and post em in the right spot.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Longhorn on May 17, 2016, 04:50:10 AM
Is there a Grapes of Wrath version?  If not could you point out what I'd have to edit to make this work for grapes? (provided Mwinc is ok with his work being edited/altered)


Edit: I changed
gosub resource UUF 1 10
gosub resource QQD 1 10


To:
gosub resource XUF 1 10
gosub resource PQD 1 10

and im grabing grapes and greater strength, I just cant figure out how to change the menu selection from apples to grapes

Edit #2 found

gosub contsizewait %Craftmenu
gosub setting %2
gosub category %3
gosub page %4
gosub rownum %5

Changed to

gosub contsizewait %Craftmenu
gosub setting %2
gosub category %2
gosub page %4
gosub rownum %5

its taking the grapes and greater strength, making the grapes of wrath. Now i just need to figure out how to put the grapes of wrath into the secure.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Insideout on December 24, 2017, 01:19:38 PM
Can I get someone else to try and run this and see if my stuff is just gooofed up. Lol I don't wanna make 20k apples by clicky clicky lol but these fund my Music Gears addiction.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: The Ghost on December 24, 2017, 01:24:40 PM
weird, because it not event the same tool.   DId you check to ensure the ID of the tool is provided.    What are you using for cooking tool?
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Insideout on December 24, 2017, 01:25:53 PM
I can't get it to load past the Intro lol
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: The Ghost on December 24, 2017, 04:25:56 PM
Insideout,   I copy the version from the front and hit play.   It made 6 apples with the supply available.   It grab what it needed and craft it.   

Work asintended
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gandolf on November 06, 2019, 10:44:41 AM
this scrip work great but now can't get past the loaded menu any ideas. thx
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gaderian on November 06, 2019, 11:35:38 AM
Can you provide some details? Free shard vs OSI? EUO client version? UO client version?

Gaderian
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gandolf on November 06, 2019, 12:21:53 PM
UO client version? 1.6.0.332 and 334 and goes to loading and that is it
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gaderian on November 06, 2019, 02:22:56 PM
the 1.6.0.334 Easyuo version is good.
What is the UO client you are trying to start? (if it won't launch, then what is it if you launch manually?)
Are you running Easyuo with "run as administrator" rights? (right click on the program when starting to run it to choose running as admin).

Gaderian
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Thargorff on December 19, 2020, 09:11:11 AM
I am too cant get past the load window with bow and apple, tried to change numbers as suggested but i dont think its the crafting menu itself, the script just wont start at first line. OSI shards, everything updated

Post Merge: December 19, 2020, 09:22:57 AM
made it work, somehow. At the beginning of the script there are couple lines :

set %intro True
if %intro = True
gosub Intro
gosub setup

I deleted first three lines and it started working, no menu, just asking to pick your secure container. Intro sub is missing? that be my guess, will see how long it will work me, i guess it going to make as many enchanted apples as i have supplies for

Post Merge: December 19, 2020, 10:33:54 AM
Ok, more findings, its running like a champ if you have enough tools in the inventory, drags apples/pots from secure no problem, puts enchanted apples back in the crate. Once you are out of tools, it is trying to make cook tools out of wood and looking for them in the wooden item section, not making them even though there is wood in the main and secure. Could not make it to make tools (skillet) from tools category.
I did change  set %Craftmenu 530_497, otherwise with 530-507 the craft menu was at screen bottom for some reason. At  this point my .00001% share of your scripting knowledge at dead end.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gaderian on December 20, 2020, 06:58:53 PM
Well, the intro sub is there. It looks like it is supposed to be a cute animation - but it fails in the middle for a non-obvious reason - at least to me. From what it looks to be doing that kind of drawing is probably  confused by a re-used name or something. Commenting out the "gosub intro" section is probably the best solution since it is only cosmetic.

I believe the 530_497 is the current craft menu size. Changing that may break some of the crafting steps.

Since you said it is trying to make a skillet out of wood, most likely the craft menu changed since this was last posted. New click locations on the menu probably need to be defined to make the correct item (skillet).

While I have cooking on a character somewhere, I don't do a lot of cooking. Is a skillet the only cooking tool - do you know? (Most of the cooking I ever did in game was cooking fish steaks... double click fish steak pile, target my cooking source -> either get cooked fish or burn them... *ahem* so that was a few years ago.)

If the crafting menu is off screen that can cause some issues. An appropriately placed "contpos 0 0" after the crafting menu shows up might solve it wandering away.

The account where my character with cooking is currently occupied, so I will try it again later and try to report what I find.

Gaderian
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on December 21, 2020, 03:09:21 PM
Sad that the changes to menus messed up that intro.

I'll see what I can do for modern osi
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gaderian on December 21, 2020, 05:29:05 PM
The new EasyUO menu code doesn't like the reuse of 'apple' for both the text message and the graphic.

I altered the text references to a new name and it works fine.

Code: easyuo
  1. sub INTRO
  2. menu window Title Apples
  3. menu window size 300 100
  4. menu show 0 0
  5. menu window color silver
  6. menu font bgcolor silver
  7. menu font size 16
  8. menu font color black
  9. menu text apples 75 75 Loading....
  10. menu image create apples 0 0 200 200
  11. set #lpc 400
  12. menu clear
  13. menu font bgcolor silver
  14. menu font size 16
  15. ; Revised apples -> applest
  16. menu text applest 75 75 Loading....
  17. ; End Revision - Gaderian
  18. menu image create stick1 0 0 300 300
  19. menu image rectangle stick1 69 46 85 60 black #true 2
  20. menu image ellipse stick1 70 1 85 16 black 1
  21. menu image line stick1 77 16 77 36 black 2
  22. menu image line stick1 77 20 100 20 black 2 ;arm 1
  23. gosub BOW
  24. menu image line stick1 77 36 83 46 black 2
  25. menu image line stick1 77 36 71 46 black 2
  26. menu image create head 0 0 300 300
  27. menu image ellipse head 170 15 185 30 black 1 ;end stick1
  28. menu image ellipse head 174 10 180 15 red 1
  29. menu image line head 177 7 177 10 black 1
  30. menu image line head 170 20 185 20 white 2
  31. menu image line head 185 20 190 25 white 2
  32. menu image create apples 0 0 300 300
  33. menu image line apples 177 30 177 50 black 2
  34. menu image line apples 177 34 172 43 black 2
  35. menu image line apples 177 50 183 60 black 2
  36. menu image line apples 177 50 171 60 black 2
  37. menu image Rectangle apples 220 0 250 60 2511000 #true 2
  38. menu image create Arrow 0 0 300 300
  39. menu image line arrow 80 20 120 20 black 2
  40. menu image line Arrow 120 17 120 23 black 2
  41. menu image line arrow 120 17 125 20 black 2
  42. menu image line arrow 120 23 125 20 black 2
  43. menu image line arrow 85 20 80 17 black 2
  44. menu image line arrow 85 20 80 23 black 2
  45. for %number 1 6
  46. {
  47. set %x_Menu_Pos ( %number * 10 + 0 )
  48. menu image pos arrow %x_Menu_Pos 0 300 300
  49. wait 1
  50. }
  51. set %X_Menu_Pos2 0
  52. for %number 1 4
  53. {
  54. set %X_Menu_pos %X_menu_Pos + 10
  55. Set %x_Menu_Pos2 %X_Menu_Pos2 + 10
  56. menu image pos arrow %x_Menu_Pos 0 300 300
  57. menu image pos Head %X_Menu_Pos2 0 300 300
  58. wait 1
  59. }
  60. for %number 1 10
  61. {
  62. set %y2 %number + 30
  63. menu image line apples 220 30 220 %y2 Red 3
  64. wait 5
  65. }
  66. menu font bgcolor silver
  67. menu font color black
  68. menu font size 16
  69. menu text apples 100 0 BOOM!
  70. wait 15
  71. menu text apples 100 20 HEAD
  72. menu text apples 100 40 SHOT!
  73. wait 15
  74. menu clear
  75. menu Font Color Black
  76. menu font bgcolor Silver
  77. menu font size 25
  78. menu text apples 13 20 ~ Man Whores Inc ~
  79. menu font size 12
  80. wait 3
  81. menu text apples 90 60 "Obey Us"
  82. wait 3
  83. menu text apples 70 80 " We have candy "
  84. wait 10
  85. menu clear
  86. return
  87.  

After the menu image options are done, the new reference to the text "apples" doesn't seem to upset it as much as having the text label defined before the graphic use - though by the new menu design rules, these now are supposed to be unique...

Apparently reusing the ID in text messages is not as crippling as reusing it in graphic situations in the new EasyUO...  ;)

Gaderian
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: manwinc on December 21, 2020, 08:09:04 PM
All good, that was just back when scripting was actually fun.

I'll just delete it and replace the crafting subs with modern ones.
Title: Re: Mwinc. Enchanted Apple Crafter
Post by: Gaderian on December 21, 2020, 11:28:46 PM
You should keep the graphic if for no other reason than it gave me a good laugh.

Until I got an old copy version of Easyuo functional I couldn't figure out what was wrong. Getting it to fit in the new Easyuo menu rules was easy - just needed a bit of analysis. I tend to not reuse names in stuff I write now - just because Cheffe said so. The fact is, reusing names is only sometimes troublesome.

I learned 2 things from this:
1) Applying the delete before using a named widget would remove most of the functionality from this clever example - so that isn't a general solution
2) Reusing names can sneak by in some situations where the widget is not referenced again (because the menu engine gets confused about it)

If you want assistance to modernize the graphic, I would be willing to help revise it with the new usage.

I do not remember seeing anywhere else an example of cartooning in EUO - so leaving it around as an inspirational example is my second reason to keep it going.

Gaderian