Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gemviper

Pages: 1 ... 3 4 [5] 6 7 ... 32
61
Scripting Chat / Re: Placing misc words into an array
« on: February 07, 2017, 11:58:06 PM »
Testing.

I'm driven to do it, to my website code, to my scripts.... can't help it. There is always a more efficient way, it just takes time to find it :)

62
Script Debug / Re: #FINDCNT incorrect value
« on: February 03, 2017, 04:14:00 AM »
I have a loop to move towards an item until it's in range and used an if #findcnt <> -1 to loop again... and when it finds nothing near me the #findcnt goes to -1 but an itemtype of YM is somehow found(#findcnt remains -1) and the loop does not recognize the false condition and continues moving towards....


wait for it


a chest at luna bank even if I'm in Skara Brae! Literally, the character runs towards Luna despite that being a different subserver. I checked the itemID it was looking for(despite a #findcnt of -1) and it's the chest beside the provisioner in Luna which shouldn't have an itemtype of YM to begin with. I decided that using a #findcnt check as a condition was probably not a good idea, lol.

This was just for testing purposes, I don't use it in any script.


63
Scripting Chat / Re: #findindex iteration limit
« on: February 03, 2017, 04:02:29 AM »
Thanks for both those suggestions, each gave me an idea!

64
General UO Chat / Re: Best places to find legendary items(As loot)
« on: January 31, 2017, 11:25:22 PM »
The roof is hands down the best place, but it's not the only place. I used to get a few fishing up the big baddie with ancient nets but now it takes 10-15 kills to get 1 legendary and that's just not practical as a farming source. I also got some in Shame a long time ago now but again, none in a long while. They keep tinkering with the loot table, it's sometimes fun just to go back and re-try old stomping grounds too.

Sampires used to be my favorite but of late I find myself on a necro/mage with either weaving or mysticism to plow through the early spawn more quickly. The game isn't always friendly to melee when it comes to bosses.

65
New member introductions / Re: Back once again
« on: January 31, 2017, 11:20:26 PM »
Welcome back, UO is a powerful vortex that never truly lets anyone escape it's grasp!

66
Scripting Chat / #findindex iteration limit
« on: January 31, 2017, 11:03:47 PM »
Working on something way past my bedtime again...

I am performing a finditem and iterating through the results with a #findindex but during a couple of tests I realized there is a delay before doing anything if the #findcnt of my search has found too many items. That's expected, the #findindex is needing to process what was found one by one. It dawned on me however that there is no need to iterate through EVERY result, by limiting it to the first 50 or so I could eliminate the initial pause before the script does something. (well, not eliminate, just break it up so as not to procrastinate so long at the start!)

If finditem finds 1000 results how do I best limit it to processing only the first 50 via a #findindex loop? I do use continue as a filter but the sheer volume sometimes leads to prolonged inaction. I also wouldn't need to tell it to check the next 50 and so on afterwards until the 1000 are processed because when it's done acting on the first 50 it could be run again. Call it chunking if you will, and 50 is an arbitrary number, I'd fine tune it based on results.

Is there a command for limiting how many of the finditem results will be processed with #findindex if the #findcnt is exceedingly high, say 1000+ ?


67
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 06:59:49 PM »
edit: my bad, it works... I had another brain fart. Time for bed I think.

Thanks TM

68
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 06:53:14 PM »
Bingo. With php you can print the literal of any variable within the code itself, my brain was stuck trying to do the same here, lol.

Thanks TM.

69
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 05:15:53 PM »
I am... sorta. 1 of the values I will not know in advance however. A simplified example...

Code: [Select]
set %group200 KWI_AAA_BBB_ETC

finditem KWI C_ ;example
event property #findid
set %nametotal 200 ;ommited the math that came up with value for simplicity sake
IF #FINDTYPE in %group%nametotal ; <---- brainfart here, I don't want to add anything to the group, only check against %group200
display ok %nametotal is accurate

I know the item type values in %group200 but will not know the %nametotal in advance and I want it to check on the group that corresponds with the %nametotal only. Hope that makes sense

70
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 05:05:57 PM »
One last question,

set %group200 AAA_BBB
set %group450 CCC_DDD

During the sub calculations are made against itemtypes and a final value number is generated(ie: 200). The next section of the script requires that I check to make sure that the itemtype is indeed in the group bearing the final value number(ie: if the final value is 200 then that item's itemtype is in %group200).

Sounds simple, and I'm sure it is, but I'm drawing a brain fart on the syntax. Example:

set %finalvalue 200
IF #FINDTYPE in %group200

I don't want to repeat the above check for each of the 210 groups and obviously "IF #FINDTYPE in %group%finalvalue" won't work(example to give you an idea of what I'm after)... so how can I I append the %finalvalue number to the %group to come up with %group200 ?


71
Scripting Chat / Re: Placing misc words into an array
« on: January 29, 2017, 09:12:53 AM »
Thanks guys

72
Scripting Chat / Re: Placing misc words into an array
« on: January 28, 2017, 10:10:29 PM »
It might help if I'm more specific, I'm hoping it's possible to tighten up this particular sub a bit. It deals with 210 "words", each belonging to a different itemtype.

set %itemtypes AAA_BBB_CCC_DDD_EEE_ETC...
finditem %itemtypes etc

but instead of proceeding from there I need to confirm that a particular word is found in the #property of every %itemtypes found, which is itself in a loop that itterates through each result, among other things. Is it not possible to create a single, albeit long, "set" of words instead of creating a lot of arrays? I don't want to return a positive unless an %itemtypes and "word" combo is found. CHecking each result against a long list of arrays, or if statements, doesn't feel optimal for my specific needs with this.

Just to confirm, it's not possible to create a single "set" of many words and return a positive if any one word is in that set ?

73
Scripting Chat / Placing misc words into an array
« on: January 28, 2017, 06:46:17 PM »
Lets say I have a half dozen words(or more) I'd like to place into an %array, how would I best do that?

Example: apple, monitor, computer, bike, kleenex and camera...\
set %array apple_monitor_computer_bike_kleenex_camera

That doesn't seem to work like it does for itemtypes, should it? After I perform an event property check I'd like to to run an if against the %array to find out if any of them are in there before I buy...

I know I can do individual checks such as if apple in #property || if...etc but that gets unwieldly if there are a couple dozen+ words in there. Suggestions?

edit: I am already running a loop on, for example, 125 items in a chest and during each item check I'd like to see if it has any of the words in it's property... without having an endless line of "if apple is in #property || monitor is in #property || etc."

74
General UO Chat / Re: HTML house signs
« on: January 25, 2017, 03:00:17 PM »
I don't have a picture of it but I do know how they are doing it. They originally broke being able to make them by shortening how much text you could enter into the book title, not leaving enough for all of the html code required. There is however a short bit of code you can use and still have enough for a few letters of text on a colored background. All of them are 1 line in length, avoid those... worthless.

75
General Discussion / Re: Memory leak
« on: January 20, 2017, 07:38:50 AM »
Is there an easy way to do the same var check with Stealth? I've got a similar memory leak issue after a few hours too.

Pages: 1 ... 3 4 [5] 6 7 ... 32