Author Topic: Sorting Scrolls  (Read 267 times)

0 Members and 1 Guest are viewing this topic.

Offline JFSFTopic starter

  • Jr. Member
  • **
  • Posts: 63
  • Activity:
    0.4%
  • Reputation Power: 1
  • JFSF has no influence.
  • Gender: Male
  • Respect: +8
  • Referrals: 0
    • View Profile
Sorting Scrolls
« on: December 29, 2019, 06:35:18 AM »
0
Hello Guys, Ive been working on a scroll sorting tool. As of now Im having a problem of it not recognizing that I have scrolls inside of my bag. Would anyone be willing to run this and see what happens for them? I have a pile of scrolls in my backpack and then it will sort maybe half of them and then halt like its finished and don't see any more scrolls inside my backpack. Im not seeing any reason why its not picking up the scrolls I have inside of my backpack. Don't forget to add in the Book Id of the scroll book your wanting to sort into. This will sort by skill type, Ie, Misc, Combat, Magic, Trade Skills, Thievery, Wilderness, and Bard. Thanks

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Scroll Sorter V1.4.txt

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12979
  • Activity:
    3.6%
  • Reputation Power: 151
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1333
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: Sorting Scrolls
« Reply #1 on: December 29, 2019, 10:39:56 AM »
0
There's a bracket imbalance that might mess things up. I used ScriptUO to find that.  Dunno if it will work now, but give this a whirl:

Code: easyuo
  1. ; miscellaneous group arms lore / begging / camping / cartography / forensics / item identification / taste identification
  2. ; combat anatomy / archery / fencing / focus / healing / mace fighting / parrying / swordsmanship / tactics / throwing / wrestling
  3. ; trade skills alchemy / blacksmithing / fletching / carpentry / cooking / inscription / lumberjacking / mining / tailoring / tinkering
  4. ; magic bushido / chivalry  / eval intelligence / imbuing / magery / meditation / mysticism / necromancy / ninjitsu / resisting spells / spellweaving / spirit speak
  5. ; wilderness animal lore / animal taming / fishing / herding / tracking / veterinary
  6. ; thievery detecting hidden / hiding / lock picking / poisoning / remove trap / snooping / stealing / stealth
  7. ; bard discordance / musicianship / peacemaking / provocation
  8.  
  9. ; so example set %transmisscelanous ( add the id of the book here )
  10.  
  11. set %transmiscellaneous
  12. set %transcombat
  13. set %transtradeskills
  14. set %transmagic
  15. set %transwilderness
  16. set %transthievery
  17. set %transbard
  18.  
  19. set %psmiscellaneous ORIQWUD
  20. set %pscombat ORIQWUD
  21. set %pstradeskills ORIQWUD
  22. set %psmagic ORIQWUD
  23. set %pswilderness ORIQWUD
  24. set %psthievery ORIQWUD
  25. set %psbard ORIQWUD
  26.  
  27. set %alacmiscellaneous
  28. set %alaccombat
  29. set %alactradeskills
  30. set %alacmagic
  31. set %alacwilderness
  32. set %alacthievery
  33. set %alacbard
  34.  
  35. ignoreitem reset
  36.  
  37. gosub sortscrolls
  38. display ok all done, halting!
  39. halt
  40. ;------------------------------------
  41. sub sortscrolls
  42. pinksloop:
  43.   finditem TVH C_
  44.   IF #FINDKIND <> -1
  45.   {
  46.     event property #findid
  47.     if transcendence in #property
  48.     {
  49.       if arms , #spc , lore in #property || begging in #property || camping in #property || cartography in #property || forensics in #property || item , #spc , identification in #property || taste , #spc , identification in #property
  50.       {
  51.         exevent drag #findid #findstack
  52.         exevent dropc %transmiscellaneous
  53.         wait 20
  54.         ignoreitem #findid
  55.         goto pinksloop
  56.       }
  57.       if anatomy in #property || archery in #property || fencing in #property || focus in #property || healing in #property || mace , #spc , fighting in #property || parrying in #property || swordsmanship in #property || tactics in #property || throwing in #property || wrestling in #property
  58.       {
  59.         exevent drag #findid #findstack
  60.         exevent dropc %transcombat
  61.         wait 20
  62.         ignoreitem #findid
  63.         goto pinksloop
  64.       }
  65.       if alchemy in #property || blacksmithing in #property || fletching in #property || carpentry in #property || cooking in #property || inscription in #property || lumberjacking in #property || mining in #property || tailoring in #property || tinkering in #property
  66.       {
  67.         exevent drag #findid #findstack
  68.         exevent dropc %transtradeskills
  69.         wait 20
  70.         ignoreitem #findid
  71.         goto pinksloop
  72.       }
  73.       if bushido in #property || chivalry in #property || eval , #spc , intelligence in #property || imbuing in #property || magery in #property || meditation in #property || mysticism in #property || necromancy in #property || ninjitsu in #property || resisting , #spc , spells in #property || spellweaving in #property || spirit , #spc , speak in #property
  74.       {
  75.         exevent drag #findid #findstack
  76.         exevent dropc %transmagic
  77.         wait 20
  78.         ignoreitem #findid
  79.         goto pinksloop
  80.       }
  81.       if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property
  82.       {
  83.         exevent drag #findid #findstack
  84.         exevent dropc %transwilderness
  85.         wait 20
  86.         ignoreitem #findid
  87.         goto pinksloop
  88.       }
  89.       if detecting , #spc , hidden in #property || hiding in #property || lock , #spc , picking in #property || poisoning in #property || remove , #spc , trap in #property || snooping in #property || Stealing in #property || Stealth in #property
  90.       {
  91.         exevent drag #findid #findstack
  92.         exevent dropc %transthievery
  93.         wait 20
  94.         ignoreitem #findid
  95.         goto pinksloop
  96.       }
  97.       if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property
  98.       {
  99.         exevent drag #findid #findstack
  100.         exevent dropc %transbard
  101.         wait 20
  102.         ignoreitem #findid
  103.         goto pinksloop
  104.       }
  105.     }
  106.     if exalted in #property || mythical in #property || legendary in #property
  107.     {
  108.       if arms , #spc , lore in #property || begging in #property || camping in #property || cartography in #property || forensics in #property || item , #spc , identification in #property || taste , #spc , identifcation in #property
  109.       {
  110.         exevent drag #findid #findstack
  111.         exevent dropc %psmiscellaneous
  112.         wait 20
  113.         ignoreitem #findid
  114.         goto pinksloop
  115.       }
  116.       if anatomy in #property || archery in #property || fencing in #property || focus in #property || healing in #property || mace , #spc , fighting in #property || parrying in #property || swordsmanship in #property || tactics in #property || throwing in #property || wrestling in #property
  117.       {
  118.         exevent drag #findid #findstack
  119.         exevent dropc %pscombat
  120.         wait 20
  121.         ignoreitem #findid
  122.         goto pinksloop
  123.       }
  124.       if alchemy in #property || blacksmithing in #property || fletching in #property || carpentry in #property || cooking in #property || inscription in #property || lumberjacking in #property || mining in #property || tailoring in #property || tinkering in #property
  125.       {
  126.         exevent drag #findid #findstack
  127.         exevent dropc %pstradeskills
  128.         wait 20
  129.         ignoreitem #findid
  130.         goto pinksloop
  131.       }
  132.       if bushido in #property || chivalry in #property || eval , #spc , intelligence in #property || imbuing in #property || magery in #property || meditation in #property || mysticism in #property || necromancy in #property || ninjitsu in #property || resisting , #spc , spells in #property || spellweaving in #property || spirit , #spc , speak in #property
  133.       {
  134.         exevent drag #findid #findstack
  135.         exevent dropc %psmagic
  136.         wait 20
  137.         ignoreitem #findid
  138.         goto pinksloop
  139.       }
  140.       if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property
  141.       {
  142.         exevent drag #findid #findstack
  143.         exevent dropc %pswilderness
  144.         wait 20
  145.         ignoreitem #findid
  146.         goto pinksloop
  147.       }
  148.       if detecting , #spc , hidden in #property || hiding in #property || lock , #spc , picking in #property || poisoning in #property || remove , #spc , trap in #property || snooping in #property || Stealing in #property || Stealth in #property
  149.       {
  150.         exevent drag #findid #findstack
  151.         exevent dropc %psthievery
  152.         wait 20
  153.         ignoreitem #findid
  154.         goto pinksloop
  155.       }
  156.       if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property
  157.       {
  158.         exevent drag #findid #findstack
  159.         exevent dropc %psbard
  160.         wait 20
  161.         ignoreitem #findid
  162.         goto pinksloop
  163.       }
  164.     }
  165.    
  166.     if alacrity in #property
  167.     {
  168.       if arms , #spc , lore in #property || begging in #property || camping in #property || cartography in #property || forensics in #property || item , #spc , identification in #property || taste , #spc , identification in #property
  169.       {
  170.         exevent drag #findid #findstack
  171.         exevent dropc %alacmiscellaneous
  172.         wait 20
  173.         ignoreitem #findid
  174.         goto pinksloop
  175.       }
  176.       if anatomy in #property || archery in #property || fencing in #property || focus in #property || healing in #property || mace , #spc , fighting in #property || parrying in #property || swordsmanship in #property || tactics in #property || throwing in #property || wrestling in #property
  177.       {
  178.         exevent drag #findid #findstack
  179.         exevent dropc %alaccombat
  180.         wait 20
  181.         ignoreitem #findid
  182.         goto pinksloop
  183.       }
  184.       if alchemy in #property || blacksmithing in #property || fletching in #property || carpentry in #property || cooking in #property || inscription in #property || lumberjacking in #property || mining in #property || tailoring in #property || tinkering in #property
  185.       {
  186.         exevent drag #findid #findstack
  187.         exevent dropc %alactradeskills
  188.         wait 20
  189.         ignoreitem #findid
  190.         goto pinksloop
  191.       }
  192.       if bushido in #property || chivalry in #property || eval , #spc , intelligence in #property || imbuing in #property || magery in #property || meditation in #property || mysticism in #property || necromancy in #property || ninjitsu in #property || resisting , #spc , spells in #property || spellweaving in #property || spirit , #spc , speak in #property
  193.       {
  194.         exevent drag #findid #findstack
  195.         exevent dropc %alacmagic
  196.         wait 20
  197.         ignoreitem #findid
  198.         goto pinksloop
  199.       }
  200.       if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property
  201.       {
  202.         exevent drag #findid #findstack
  203.         exevent dropc %alacwilderness
  204.         wait 20
  205.         ignoreitem #findid
  206.         goto pinksloop
  207.       }
  208.       if detecting , #spc , hidden in #property || hiding in #property || lock , #spc , picking in #property || poisoning in #property || remove , #spc , trap in #property || snooping in #property || Stealing in #property || Stealth in #property
  209.       {
  210.         exevent drag #findid #findstack
  211.         exevent dropc %alacthievery
  212.         wait 20
  213.         ignoreitem #findid
  214.         goto pinksloop
  215.       }
  216.       if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property
  217.       {
  218.         exevent drag #findid #findstack
  219.         exevent dropc %alacbard
  220.         wait 20
  221.         ignoreitem #findid
  222.         goto pinksloop
  223.       }
  224.     }
  225.   }
  226. return
  227.  
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline JFSFTopic starter

  • Jr. Member
  • **
  • Posts: 63
  • Activity:
    0.4%
  • Reputation Power: 1
  • JFSF has no influence.
  • Gender: Male
  • Respect: +8
  • Referrals: 0
    • View Profile
