Author Topic: Scroll Maker (piece of script)  (Read 4945 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
Scroll Maker (piece of script)
« on: April 02, 2011, 08:58:05 AM »
0
i cannot get this to run correctly.  I need some outside views on this.
Code: [Select]
;TEST VERSION
set %reagent1 JZF ; Ginseng
set %reagent2 MZF ; mandrake root
set %reagent3 WZF ; Nightshade
set %reagent4 RZF ; spiderssilk
set %reagent5 SZF ; Sulfurous Ash
set %reagent6 KZF ; Garlic
set %reagent7 JUF ; Blood Moss
set %reagent8 KUF ; blackpearl
set %scroll DPF
set %tinker GTL_KTL_JTL
set %ingots enk
;======================================================
; Setup
;======================================================
;======================================================
; SETUP CRAFTMENU (from Coragin)
;======================================================
;-----------------Craft Window-------------------------------
;set %contsize 530_507
set %pen PBG
set %cwinx 530
set %cwiny 507
set %cat1x 25
set %cat1y 90
set %cat2x 25
set %cat2y 110
set %cat3x 25
set %cat3y 130
set %cat4x 25
set %cat4y 150
set %cat5x 25
set %cat6y 170
set %cat7x 25
set %cat7y 190
set %cat8x 25
set %cat8y 210
set %cat9x 25
set %cat9y 230
set %cat10x 25
set %cat10y 250
;---------------Selection Pane----------------------------
set %selection1x 230
set %selection1y 70
set %selection2x 230
set %selection2y 90
set %selection3x 230
set %selection3y 110
set %selection4x 230
set %selection4y 130
set %selection5x 230
set %selection5y 150
set %selection6x 230
set %selection6y 170
set %selection7x 230
set %selection7y 190
set %selection8x 230
set %selection8y 210
set %selection9x 230
set %selection9y 230
set %selection10x 230
set %selection10y 250
set %nextclickx 420
set %nextclicky 270
;----------------Options Pane (lower right)------------------
set %repairx 280
set %repairy 350
set %markx 280
set %marky 370
set %enhancex 280
set %enhancey 390
set %alterx 280
set %altery 410
set %questx 280
set %questy 430
set %makelastx 280
set %makelasty 450
set %materialx 30
set %materialy 375
set %exitx 30
set %exity 450

mainloop:
gosub MageMenu
gosub start
gosub setup
gosub mainitem
goto mainloop

sub start
repeat
wait 1
until #menubutton = Start
menu hide
set #menubutton = N/A
return

sub setup
Display Choose your Box with Scrolls, Scribe Pen, Ingots, etc.
set #targcurs 1
while #targcurs = 1
      wait 1
set %box #ltargetID
set #lobjectid %box
event macro 17 0
wait 1s
menu get makepens
   if #menures = #true
      set %makepens #true
return

sub manacheck
set %manalock #maxmana * (90/100)
if #mana < 50
{
repeat
wait 1
until #mana > %manalock
}
return

sub craft
gosub resourcecheck %pen 1 3
gosub resourcecheck %scroll 5 100
finditem %penused C_ , #backpackid
if #findid != %penused
  gosub newpen
gosub manacheck
click %makelastx %makelasty
wait 20
return       

sub newpen
finditem %pen C_ , #backpackid
if #findkind >= 0
{
set #lobjectid #findid
set %penused #findid
event macro 17 0
}
else
{
gosub resourcecheck %pen 1 3
finditem %pen C_ , #backpackid
if #findkind >= 0
{
set #lobjectid #findid
set %penused #findid
event macro 17 0
}
}
return

sub craftsetup
gosub resourcecheck %pen 1 3
gosub resourcecheck %scroll 5 100
finditem %pen C_ , #backpackid
if #findkind >= 0
{
set #lobjectid #findid
set %penused #findid
event macro 17 0
}
if #contname = generic_gump
  {
wait 20
set #contposx 0
set #contposy 0
wait 10
click %catx %caty
wait 20
set #contposx 0
set #contposy 0
wait 10
if %clicknext = #true
{
click %nextx %nexty
wait 10
if %clicktwice = #true
  {
  click %nextx %nexty
  wait 10
  }
}
set %clicktwice = #false
set %clicknext = #false
click %selectionx %selectiony
wait 20
set #contposx 0
set #contposy 0
return


sub pausecheck
if #menubutton = Pause
{
repeat
wait 1
until #menubutton = Start
}
return

Sub resourcecheck
Finditem %1 C_ , #Backpackid ; Locates them in backpack
set %amount_Found 0
for #findindex 1 #findcnt
{
set %Amount_Found %Amount_Found + #findstack
}
if %Amount_Found > %2
  return
finditem %1 C_ , %box ; Locates them in secure
if #findcnt < 1
{
if %1 = %pen && %makepens = #true
gosub makepen
else display Out of Supplies
}
set %Amount_Drag %3 - %Amount_Found
Exevent drag #findid %Amount_Drag
wait 10
Exevent dropc #backpackid
wait 20
return

sub returnitems
Finditem %reagent1 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent2 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent3 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent4 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent5 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent6 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent7 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %reagent8 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
Finditem %1 C_ , #Backpackid ; Locates them in backpack
if #findstack >= 1
{
set %move #findstack
gosub drag
wait 20
}
return

sub drag
Exevent drag #findid %move
wait 10
Exevent dropc %box
wait 20
return

sub selectscroll ;Main Scroll Crafting Sub
; %1 = Checkbox
; %2 = Amount
; %3 = Selection X Axis
; %4 = Selection Y Axis
; %5 = Category X Axis
; %6 = Category Y Axis
; %7 - Click Next True/False
; %8 = Click Next Twice True/False
; %9 = Reagent 1
; %10 = Reagent 2
; %11 = Reagent 3
menu get %1
if #menures = #true
{

   gosub resourcecheck %9 3 50
   gosub resourcecheck %10 3 50
   gosub resourcecheck %11 3 50
   menu get %2
   set %times #menures
   set %done 1
   set %selectionx %3
   set %selectiony %4
   set %catx %5
   set %caty %6
   set %clicknext %7
   set %clicktwice %8
   gosub craftsetup
   wait 10
   for %done 0 %times
   {
   gosub resourcecheck %9 3 50
   gosub resourcecheck %10 3 50
   gosub resourcecheck %11 3 50
   gosub craft
   wait 10
   gosub pausecheck
   set %done %done + 1
   }
  return
 
  sub mainitem
gosub selectscroll Clumsy Clumsy1 %selection1x %selection1y %cat1x %cat1y #false #false %reagent7 %reagent3
  menu get Clumsy
  if #menures = #true
  {
   Menu Delete Clumsy
   menu Check Clumsy 12 60 17 17 #false
   gosub returnitems qxl
  }

gosub selectscroll Createfood Createfood1 %selection2x %selection2y %cat1x %cat1y #false #false %reagent1 %reagent2 %reagent6
menu get Createfood
  if #menures = #true
  {
   Menu Delete Createfood
   menu Check Createfood 168 60 17 17 #false
   gosub returnitems pxl
   }
Display Yesno You have completed all scrolls. Do you want to do again?
if #dispres = no
   {
   halt
   }
 else return
 
 sub MageMenu
menu Clear
menu Window Title EUOMenu1
menu Window Color BtnFace
menu Window Size 656 804
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 18
menu Font Style
menu Font Color WindowText
menu Font Transparent #false
menu Font Align Center
menu Text EUOLabel1 0 0 Snow's Scribe Scroll Maker
menu Font Size 8
menu Font Align Left
menu Text EUOLabel2 32 60 Clumsy
menu Text EUOLabel3 192 60 Create Food
menu Text EUOLabel4 344 60 Feeblemind
menu Text EUOLabel5 508 60 Heal
menu Text EUOLabel6 32 92 Magic Arrow
menu Text EUOLabel7 188 92 Night Sight
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel8 12 36 First Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel9 344 92 Reactive Armor
menu Text EUOLabel10 508 92 Weaken
menu Text EUOLabel11 32 152 Agility
menu Text EUOLabel12 192 152 Cunning
menu Text EUOLabel13 344 152 Cure
menu Text EUOLabel14 508 152 Harm
menu Text EUOLabel15 32 184 Magic Trap
menu Text EUOLabel16 188 184 Magic Untrap
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel17 12 128 Second Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel18 344 184 Protection
menu Text EUOLabel19 508 184 Strength
menu Text EUOLabel20 32 240 Bless
menu Text EUOLabel21 192 240 Fireball
menu Text EUOLabel22 344 240 Magic Lock
menu Text EUOLabel23 508 240 Poison
menu Text EUOLabel24 32 272 Telekinesis
menu Text EUOLabel25 188 272 Teleport
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel26 12 216 Third Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel27 344 272 Unlock
menu Text EUOLabel28 508 272 Wall of Stone
menu Text EUOLabel29 32 324 Arch Cure
menu Text EUOLabel30 192 324 Arch Protect
menu Text EUOLabel31 344 324 Curse
menu Text EUOLabel32 508 324 Fire Field
menu Text EUOLabel33 32 356 Greater Heal
menu Text EUOLabel34 188 356 Lightning
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel35 12 300 Fourth Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel36 344 356 Mana Drain
menu Text EUOLabel37 508 356 Recall
menu Text EUOLabel38 32 412 Blade Spirits
menu Text EUOLabel39 192 412 Dispel Fields
menu Text EUOLabel40 344 412 Incogneto
menu Text EUOLabel41 508 412 Magic Reflect
menu Text EUOLabel42 32 444 Mind Blast
menu Text EUOLabel43 188 444 Paralyze
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel44 12 388 Fifth Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel45 344 444 Poison Field
menu Text EUOLabel46 508 444 Summ. Creature
menu Text EUOLabel47 32 500 Dispel
menu Text EUOLabel48 192 500 Energy Bolt
menu Text EUOLabel49 344 500 Explosion
menu Text EUOLabel50 508 500 Invisibility
menu Text EUOLabel51 32 532 Mark
menu Text EUOLabel52 188 532 Mass Curse
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel53 12 476 Sixth Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel54 344 532 Paralyze Field
menu Text EUOLabel55 508 532 Reveal
menu Text EUOLabel56 32 592 Chain Lightning
menu Text EUOLabel57 192 592 Energy Field
menu Text EUOLabel58 344 592 Flamestrike
menu Text EUOLabel59 508 592 Gate Travel
menu Text EUOLabel60 32 624 Mana Vamp
menu Text EUOLabel61 188 624 Mass Dispel
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel62 12 564 Seventh Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel63 344 624 Meteor Swarm
menu Text EUOLabel64 508 624 Polymorph
menu Text EUOLabel65 32 680 Earthquake
menu Text EUOLabel66 192 680 Energy Vortex
menu Text EUOLabel67 344 680 Resurrection
menu Text EUOLabel69 512 684 Air Elemental
menu Text EUOLabel70 32 712 Summon Demon
menu Text EUOLabel71 188 712 Earth Elemental
menu Font Size 12
menu Font Color Blue
menu Text EUOLabel72 12 656 Eighth Circle Spells
menu Font Size 8
menu Font Color WindowText
menu Text EUOLabel74 344 712 Fire Elemental
menu Text EUOLabel75 512 716 Water Elemental
menu Check Clumsy 12 60 17 17 #false EUOCheckBox1
menu Check Createfood 168 60 17 17 #false EUOCheckBox1
menu Check Feeblemind 324 60 17 17 #false EUOCheckBox1
menu Check Heal 488 60 17 17 #false EUOCheckBox1
menu Check Magicarrow 12 92 17 17 #false EUOCheckBox1
menu Check Nightsight 168 92 17 17 #false EUOCheckBox1
menu Check Reactivearmor 324 92 17 17 #false EUOCheckBox1
menu Check Weaken 488 92 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Clumsy1 596 56 41 0
menu Edit Createfood1 272 56 41 0
menu Edit Feeblemind1 424 56 41 0
menu Edit Heal1 112 56 41 0
menu Edit Magicarrow1 112 88 41 0
menu Edit Nightsight1 272 88 41 0
menu Edit Reactivearmor1 424 88 41 0
menu Edit Weaken1 596 88 41 0
menu Font BGColor BtnFace
menu Check Agility 12 152 17 17 #false EUOCheckBox1
menu Check Cunning 168 152 17 17 #false EUOCheckBox1
menu Check Cure 324 152 17 17 #false EUOCheckBox1
menu Check Harm 488 152 17 17 #false EUOCheckBox1
menu Check Magictrap 12 184 17 17 #false EUOCheckBox1
menu Check Magicuntrap 168 184 17 17 #false EUOCheckBox1
menu Check Protection 324 184 17 17 #false EUOCheckBox1
menu Check Strength 488 184 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Agility1 596 148 41 0
menu Edit Cunning1 272 148 41 0
menu Edit Cure1 424 148 41 0
menu Edit Harm1 112 148 41 0
menu Edit Magictrap1 112 180 41 0
menu Edit Magicuntrap1 272 180 41 0
menu Edit Protection1 424 180 41 0
menu Edit Strength1 596 180 41 0
menu Font BGColor BtnFace
menu Check Bless 12 240 17 17 #false EUOCheckBox1
menu Check Fireball 168 240 17 17 #false EUOCheckBox1
menu Check Magiclock 324 240 17 17 #false EUOCheckBox1
menu Check Poison 488 240 17 17 #false EUOCheckBox1
menu Check Telekinesis 12 272 17 17 #false EUOCheckBox1
menu Check Teleport 168 272 17 17 #false EUOCheckBox1
menu Check Unlock 324 272 17 17 #false EUOCheckBox1
menu Check Wallofstone 488 272 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Bless1 596 236 41 0
menu Edit Fireball1 272 236 41 0
menu Edit Magiclock1 424 236 41 0
menu Edit Poison1 112 236 41 0
menu Edit Telekinesis1 112 268 41 0
menu Edit Teleport1 272 268 41 0
menu Edit Unlock1 424 268 41 0
menu Edit Wallofstone1 596 268 41 0
menu Font BGColor BtnFace
menu Check Archcure 12 324 17 17 #false EUOCheckBox1
menu Check Archprotection 168 324 17 17 #false EUOCheckBox1
menu Check Curse 324 324 17 17 #false EUOCheckBox1
menu Check FireField 488 324 17 17 #false EUOCheckBox1
menu Check Greaterheal 12 356 17 17 #false EUOCheckBox1
menu Check Lightning 168 356 17 17 #false EUOCheckBox1
menu Check Manadrain 324 356 17 17 #false EUOCheckBox1
menu Check Recall 488 356 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Archcure1 596 320 41 0
menu Edit Archprotection1 272 320 41 0
menu Edit Curse1 424 320 41 0
menu Edit Firefield1 112 320 41 0
menu Edit Greaterheal1 112 352 41 0
menu Edit Lightning1 272 352 41 0
menu Edit Manadrain1 424 352 41 0
menu Edit Recall1 596 352 41 0
menu Font BGColor BtnFace
menu Check Bladespirits 12 412 17 17 #false EUOCheckBox1
menu Check Dispelfields 168 412 17 17 #false EUOCheckBox1
menu Check Incogneto 324 412 17 17 #false EUOCheckBox1
menu Check Magicreflect 488 412 17 17 #false EUOCheckBox1
menu Check Mindblast 12 444 17 17 #false EUOCheckBox1
menu Check Paralyze 168 444 17 17 #false EUOCheckBox1
menu Check Poisonfield 324 444 17 17 #false EUOCheckBox1
menu Check Summoncreature 488 444 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Bladespirits1 596 408 41 0
menu Edit Dispelfields1 272 408 41 0
menu Edit Incogneto1 424 408 41 0
menu Edit Magicreflect1 112 408 41 0
menu Edit Mindblast1 112 440 41 0
menu Edit Paralyze1 272 440 41 0
menu Edit Poisonfield1 424 440 41 0
menu Edit Summoncreature1 596 440 41 0
menu Font BGColor BtnFace
menu Check Dispel 12 500 17 17 #false EUOCheckBox1
menu Check Energybolt 168 500 17 17 #false EUOCheckBox1
menu Check Explosion 324 500 17 17 #false EUOCheckBox1
menu Check Invisibility 488 500 17 17 #false EUOCheckBox1
menu Check Mark 12 532 17 17 #false EUOCheckBox1
menu Check Masscurse 168 532 17 17 #false EUOCheckBox1
menu Check Paralyzefield 324 532 17 17 #false EUOCheckBox1
menu Check Reveal 488 532 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Dispel1 596 496 41 0
menu Edit Energybolt1 272 496 41 0
menu Edit Explosion1 424 496 41 0
menu Edit Invisibility1 112 496 41 0
menu Edit Mark1 112 528 41 0
menu Edit Masscurse1 272 528 41 0
menu Edit Paralyzefield1 424 528 41 0
menu Edit Reveal1 596 528 41 0
menu Font BGColor BtnFace
menu Check Chainlightning 12 592 17 17 #false EUOCheckBox1
menu Check Energyfield 168 592 17 17 #false EUOCheckBox1
menu Check Flamestrike 324 592 17 17 #false EUOCheckBox1
menu Check Gatetravel 488 592 17 17 #false EUOCheckBox1
menu Check Manavamp 12 624 17 17 #false EUOCheckBox1
menu Check Massdispel 168 624 17 17 #false EUOCheckBox1
menu Check Meteorswarm 324 624 17 17 #false EUOCheckBox1
menu Check Polymorph 488 624 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Chainlightening1 596 588 41 0
menu Edit Energyfield1 272 588 41 0
menu Edit Flamestrike1 424 588 41 0
menu Edit Gatetravel1 112 588 41 0
menu Edit Manavamp1 112 620 41 0
menu Edit Massdispel1 272 620 41 0
menu Edit Meteorswarm1 424 620 41 0
menu Edit Polymorph1 596 620 41 0
menu Font BGColor BtnFace
menu Check Earthquake 12 680 17 17 #false EUOCheckBox1
menu Check Energyvortex 168 680 17 17 #false EUOCheckBox1
menu Check Resurrection 324 680 17 17 #false EUOCheckBox1
menu Check Airelemental 488 680 17 17 #false EUOCheckBox1
menu Check Summondemon 12 712 17 17 #false EUOCheckBox1
menu Check Earthelemental 168 712 17 17 #false EUOCheckBox1
menu Check Fireelemental 324 712 17 17 #false EUOCheckBox1
menu Check Waterelemental 488 712 17 17 #false EUOCheckBox1
menu Font BGColor Window
menu Edit Earthquake1 596 676 41 0
menu Edit Energyvortex1 272 676 41 0
menu Edit Resurrection1 424 676 41 0
menu Edit Airelemental1 112 676 41 0
menu Edit Summondemon1 112 708 41 0
menu Edit Earthelemental1 272 708 41 0
menu Edit Fireelemental1 424 708 41 0
menu Edit Waterelemental1 596 708 41 0
menu Font BGColor BtnFace
menu Button Mysticism 28 752 105 41 Mysticism
menu Button Necromancy 140 752 105 41 Necromancy
menu Button Start 356 752 105 41 Start
menu Button Pause 468 752 105 41 Pause
menu Show 421 270
return
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #1 on: April 02, 2011, 09:42:02 AM »
0
this is probably an older script that hasn't been updated to the new window changes you might want to look at that first.

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: Scroll Maker (piece of script)
« Reply #2 on: April 02, 2011, 11:32:32 AM »
0
there have been window changes in the non lua version?
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #3 on: April 02, 2011, 05:41:48 PM »
0
Kham means to UO's gump system itself.  There have been changes to it.

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: Scroll Maker (piece of script)
« Reply #4 on: April 02, 2011, 08:48:34 PM »
0
Yeah, this was an update after they added all the new stuff to the craft menus.  This is not an old script. I started writing it prior to me leaving UO about 5 months ago.
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #5 on: April 03, 2011, 01:19:42 AM »
0
hehe.. I found your problem... :)

sub selectscroll ;Main Scroll Crafting Sub
; %1 = Checkbox
; %2 = Amount
; %3 = Selection X Axis
; %4 = Selection Y Axis
; %5 = Category X Axis
; %6 = Category Y Axis
; %7 - Click Next True/False
; %8 = Click Next Twice True/False
; %9 = Reagent 1
; %10 = Reagent 2
; %11 = Reagent 3
menu get %1
if #menures = #true
{
   
gosub resourcecheck %9 3 50
   gosub resourcecheck %10 3 50
   gosub resourcecheck %11 3 50

those GoSubs right there are over writing your first set of Parameters %0 - %11
you should set your hard parameters before performing another gosub that changes soft parameters.

Code: [Select]
sub selectscroll ;Main Scroll Crafting Sub
; %1 = Checkbox
; %2 = Amount
; %3 = Selection X Axis
; %4 = Selection Y Axis
; %5 = Category X Axis
; %6 = Category Y Axis
; %7 - Click Next True/False
; %8 = Click Next Twice True/False
; %9 = Reagent 1
; %10 = Reagent 2
; %11 = Reagent 3
menu get %1
if #menures = #true
{
   menu get %2
   set %times #menures
   set %done 1
   set %selectionx %3
   set %selectiony %4
   set %catx %5
   set %caty %6
   set %clicknext %7
   set %clicktwice %8
   gosub resourcecheck %9 3 50
   gosub resourcecheck %10 3 50
   gosub resourcecheck %11 3 50
   gosub craftsetup
   wait 10
   for %done 0 %times
   {
   gosub resourcecheck %9 3 50
   gosub resourcecheck %10 3 50
   gosub resourcecheck %11 3 50
   gosub craft
   wait 10
   gosub pausecheck
   set %done %done + 1
   }
  return

this should work, you will have to add a wait here or there, I sugguest using gump wait subs, and also use an offset click sub so you don't move the gump around 500 times.
« Last Edit: April 03, 2011, 01:26:58 AM by Khameleon »

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: Scroll Maker (piece of script)
« Reply #6 on: April 04, 2011, 06:20:19 AM »
0
I second Khameleon,  If you have gosubs inside a sub you should store the original passed params so they dont get curropted.. Ive made that same booboo more than once myself.

I do something like

Code: [Select]
sub selectscroll ;Main Scroll Crafting Sub
 %SS1 %1 ;= Checkbox
 %SS2 %2 ;= Amount
 %SS3 %3 ; Selection X Axis
 %SS4 %4 ; Selecti
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 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #7 on: April 04, 2011, 09:20:56 AM »
0
Exactly what we were just talking about in another thread. IMO, unless you are confidently using Namespaces in your sub/s, you should almost NEVER use the generic vars except maybe %0. Again just my opinion, and many great coders probably do otherwise (although they also probably effectively use Namespces too), but it's simply a good practice to assign them to other variables and use those.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #8 on: April 04, 2011, 02:39:08 PM »
0
Exactly what we were just talking about in another thread.
Exactly I tried to help that cause I couldn't figure out how to explain it to him.. this one was basically the same problem but easier to explain.

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: Scroll Maker (piece of script)
« Reply #9 on: April 05, 2011, 03:07:48 PM »
0
so what everyone is saying..  set variables out of the %9 because since i am initializing a gosub before i go anywhere i am erasing my %1 etc because of the return from the other sub....  say set %rcheck1 %9   set %rcheck2 %10   and then use  gosub resourcecheck %rcheck1 3 50 ??  

EDIT:
Am i messing things up not using %0?  Is there a %0?
« Last Edit: April 05, 2011, 03:12:09 PM by Tidus »
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Scroll Maker (piece of script)
« Reply #10 on: April 05, 2011, 03:18:30 PM »
0
%0 represents the number of arguments you are passing to the sub:

Code: [Select]
gosub sub value1 value2 value3

sub
   set %subval1 %1
   set %subval2 %2
   set %subval3 %3
return

In this example I am calling a sub and passing three values. In the sub I immediately create 3 variables to accomodate the three values so I don't use %1, etc. In this sub the value of %0 is 3 because that's how many values I passed the sub.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

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: Scroll Maker (piece of script)
« Reply #11 on: April 05, 2011, 05:03:23 PM »
0
Okay..  i am frustrated.. almost got it going but i am lost in my code...  Clumsy is the only one that works with the new craft system i am trying impliment. everything after clumsy is my old code.  Look it over and shoot me in the head.

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Snow's Scribe Scroll Maker 1.5.txt
For those who have fought for it, freedom has a taste the protected will never know ~ Anonymous, Vietnam, 1968

Tags: