Author Topic: 2-item list  (Read 3991 times)

0 Members and 1 Guest are viewing this topic.

Offline UOMaddogTopic starter

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
2-item list
« on: August 21, 2011, 04:31:12 PM »
0
So, I had an idea for a script that would search for players around your character, and if they're orange faction players, it would add a button to a menu with the player's name. When you clicked their name, it would set them as last target. Now, if an opposing faction player runs on your screen, then runs back off, I don't want it to disappear! So my idea was, as soon as you see a new player, add them to a list and set a timer for that person (say 60 seconds) and if they don't reappear on your screen within that time, then it disappears. If they do reappear, then you reset their timer. Now of course, I'm doing this with OLD EUO not the probably nicer and more elegant OEUO! Is it best to start 2 lists with _ separators and just scan through the list counting the number of _'s until i hit their ID, then counting the same through the other 2 lists (for remaining time and char name) OR should I create a dynamic variable on the fly that incorporates their ID and do it that way somehow? Looking for any creative listing ideas. In java I'd just use an ArrayList and be happy, but oh well!
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline NecroFox

  • Jr. Member
  • **
  • Posts: 58
  • Activity:
    0%
  • Reputation Power: 1
  • NecroFox has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 2
    • View Profile
Re: 2-item list
« Reply #1 on: August 21, 2011, 04:42:39 PM »
0
Now that sounds like it will be useful and hard to code.
Sorry for spelling I hate spelling and im really bad at it
----------------------------------------------------
New to writing Scripts need Help accepting from all.
Good Learner
----------------------------------------------------
The Fox is cunning so watch your back....

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: 2-item list
« Reply #2 on: August 21, 2011, 05:00:13 PM »
0
My list handling subs are exactly what you are looking for.  They handle a visible element, plus a non-visible element.  They also control the visible list so you can organize the entries and even alphabetize if you want.

You should give'em a whirl....

http://www.scriptuo.com/index.php?topic=21.0
Please read the ScriptUO site RULES
Come play RIFT with me!

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: 2-item list
« Reply #3 on: August 21, 2011, 06:04:00 PM »
0
you can also check out my flatfile emulator

http://www.scriptuo.com/index.php?topic=7618.0
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 NecroFox

  • Jr. Member
  • **
  • Posts: 58
  • Activity:
    0%
  • Reputation Power: 1
  • NecroFox has no influence.
  • Gender: Male
  • Respect: +1
  • Referrals: 2
    • View Profile
Re: 2-item list
« Reply #4 on: August 21, 2011, 06:07:01 PM »
0
what is a file emulator?
Sorry for spelling I hate spelling and im really bad at it
----------------------------------------------------
New to writing Scripts need Help accepting from all.
Good Learner
----------------------------------------------------
The Fox is cunning so watch your back....

Offline UOMaddogTopic starter

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: 2-item list
« Reply #5 on: August 22, 2011, 07:12:56 AM »
0
@TM: Thanks! I came across the list/tab handling ones but couldn't find the one you linked.

Is there anyway to have 2 tags? I don't want to have to do 2 lists with the same item and different tags (or is that the best way to do it)

Ideally:

#FINDID - DISPLAYNAME - TIMER
« Last Edit: August 22, 2011, 07:16:43 AM by UOMaddog »
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

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: 2-item list
« Reply #6 on: August 22, 2011, 07:17:55 AM »
0
what is a file emulator?

umm a flatfile is a type of database.   http://en.wikipedia.org/wiki/Flat_file_database     Emulator means it trys to act like to the best of its ability which in EUO is not all that easy.
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 TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: 2-item list
« Reply #7 on: August 22, 2011, 07:21:56 AM »
0
@TM: Thanks! I came across the list/tab handling ones but couldn't find the one you linked.

Is there anyway to have 2 tags? I don't want to have to do 2 lists with the same item and different tags (or is that the best way to do it)

Ideally:

#FINDID - DISPLAYNAME - TIMER

You could easily use the 2nd tag to store all that information.  I use my sub-string subs to "index" items separated by a delimiter.  In the example I use a "#"

http://www.scriptuo.com/index.php?topic=1101.0
« Last Edit: August 22, 2011, 07:23:29 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

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: 2-item list
« Reply #8 on: August 22, 2011, 07:25:58 AM »
0
Only problem with my tables over TMs listhandler is that i never completed a find routine.  (but would be easy enough to do one)

Code: [Select]
; Initialize Pathing and Create the table
set #lpc 9000
set %EN_Table C:\easyuo/EUO , #spc , Scripts\ENs-Scripts\ENs-Subs-Tables.Txt
call %EN_Table EN_Table_Create People  ID  NAME TIMER   ; Create table

; Add a record
set !time #Scnt + 60
Call %EN_Table EN_Table_Append #findid #property !time
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 UOMaddogTopic starter

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: 2-item list
« Reply #9 on: August 22, 2011, 08:09:23 AM »
0
@TM: Thanks! I came across the list/tab handling ones but couldn't find the one you linked.

Is there anyway to have 2 tags? I don't want to have to do 2 lists with the same item and different tags (or is that the best way to do it)

Ideally:

#FINDID - DISPLAYNAME - TIMER

You could easily use the 2nd tag to store all that information.  I use my sub-string subs to "index" items separated by a delimiter.  In the example I use a "#"

http://www.scriptuo.com/index.php?topic=1101.0

Perfect Idea TM!!

ITEM = #FINDID
TAG = DISPLAYNAME_TIMER

Quick question to make this even easier, are all charid's a certain length???
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: 2-item list
« Reply #10 on: August 22, 2011, 08:28:18 AM »
0
Quick question to make this even easier, are all charid's a certain length???

Not necessarily.  On OSI I think they are the same, but on RunUO they are shorter.  I wouldn't rely on the length, and just parse using a delimiter.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: