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 - BadManiac

Pages: 1 2 [3] 4
31
Script Debug / Sub ignore stuff for 3 minutes needs HELP!
« on: April 10, 2010, 02:54:09 PM »
So I thought this would be a good thing to bring the exceptional brains of this site together to work on a simple straight forward problem.
Ignoring something for 3 minutes, and then un-ignoring it.

Here's the background. UO Instanced Corpses take 3 minutes to reset to "public: where everything becomes accessible to anyone. In my looting script I can detect an instanced corpse. I'd like to loot your personal instance if possible, then ignore that corpse for 3 minutes until it goes public, and then loot it again.

Here's the sub I currently use, it's about as reliable as <insert something really unreliable here>
Code: [Select]
; IgnoreList====================
; %1 Item to ignore for 3 minutes
;===============================
SUB IgnoreList
{
  SET %oldlpc #LPC
  SET #LPC 10000
  NAMESPACE PUSH
  NAMESPACE LOCAL IgnoreList
  IF !ignore_cnt = N/A
    SET !ignore_cnt 0
  SET !item #FALSE
  IF %0 > 0
    SET !item %1
  FOR !i 1 !ignore_cnt
  {
    IF #SCNT > !time . !i && !ignore_cnt > 0
    {
      IGNOREITEM RESET !i
      IGNOREITEM RESET !ignore_cnt
      SET !time . !i !time . !ignore_cnt
      SET !item . !i !item . !ignore_cnt
      IGNOREITEM !item . !i !i
      SET !ignore_cnt !ignore_cnt - 1
    }
  }
  IF !item <> #FALSE
  {
    SET !ignore_cnt !ignore_cnt + 1
    SET !item . !ignore_cnt !item
    SET !time . !ignore_cnt #SCNT + 181
    IGNOREITEM !item !ignore_cnt
  }
  NAMESPACE POP
  SET #LPC %oldlpc
  RETURN
}
The idea is to use two lists, or 1D arrays with corpse ID and the time it should be un-ignored. And then go through the list every time and check if the timer has expired, un ignoring it and rearranging the lists. It works like linked lists if you're C fluent...

However it doesn't always work. it ignores stuf just fine, but then it get's stuck in ignored limbo and never get's re-looted. Any ideas? Better way of doing this? Improved version of this?

TM's Claw doesn't do this at all, so if we come up with a good solution it could benefit both scripts. Assuming TM wants to add it. I think it's worth it since there's a lot of group hunting in UO now, Doom, Peerless and SA bosses. And a lot of people don't loot everything. I always find plenty of left over ingredients on bosses for example, when hunting with people who are only there for arties or loot.

32
Scripting Chat / Re: REPEAT/UNTIL Loops - Do you use brackets or none?
« on: March 26, 2010, 07:22:33 PM »
Always brackets and indentation everywhere. Consistency is king in programming. Brackets with if's, while's, repeat's, sub's. ALWAYS brackets!!!

33
Oh thanks Rana, saved me from grabbing the gargy ones myself. *updates buying scripts*

Secondary, slightly on topic question:
Are there any gargoyle vendors outside the garg city in Ilsh and Ter Mur Royal City? Are there any other towns in Ter Mur with vendors?

34
I'd put the IGNOREITEM #CHARID in it's own ignorelist, and place it at the top of the sub, and then IGNOREITEM RESET that list before returning from the sub. Globally ignoring yourself can be a bad idea ;)

35
Scripting Chat / Re: BM Looter 3.0 Beta testers needed
« on: March 23, 2010, 03:57:00 PM »
I have a kid too, I don't discriminate :) Congrats! Enjoy the magic.

Try the BM looter on a few of your SA trips and see how it does. Easy for you to see what claw does better, tell me and I can add to or improve my script.

36
Yes Twinkle McNugget did say it. But Twinkle McNugget was so incredibly non specific and vague that I felt some clarification to what Twinkle McNugget had said was in order :P

37
probably easier to do with some string magic, or at least it's an alternative to OCR'ing the popup menu. Make a list of all vendor professions. Blah the Tinker, Blah the Tailor and so on, make a long list, tailor_tinker_blacksmith_provisioner_mage_scribe_...
Then read each NPC name, and either use STR functions to find each separate word from the list in the vendor name via for loop, or extract the vendors title from it's name. Should be pretty simple, find 'the' in the title, delete anything from the start of the name to the space after 'the', find the next space, delete everything including and after that space. Then you're left with a #STRRES containing the vendors profession. Then simply check IF #STRRES IN %longassvendorlist. If it is, it's a vendor and you can go shopping.

Either way works, but I avoid using OCR unless absolutely necessary so that's how I'd solve your problem.

