Author Topic: Those darned EM items, desireable but hard to spot!  (Read 2671 times)

0 Members and 1 Guest are viewing this topic.

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Those darned EM items, desireable but hard to spot!
« on: November 06, 2015, 11:44:45 PM »
0
How would you set a simple list of specific EM items in a script, for several items with names like "Helm Made With Scales From A Crimson Dragon"?

- Cannot go by itemtype since it shares the same item type as a normal helm
- Cannot shorten it much since words like scales and crimson pull up other items

If I have a small(ish, 50 items) list of EM items that I want to set as priority to loot what's the most efficient way to find them when using finditem that will find them but not pick up non EM items of the same item type?

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Those darned EM items, desireable but hard to spot!
« Reply #1 on: November 07, 2015, 04:40:08 AM »
0
set %N_Titles 1
set %title1 Helm , #Spc , Mage , #Spc , With , #Spc , Scales , #Spc , From , #Spc , A , #Spc , Crimson , #Spc , Dragon

Finditem * C
For #Findindex 1 #Findcnt
{
Event Property #Findid
for %Title 1 %N_Titles
{
if %Title . %Title in #Property
Display Yayy found it $ #Property
}
}
Halt


You could write a sub to make the parsing much easier on you.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Re: Those darned EM items, desireable but hard to spot!
« Reply #2 on: November 07, 2015, 09:52:28 AM »
0
so with 50 items to look for there would be title2, title3, title4 etc? Could get to be quite a lengthy script, what would the slowdown be like?

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Those darned EM items, desireable but hard to spot!
« Reply #3 on: November 08, 2015, 08:39:50 PM »
0
Not as bad as you would think, Usually the event property Command itself takes longer than Actually Looking for a specific Text. Your best bet would be to also add the Type, so it would only be scanning the property of items with the right types.

Snippet will show you the time required to scan for a specific text on your character 50x
Code: [Select]
set #lpc 9999
set %Start_Time #Systime
Event Property #Charid
for %Number 1 50
{
If I_Like_Big_Butts in #property
Display Why did you name your character that....
}
set %End_Time #Systime - %Start_Time
Display Scanning 1 item for 50 String Texts took ~ %End_Time ms
Halt

Would take about 20-30ms for each item on my comp with other scripts running.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline GemviperTopic starter

  • Sr. Member
  • *
  • Posts: 481
  • Activity:
    0%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +57
  • Referrals: 2
    • View Profile
Re: Those darned EM items, desireable but hard to spot!
« Reply #4 on: November 09, 2015, 02:09:44 AM »
0
Wow, very cool, thanks manwinc

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: Those darned EM items, desireable but hard to spot!
« Reply #5 on: November 10, 2015, 07:31:46 AM »
0
You could write a sub to make the parsing much easier on you.


I always use subs like this to aviod having to type spaces as  ", #spc ," ..

Code: [Select]
gosub Addtitle Helm Mage With  Scales From A Crimson Dragon
gosub Addtitle Helm Mage With  Scales From A Purple Mushroom


sub Addtitle
  if %N_titles = N/A
     set %N_Titles 0
  set %N_Titles  %N_Titles + 1  ; increment the number of titles
  set %Title . %N_titles %1
  if %0 > 1
    {
    for !c 2 %0
       set %Title . %N_titles %Title . %N_titles , #spc , % . !c
    }
return
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."

Tags: