Total players online: 1



Take the Tour | Site Map

It is currently Thu Dec 14, 2017 8:20 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Menu Button
PostPosted: Fri May 12, 2017 3:04 am 
Offline
Script Kiddie
Script Kiddie

Joined: 08/11/2010 15:34
Posts: 4








Hello, I am once again playing UO and have decided to try to learn to write easy uo scripts. I am working on a basic one for the gauntlet that keeps a count of kills per room. I cant seem to get the counter to work when i push the menu button. i will be reading for more information while this is posted to try and figure it out on my own but a nudge in the right direction would be helpful. thanks!

here is what i have so far:
Code:
  1. ;==========================
  2. ; script Name:      EV EXTREME Gauntlet Tracker
  3. ; Author:           EV
  4. ; purpose:          Track Doom Stats
  5. ;special thanks to Chaos for helping
  6. ;================================================
  7. ;;Set Variables
  8. set %a 0
  9. set %b 0
  10. set %c 0
  11. set %d 0
  12. set %e 0
  13. set %f 0
  14. set %g 0
  15. gosub mainmenu
  16. ;================================================
  17. ;Menu
  18. ;================================================
  19. sub mainmenu
  20.   menu Window Title Pug Doom Tracker
  21.   menu Window Size 350 350
  22.   menu Font Name MS Sans Serif
  23.   menu button Room1 15 25 200 50 Dark Knight Creeper
  24.   menu button Room2 15 75 200 50 Flesh Renderer
  25.   menu button Room3 15 125 200 50 Impaler
  26.   menu button Room4 15 175 200 50 Shadow Knight
  27.   menu button Room5 15 225 200 50 Abyssal Horror
  28.   menu button Room6 15 275 200 50 Dark Father
  29.   menu button Sub1 220 30 25 25 Sub
  30.   menu button Sub2 220 80 25 25 Sub
  31.   menu button Sub3 220 130 25 25 Sub
  32.   menu button Sub4 220 180 25 25 Sub
  33.   menu button Sub5 220 230 25 25 Sub
  34.   menu button Sub6 220 280 25 25 Sub
  35.   menu Text EUOLabel3 260 8 Kills:
  36.   menu text Kill1 260 40 0
  37.   menu text Kill2 260 90 0
  38.   menu Text Kill3 260 140 0
  39.   menu Text Kill4 260 190 0
  40.   menu Text Kill5 260 240 0
  41.   menu Text Kill6 260 290 0
  42.   menu text EUOLabel4 320 8 Comp:
  43.   menu text Comp1 320 40 0
  44. ;==================================================================================
  45. ;MainLoop
  46. ;===================================================================================
  47. mainloop:
  48. gosub checkmenu
  49. goto mainloop
  50. ;===================================================================================
  51. ;End MainLoop
  52.  ;====================================================================================
  53. ;Subs
  54. ;===================================================================================
  55.  sub checkmenu
  56.  if #menubutton = room1
  57.  {
  58.     set %a %a + 1
  59.     gosub updatemenu
  60.     set #menubutton N/A
  61.  }
  62.  if #menubutton = sub1
  63.   {
  64.     set %a %a - 1
  65.     gosub updatemenu
  66.     set #menubutton N/A
  67.  }
  68.  if #menubutton = room2
  69.  {
  70.     set %b %b + 1
  71.     gosub updatemenu
  72.     set #menubutton N/A
  73.  }
  74.   if #menubutton = sub2
  75.   {
  76.     set %b %b - 1
  77.     gosub updatemenu
  78.     set #menubutton N/A
  79.  }
  80.  if #menubutton = room3
  81.  {
  82.     set %c %c + 1
  83.     gosub updatemenu
  84.     set #menubutton N/A
  85.  }
  86.   if #menubutton = sub3
  87.   {
  88.     set %c %c - 1
  89.     gosub updatemenu
  90.     set #menubutton N/A
  91.  }
  92.  if #menubutton = room4
  93.  {
  94.     set %d %d + 1
  95.     gosub updatemenu
  96.     set #menubutton N/A
  97.  }
  98.   if #menubutton = sub4
  99.   {
  100.     set %d %d - 1
  101.     gosub updatemenu
  102.     set #menubutton N/A
  103.  }
  104.  if #menubutton = room5
  105.  {
  106.     set %e %e + 1
  107.     gosub updatemenu
  108.     set #menubutton N/A
  109.  }
  110.   if #menubutton = sub5
  111.   {
  112.     set %e %e - 1
  113.     gosub updatemenu
  114.     set #menubutton N/A
  115.  }
  116.  if #menubutton = room6
  117.  {
  118.     set %f %f + 1
  119.     gosub updatemenu
  120.     set #menubutton N/A
  121.  }
  122.   if #menubutton = sub6
  123.   {
  124.     set %f %f - 1
  125.     gosub updatemenu
  126.     set #menubutton N/A
  127.  }
  128. ;===================================================================================
  129. ;UpdateMenuSub
  130. ;===================================================================================
  131. sub updatemenu
  132. menu set kill1 %a
  133. menu set Kill2 %b
  134. menu set Kill3 %c
  135. menu set Kill4 %d
  136. menu set Kill5 %e
  137. menu set Kill6 %f
  138. menu set comp1 %g
  139.  

i will have to see if i can get total kills now and perhaps which bosses dropped arties and maybe an arty counter.


Top
  Profile 
 Post subject: Re: Menu Button
PostPosted: Sat May 13, 2017 3:02 pm 
Offline
Novice Scripter
Novice Scripter

Joined: 02/04/2017 02:31
Posts: 36
Location: Turkiye
Edited, made some changes for you.

Code:
  1.  
  2. ;==========================
  3. ; script Name:      EV EXTREME Gauntlet Tracker
  4. ; Author:           EV
  5. ; purpose:          Track Doom Stats
  6. ;special thanks to Chaos for helping
  7. ;================================================
  8. ;;Set Variables
  9. set %a 0
  10. set %b 0
  11. set %c 0
  12. set %d 0
  13. set %e 0
  14. set %f 0
  15. set %g 0
  16. gosub mainmenu
  17. ;================================================
  18. ;Menu
  19. ;================================================
  20. sub mainmenu
  21.   menu Window Title Pug Doom Tracker
  22.   menu Window Size 350 350
  23.   menu Font Name MS Sans Serif
  24.   menu button Room1 15 25 200 50 Dark Knight Creeper
  25.   menu button Room2 15 75 200 50 Flesh Renderer
  26.   menu button Room3 15 125 200 50 Impaler
  27.   menu button Room4 15 175 200 50 Shadow Knight
  28.   menu button Room5 15 225 200 50 Abyssal Horror
  29.   menu button Room6 15 275 200 50 Dark Father
  30.   menu button Sub1 220 30 25 25 Sub
  31.   menu button Sub2 220 80 25 25 Sub
  32.   menu button Sub3 220 130 25 25 Sub
  33.   menu button Sub4 220 180 25 25 Sub
  34.   menu button Sub5 220 230 25 25 Sub
  35.   menu button Sub6 220 280 25 25 Sub
  36.   menu Text EUOLabel3 260 8 Kills:
  37.   menu text Kill1 260 40 0
  38.   menu text Kill2 260 90 0
  39.   menu Text Kill3 260 140 0
  40.   menu Text Kill4 260 190 0
  41.   menu Text Kill5 260 240 0
  42.   menu Text Kill6 260 290 0
  43.   menu text EUOLabel4 320 8 Comp:
  44.   menu text Comp1 320 40 0
  45. ;==================================================================================
  46. ;MainLoop
  47. ;===================================================================================
  48. mainloop:
  49. goto mainloop
  50. ;===================================================================================
  51. ;End MainLoop
  52.  ;====================================================================================
  53. ;Subs
  54. ;===================================================================================
  55. sub room1
  56.     set %a %a + 1
  57.     gosub updatemenu
  58. sub sub1
  59.     set %a %a - 1
  60.     gosub updatemenu
  61. sub room2
  62.     set %b %b + 1
  63.     gosub updatemenu
  64. sub sub2
  65.     set %b %b - 1
  66.     gosub updatemenu
  67. sub room3
  68.     set %c %c + 1
  69.     gosub updatemenu
  70. sub sub3
  71.     set %c %c - 1
  72.     gosub updatemenu
  73. sub room4
  74.     set %d %d + 1
  75.     gosub updatemenu
  76. sub sub4
  77.     set %d %d - 1
  78.     gosub updatemenu
  79. sub room5
  80.     set %e %e + 1
  81.     gosub updatemenu
  82. sub sub5
  83.     set %e %e - 1
  84.     gosub updatemenu
  85. sub room6
  86.     set %f %f + 1
  87.     gosub updatemenu
  88. sub sub6
  89.     set %f %f - 1
  90.     gosub updatemenu
  91. ;===================================================================================
  92. ;UpdateMenuSub
  93. ;===================================================================================
  94. sub updatemenu
  95. menu set kill1 %a
  96. menu set Kill2 %b
  97. menu set Kill3 %c
  98. menu set Kill4 %d
  99. menu set Kill5 %e
  100. menu set Kill6 %f
  101. menu set comp1 %g
  102. sub closed
  103.     halt
  104.  


Anyway, what is comp1 %g for ?

_________________
There is no code that does not work. There is code that does not work as expected...


Top
  ProfileShow poster's scripts in the public script library 
 Post subject: Re: Menu Button
PostPosted: Mon May 15, 2017 8:07 am 
Offline
Script Kiddie
Script Kiddie

Joined: 08/11/2010 15:34
Posts: 4
The Comp%1 is for a completed rounds calculation. i just havent got around to finishing it yet. i wanted it to take the totals from the boss kills and count 1 per every 6 total kills per room. that sounds confusing. i mean every time that ALL the kill counts make a complete 1 or 2 or 3 than it will count as a completed round. im also going to see if i can make a total time spent in doom with a stop/start/reset button as well as which bosses dropped which arties. if you have any suggestions please hit me up and ill see if i can get it in there. im still learning so it takes a while for me to figure these out. thanks!


Top
  Profile 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Bing [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Hosted by CalWeb Internet Services, Inc.