As for your second question what you want is the DOT concatenation operator.
Code: [Select]
finditem HS_IS_XU_AV_GARGOYLES G_15
    if #findkind = 1 && #findrep = 7
      set %npc_id . !npc_counter #findid
      set !npc_counter !npc_counter + 1

Then you can go through the list:
Code: [Select]
FOR %i 1 !npc_counter
{
  SET !current_npc_id %npc_id . %i
  ;do things with !current_npc_id
}

38
Scripting Chat / Re: BM Looter 3.0 Beta testers needed
« on: March 21, 2010, 12:28:35 PM »
Try reading the script header :P
*bml_busy is what you're looking for.

39
Scripting Chat / BM Looter 3.0 Beta testers needed
« on: March 20, 2010, 03:59:10 PM »
I'm looking for a few reliable beta testers for my looter. I need you to be pretty fluent in EUO, and be a high end PvM player, preferably doing frequent SA hunts and boss hunts.

We need to verify that all lootable imbuing ingredients and all peerless ingredients are looted properly. The new integration of Garath's Imbuing evaluator in place of my item eval needs to be tested.

There is a lot of new code
* New drag and drop code/timings need to be tested, trying to limit the client crashing
* All SA items are added
* All peerless and imbuing ingredients
* SA quest items (if you can find more quest items that aren't in the list, they'll be added)
* Uses Garath's Imbuing evaluator for item evaluation, for a universal item score

There will be a couple of focus tests around the drag/drop and status checking subs, so in the very lest you need to be able to find those in the code and change them according to what we find. And you will need to have plenty of free time in the next couple of weeks.

Anyone interested? PM Me.

40
Scripting Chat / Re: Follow sub
« on: March 18, 2010, 07:51:13 PM »
Let me know if you need any more info, I'd love to see these subs used more widely. It's easily my favorite work.

It totally transformed what my scripts could do in terms of movement. No more rails, just an end coordinate and it gets there. Has never failed me so far. Well, except in caves and tunnels, but that's UO's built in pathfind function being screwey. Try Solen caves for eaxmple, produces some interesting results :)

41
Scripting Chat / Re: ter mur lumberjacking
« on: March 12, 2010, 05:35:27 PM »
I don't think it's possible to use tile scanning at all in Ter-Mur, no matter how many registry fixes you apply. EUO has to be internally updated to use the new map data, since it's a completely new map.

EUO staff are very aware of it. Hopefully they're working on it...

42
Scripting Chat / Re: Follow sub
« on: March 11, 2010, 02:01:52 PM »
It CAN walk from anywhere to anywhere. Britain to Cove is certainly possible. However there's a lot of crap in the way so it'd take a while to get there, and getting through the swamp with a billion player houses and mobs spawning could be interesting...

It's not meant for quite such long range pathfinding, it can, but it definitely won't get you there in a hurry. I fact when I was testing it I frequently ran from the Skara ferry to east Brit bank. And from one side of Brit to the other. Takes a while for it to find the bridges and paths through mountains by completely random trial and error, but it eventually gets there.

43
New member introductions / Re: BadManiac Introduction
« on: March 11, 2010, 11:16:11 AM »
Actually didn't take that long to write, it uses tile scanning, figures out the orientation of the wall in general NSEW terms, and then til scans from the center of the resource block towards the direction the wall faces, until it finds a non blocked tile, then it just goes there.
Making it follow walls around corners was just a case of checking a block in each direction from the previous one, then do the same thing. And of course it uses my pathfinding sub so it doesn't get stuck. It looks pretty lifelike and non scripted when running too.

I'll post it for you to dissect, just want you to roast for a bit first :)

44
Scripting Chat / Re: Follow sub
« on: March 11, 2010, 08:38:23 AM »
The target has to be within finditem range for my sub to work, but if you're multi clienting and share the position via globals, no it doesn't matter, as long as there IS a path between the two.

45
New member introductions / Re: BadManiac Introduction
« on: March 10, 2010, 08:58:57 PM »
An unfortunate side effect is that calculating the imbuing scores of items is much more math heavy with all the weights and so on. So it slows the evaluation down. Cool that you're working on the same thing TM, we might come up with some shortcuts and optimizations between the two of us.
Me and S7 more than doubled the speed of the old eval way back when, so it's definitely possible.

I thought you might have gone to that big place in the sky where everyone eventually goes when they lose interest in the 13 year old internet video game.
Lose interest in UO? You must be joking!?
No Life just has a tendency to happen, I'm currently living in my fifth country on my second continent since the last ten years or so... Had a family and all that nonsense. So UO takes a back seat. But my main account is perpetually subscribed and I poke my head in from time to time. And when things calm down I come back, script some more, play some more, 0ooo000oo some more, all the good stuff.

Still haven't been able to explore SA much. New chars on a new shard, so low on skills and people to play with atm, but I'll fix that.

Pages: 1 2 [3] 4