Author Topic: TrailMyx's List Handling Subs  (Read 73120 times)

0 Members and 2 Guests are viewing this topic.

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #105 on: August 11, 2010, 07:14:24 AM »
0
Sorry, first attempt failed.  Haven't had a chance to debug why.

Well whip those bad subs into shape.  They're taunting you... :)

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #106 on: March 25, 2011, 06:56:59 PM »
0
can the save/load subs in this script be edited from:
gosub TM_FileSystem_SaveVariable local TM_window_list_ , !listname save_handle listtype

to use the NGFS subs and work properly?  I'm guessing I can just change the gosub argument to say the correct thing (without the misspell!) and update the call arguments accordingly.

Of course by change, i mean copy the subs, and create NGFS ones.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #107 on: March 25, 2011, 08:02:28 PM »
0
It's possible, but certainly you are going to probably have a few head-banging sessions.  That even scares me.  ;)

This is one of those scripts I need to transition to the NGFS.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Respect: +4
  • Referrals: 1
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #108 on: July 08, 2021, 08:44:52 PM »
+1
Was putting together a script involving lots of complicated lists and after getting all the way to wanting to remove an item from the list, i stumbled across this beautiful piece of work :)

Managed to get everything working after looking through it enough times, just having one issue saving multiple lists into one file. Just as an example, im making a list with mob name as the item, id as the tag, listname as the dungeon.

Code: [Select]
gosub TM_LoadListFromFile %savefile

gosub TM_CreateList List covetous 252 24 137 173 Gray White Verdana 8
gosub TM_AddToList covetous Harpy ABC
gosub TM_AddToList covetous Mongbat ABC
gosub TM_AddToList covetous Skeleton ABC
gosub TM_SaveListToFile covetous %savefile

gosub TM_CreateList List destard 252 24 137 173 Gray White Verdana 8
gosub TM_AddToList destard Dragon ABC
gosub TM_AddToList destard Drake ABC
gosub TM_AddToList destard Wyvern ABC
gosub TM_SaveListToFile destard %savefile

If i run that in any combination of ways, i only end up keeping the last list saved. I could save each dungeon to a file but this seems like a cleaner way if possible.


Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #109 on: July 08, 2021, 11:58:49 PM »
0
I forgot about this version.  lol.  I forgot the list subs originally started out saving to a flat file.  The later versions of these subs saved to the registry to be much faster than these.  I'll attach version 31 which is the latest version of the registry version if you'd like to play with that.

For your problem, it looks like it's not possible to save multiple lists to a single file.  It's easy to add however.  I'd recommend gutting the "TM_SaveListToFile" pulling out the header save and then just appending the info.  I might have a little time to put together a sub that will do this over the weekend if you're willing to wait.  I'll probably just create a sub called "TM_AppendListToFile"
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Respect: +4
  • Referrals: 1
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #110 on: July 09, 2021, 10:34:11 AM »
0
Got it all working based on your suggestion :)
I did have to edit FileSystem_SaveFile as well since it created a file by default. Once that was all working i did end up going with the newer version. Makes it less portable but quite a bit more powerful. With all the TM_'s in my script already, its looking a lot more like your script than mine lol

With your help though, ive been able to create a combo box with all slayers in my inventory that can auto swap based on combobox selection. It also has quite the fancy target list that holds things like champ spawns, dungeons, and custom target lists that are all editable. The part im adding now is the ability to find a slayer type based on target #FINDTYPE, and automagically swap to that slayer if its in my inventory. I have a number of bird, repond, and undead targets working perfectly already. This functionality should work for a warrior selecting weapons, mages spellbooks,  and a bard to choose an insrument. The script also handles auto buffs, cross healing, autofollow, honor/attack, discording/peacing, all that fun stuff to save some carpal tunnel syndrome :)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #111 on: July 09, 2021, 02:05:12 PM »
+1
Very nice!  I'm glad you figured it out.  Yeh, the loss of portability is very annoying, but the speed increase sort of makes up for it.

Sounds like you have a pretty nice script going.  I'm glad you're using the tools I made.  I really did them to help simplify things with the hopes of people actually creating more elegant scripts without the need to worry about the nuts and bolts.  I liken the tools I made to a nice paint assortment.  The colors are neat, but the real artwork comes from using them to create something more.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Respect: +4
  • Referrals: 1
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #112 on: July 09, 2021, 03:05:45 PM »
0
No need to reinvent the wheel, especially since I was working on one for a wooden cart, and you had one for a race car just sitting around :)

I was quite happy with some of the solutions I rigged up to various problems, but using your subs just makes more sense outside of one specific sub. For example, my solution to keeping track of all the data for a variable index was sweet, but couldn't remove an item from the list, nor can euo... thats how I ended up getting into this one in the first place. I would like to get this script posted one day, I'm close to having all the framework done and the data will all depend on the user. So it's really just about tweaking a few things and finding all the little script breakers.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • 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: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #113 on: July 09, 2021, 03:09:30 PM »
0
Is this something you're going to make public?  Sounds pretty interesting.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Respect: +4
  • Referrals: 1
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #114 on: July 11, 2021, 02:11:35 PM »
+1
That is the plan! I actually just spent the night redoing 2 of the main subs. One for finding and listing available slayers, the other for figuring out the slayer type a target is weak against. Now they should be able to pop right into other scripts if people find them handy (its sure working for this script lol). Did not add anything for the functionality of this script, but i figured it may help towards my contributions :) The data is all user defined and variable so as soon as im done the framework, it will be ready for testing.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: TrailMyx's List Handling Subs
« Reply #115 on: July 13, 2021, 12:04:42 PM »
0
I forget about his sub section.    Interesting build that you are working on.   Now with the Camoe Talisman,  we need to be careful about the opposite slayer.  They sure can ruin your day when you forget about hose.   Sure will wait to see the finish result, sound promiting