Re: Sorting Scrolls
« Reply #2 on: December 29, 2019, 11:26:19 AM »
0
Could you explain that a little TM or how you used Easyuo to find it? Looking to learn as well not just ask for a fix, although I do appreciate it

Offline Gaderian

  • Jr. Member
  • **
  • Posts: 56
  • Activity:
    2.4%
  • Reputation Power: 4
  • Gaderian has no influence.
  • Respect: +11
  • Referrals: 0
    • View Profile
Re: Sorting Scrolls
« Reply #3 on: December 29, 2019, 11:29:16 AM »
0
It is a feature of the Scriptuo tool not the Easyuo IDE.

Gaderian

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 12979
  • Activity:
    3.6%
  • Reputation Power: 151
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1333
  • Referrals: 32
    • View Profile
    • ScriptUO
Re: Sorting Scrolls
« Reply #4 on: December 29, 2019, 10:07:14 PM »
0
Could you explain that a little TM or how you used Easyuo to find it? Looking to learn as well not just ask for a fix, although I do appreciate it

There's a syntax checker in ScriptUO, and one of the things that it check for is brace imbalances.  I added that way back in the day when my scripts got so long that even one brace imbalance would change the characteristic of how the script ran and it wasn't apparent. 

A helpful tip when using ScriptUO and you find a brace imbalance and it's still hard to locate it.  If you perform an "Auto Indent Script", you can visibly see where the script starts to indent more to the right.  This is where your brace imbalance probably starts and will help you to fix it.  Be sure to do this on a copy because it's hard to UNDO the once you perform it.  What you should do is:
1) save your work
2) do the auto indent
3) find the location
4) reload your script and fix then retest the brace imbalance to make sure everything is balanced.

This is very helpful when you have more than 1 imbalance.  I've tested other peoples scripts where they were REALLY out of wack and this tool was helpful.

If you are unaware of ScriptUO (the program) you can download it here:

http://www.scriptuo.com/index.php?action=downloads;sa=view;down=3

Surprisingly it still works after all these years.   And yes, it still doesn't run scripts.  :P
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5382
  • Activity:
    4.2%
  • Reputation Power: 61
  • 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: +389
  • Referrals: 1
    • View Profile
Re: Sorting Scrolls
« Reply #5 on: January 02, 2020, 08:40:29 AM »
0
Damit,  I rewrote your script to make it more generic,  I left it overnight to go out and party, new years eve and I suffered a poweroutage.  I was hoping i had posted it here and I didnt save it opps... Ow well

The basics of the modification was to remove all ignore items, and instead use a finditem    then  for #findindex 1 #findcnt loop.
Then eliminate all the duplicate drag drop code and implement a gosub drapdrop   subroutine.    And finally add all the search strings to a list and then itterate through the list looking for a match each time.

Sorry if above doesn't make sense,  I tried good luck let us know how it all works out.
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."

Tags: