Official ScriptUO EasyUO Scripts > Script Debug

Sorting Scrolls

(1/2) > >>

JFSF:
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

TrailMyx:
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 ---; miscellaneous group arms lore / begging / camping / cartography / forensics / item identification / taste identification; combat anatomy / archery / fencing / focus / healing / mace fighting / parrying / swordsmanship / tactics / throwing / wrestling; trade skills alchemy / blacksmithing / fletching / carpentry / cooking / inscription / lumberjacking / mining / tailoring / tinkering; magic bushido / chivalry  / eval intelligence / imbuing / magery / meditation / mysticism / necromancy / ninjitsu / resisting spells / spellweaving / spirit speak; wilderness animal lore / animal taming / fishing / herding / tracking / veterinary; thievery detecting hidden / hiding / lock picking / poisoning / remove trap / snooping / stealing / stealth; bard discordance / musicianship / peacemaking / provocation ; so example set %transmisscelanous ( add the id of the book here ) set %transmiscellaneousset %transcombatset %transtradeskillsset %transmagicset %transwildernessset %transthieveryset %transbard set %psmiscellaneous ORIQWUDset %pscombat ORIQWUDset %pstradeskills ORIQWUDset %psmagic ORIQWUDset %pswilderness ORIQWUDset %psthievery ORIQWUDset %psbard ORIQWUD set %alacmiscellaneousset %alaccombatset %alactradeskillsset %alacmagicset %alacwildernessset %alacthieveryset %alacbard ignoreitem reset gosub sortscrollsdisplay ok all done, halting!halt;------------------------------------sub sortscrollspinksloop:  finditem TVH C_  IF #FINDKIND <> -1  {    event property #findid    if transcendence in #property    {      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      {        exevent drag #findid #findstack        exevent dropc %transmiscellaneous        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %transcombat        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %transtradeskills        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %transmagic        wait 20        ignoreitem #findid        goto pinksloop      }      if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property      {        exevent drag #findid #findstack        exevent dropc %transwilderness        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %transthievery        wait 20        ignoreitem #findid        goto pinksloop      }      if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property      {        exevent drag #findid #findstack        exevent dropc %transbard        wait 20        ignoreitem #findid        goto pinksloop      }    }    if exalted in #property || mythical in #property || legendary in #property    {      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      {        exevent drag #findid #findstack        exevent dropc %psmiscellaneous        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %pscombat        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %pstradeskills        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %psmagic        wait 20        ignoreitem #findid        goto pinksloop      }      if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property      {        exevent drag #findid #findstack        exevent dropc %pswilderness        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %psthievery        wait 20        ignoreitem #findid        goto pinksloop      }      if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property      {        exevent drag #findid #findstack        exevent dropc %psbard        wait 20        ignoreitem #findid        goto pinksloop      }    }        if alacrity in #property    {      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      {        exevent drag #findid #findstack        exevent dropc %alacmiscellaneous        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %alaccombat        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %alactradeskills        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %alacmagic        wait 20        ignoreitem #findid        goto pinksloop      }      if animal , #spc , lore in #property || animal , #spc , taming in #property || fishing in #property || herding in #property || tracking in #property || veterinary in #property      {        exevent drag #findid #findstack        exevent dropc %alacwilderness        wait 20        ignoreitem #findid        goto pinksloop      }      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      {        exevent drag #findid #findstack        exevent dropc %alacthievery        wait 20        ignoreitem #findid        goto pinksloop      }      if discordance in #property || musicianship in #property || peacemaking in #property || provocation in #property      {        exevent drag #findid #findstack        exevent dropc %alacbard        wait 20        ignoreitem #findid        goto pinksloop      }    }  }return 

JFSF:
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

Gaderian:
It is a feature of the Scriptuo tool not the Easyuo IDE.

Gaderian

TrailMyx:

--- Quote from: JFSF on December 29, 2019, 11:26:19 AM ---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

--- End quote ---

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

Navigation

[0] Message Index

[#] Next page

Go to full version