[Script] Pickpocketing(Crimes 2.0) - Color & Risk - Page 2…

[Script] Pickpocketing(Crimes 2.0) - Color & Risk

    • bishop_actual [2617217]
    • Role: Civilian
    • Level: 75
    • Posts: 133
    • Karma: 65
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 05:36:10 - 24/10/23 (1 year ago)
    Post link copied to clipboard Copy post link
    On Torn PDA (not tested in another browser as on mobile only) the dynamic rank doesn’t work.
    I’m lvl61 (tier3 in the code) in pick pocket skill yet my Safe and Moderately Unsafe are still 2 different shades of green

    Tier 3 should be same shade (37b24d) but looks to be only using the default values not the tier levels.

    constantly tier3 = { "Safe": "#37b24d", "Moderately Unsafe": "#37b24d", …





    Also I know it changes the colour when safe for level etc, but would be nice if the category changed too, as the default “moderately unsafe” marks are now actually “safe” for my level but not marked as such. This would be a nice QoL fix
    I guess this would be achieved by making the ‘markGroups’ constant Tiered too.
    Last edited by bishop_actual on 05:51:24 - 24/10/23 (1 year ago)
    • Korbrm [2931507]
    • Role: Civilian
    • Level: 69
    • Posts: 52
    • Karma: 203
    • Last Action: 2 days
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:03:52 - 24/10/23 (1 year ago)
    Post link copied to clipboard Copy post link

    bishop_actual [2617217]

    On Torn PDA (not tested in another browser as on mobile only) the dynamic rank doesn’t work.
    I’m lvl61 (tier3 in the code) in pick pocket skill yet my Safe and Moderately Unsafe are still 2 different shades of green

    Tier 3 should be same shade (37b24d) but looks to be only using the default values not the tier levels.

    constantly tier3 = { "Safe": "#37b24d", "Moderately Unsafe": "#37b24d", …





    Also I know it changes the colour when safe for level etc, but would be nice if the category changed too, as the default “moderately unsafe” marks are now actually “safe” for my level but not marked as such. This would be a nice QoL fix
    I guess this would be achieved by making the ‘markGroups’ constant Tiered too.
    The change in difficulty in not reflected in the color of the name but instead the bar to the left. I left the names colored with the description to show the different tiers of experience. I could instead change it from saying safe, unsafe, etc., to showing what multiplier that difficulty rank provides as far as exp is concerned.
    • bishop_actual [2617217]
    • Role: Civilian
    • Level: 75
    • Posts: 133
    • Karma: 65
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:04:00 - 26/10/23 (1 year ago)
    Post link copied to clipboard Copy post link
    That makes sense. I thought the names would change based on if it was safe, not that it was the XP scale :) so you have to look at the edge Color to see if can hit the target.
    • Korbrm [2931507]
    • Role: Civilian
    • Level: 69
    • Posts: 52
    • Karma: 203
    • Last Action: 2 days
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:05:05 - 27/10/23 (1 year ago)
    Post link copied to clipboard Copy post link

    bishop_actual [2617217]

    That makes sense. I thought the names would change based on if it was safe, not that it was the XP scale :) so you have to look at the edge Color to see if can hit the target.
    Yup. I want to change it up a little bit to just show the experience multiplier instead but with Halloween event and my kids being sick, free time for scripting has slowed ? But I will get to it this weekend!
    • Muthannnaa [2150016]
    • Role: Civilian
    • Level: 93
    • Posts: 1,669
    • Karma: 3,495
    • Last Action: 7 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 21:47:35 - 02/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    bump

    • Patapouf [1898019]
    • Role: Civilian
    • Level: 100
    • Posts: 436
    • Karma: 239
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 12:32:42 - 04/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    Love your script ty! I was wondering if it could be possible to filter marks? Would be nice to do the set up once instead of trying to remember everything. Like show me jogger only when walking, businessman only when on phone and not muscular, don't show policeman, don't show classy lady etcetc
    • TESV [2597103]
    • Role: Civilian
    • Level: 91
    • Posts: 206
    • Karma: 2
    • Last Action: 9 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 06:06:33 - 05/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    Can confirm ot works perfectly lol thank you so much
    Is there a similar one for burglary?
    • ObsessedGamr420 [1594720]
    • Role: Civilian
    • Level: 100
    • Posts: 90
    • Karma: 40
    • Last Action: 34 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 02:01:51 - 08/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    So im super dumb with this situation, hownwouldmi implement this into tornpda
    • CAVE_JOHNSON [2573449]
    • Role: Civilian
    • Level: 71
    • Posts: 1,672
    • Karma: 1,434
    • Last Action: 3 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 04:56:26 - 12/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    R+

    Suggestion to show factions previous names:

    https://www.torn.com/forums.php#/p=threads&f=4&t=16441686&b=0&a=0

     

    Suggestion to allow us to wear FANNY PACKS:  https://www.torn.com/forums.php#/p=threads&f=4&t=16360529&b=0&a=0

     

    • Skossan [2019541]
    • Role: Civilian
    • Level: 20
    • Posts: 16
    • Karma: 0
    • Last Action: 1 month
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 15:38:38 - 17/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    This is great but how do I get it on TornPDA?
    • nodelore [2786679]
    • Role: Civilian
    • Level: 98
    • Posts: 568
    • Karma: 543
    • Last Action: 30 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 03:54:14 - 19/11/23 (1 year ago)
    Post link copied to clipboard Copy post link
    I think I have misunderstood the intention of implementation. It should work fine, thanks!

    Thanks for your useful script!
    However, I've found one issue that the color does not change when my crime skill reaches a high level.

    And after an investigation on the source code, I found out that it should be caused by the incorrect usage of categoryColorMap variable, making the script always use default color map.

    When I replace the categoryColorMap with sideColorMap, everything goes well.


    Last edited by nodelore on 11:48:44 - 19/11/23 (1 year ago)
    • Silmaril [2665762]
    • Role: Civilian
    • Level: 90
    • Posts: 326
    • Karma: 860
    • Last Action: 5 hours
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 20:58:32 - 28/11/23 (1 year ago)
    Post link copied to clipboard Copy post link

    Korbrm [2931507]

    Description
    This script will color code and list the risky nature of each pick pocketing target. This information is backed by the data analysis that Emforus [2535044] has put together and posted here ([Crimes 2.0] Pickpocketing: An In-Depth Guide). As the original post changes, I will be updating the script as more data comes in. This also works in my testing on the TornPDA app.

    Updates
    With the most recent update, your pickpocketing skill will now be taken into consideration and the difficulty will show up as a colored bar on the left side of the card.
    • Green = Safe for your level
    • Orange = Those in the next level of difficulty
    • Red = 2 or more difficulty levels above your skill
    • Purple = Police




    Upcoming Updates
    As more data is available, I will likely look to update this as I have a clearer understanding of how each 'status' of the mark plays into the success chances.

    Additional functionality that I plan on implementing once more data is available includes but is not limited to
    • Colors ranked based on your current CS level Released in v0.4
    • Ability to sort based on perceived difficulty
    • Status of mark difficulty indicator
    I'm open for other request/recommendations, so please feel free to discuss!

    Known Issues
    Fixed with v 0.2 - If you are on a device where the resolution is narrow enough where the time is at the end of the name instead of separated, the script will not work. I do plan on getting this fixed.

    Example






    Good job, nice script!
    Added sound notifications code block to play when there are targets you are interested in:
    right after
    'use strict';
    just add this & change safety levels if u want to:
    let player = document.createElement('audio');
    player.src = 'https://assets.mixkit.co/active_storage/sfx/2870/2870-preview.mp3';
    player.preload = 'auto';
    // Add or remove safety levels you want to receive audio notification on.
    const categoriesToNotify = ["Dangerous", "Very Dangerous"];
    and this part to actually notify:
    right after this:
    divElement.querySelector('div').style.color = categoryColorMap[category];
    add this:
    if (categoriesToNotify.find(x => x == category) != null) {
    try {player.play();
    } catch (e) {console.log('Need to interact with page before playing notification is possible');}}
    Last edited by Silmaril on 21:01:24 - 28/11/23 (1 year ago)
    • Korbrm [2931507]
    • Role: Civilian
    • Level: 69
    • Posts: 52
    • Karma: 203
    • Last Action: 2 days
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 18:54:25 - 29/11/23 (1 year ago)
    Post link copied to clipboard Copy post link

    Skossan [2019541]

    This is great but how do I get it on TornPDA?
    You should be able to take the whole block of script and add it as a script.
    Settings -> Advanced browser settings -> Manage scripts -> add one in there and paste the block of script
    I'm also on the beta for Torn PDA so if issues do come up with it, I should catch them before it hits the masses and make any needed fixes(although I don't see Torn PDA changes impacting this script)
    • Kwack [2190604]
    • Role: Civilian
    • Level: 15
    • Posts: 2,243
    • Karma: 3,565
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 01:57:11 - 30/11/23 (1 year ago)
    Post link copied to clipboard Copy post link

    Korbrm [2931507]

    You should be able to take the whole block of script and add it as a script.
    Settings -> Advanced browser settings -> Manage scripts -> add one in there and paste the block of script
    I'm also on the beta for Torn PDA so if issues do come up with it, I should catch them before it hits the masses and make any needed fixes(although I don't see Torn PDA changes impacting this script)
    No deliberate change would impact this script in its current form, at least as currently planned.

    If something does break, it's likely either (a) torn changing their DOM structure or (b) an unintended bug from PDA.
    • Tenax [2336587]
    • Role: Civilian
    • Level: 65
    • Posts: 214
    • Karma: 32
    • Last Action: 27 minutes
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 09:12:31 - 11/12/23 (1 year ago)
    Post link copied to clipboard Copy post link
    I'm trying to figure out if there is any way to get TornTools into TornPDA. Any help would be greatly appreciated as I have no clue :S
    Last edited by Tenax on 09:48:36 - 11/12/23 (1 year ago)
    • Catarchy [2632824]
    • Role: Civilian
    • Level: 96
    • Posts: 5,243
    • Karma: 9,287
    • Last Action: 7 months
      • 1
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 11:13:25 - 11/12/23 (1 year ago)
    Post link copied to clipboard Copy post link

    Tenax [2336587]

    I'm trying to figure out if there is any way to get TornTools into TornPDA. Any help would be greatly appreciated as I have no clue :S
    no, PDA only supports single scripts, not browser extensions
    • Korbrm [2931507]
    • Role: Civilian
    • Level: 69
    • Posts: 52
    • Karma: 203
    • Last Action: 2 days
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 17:37:21 - 18/12/23 (1 year ago)
    Post link copied to clipboard Copy post link
    Your only option there would be to use Dolphin browser if you are on Android. And then install TornTools.
    • danielporsh911 [1842280]
    • Role: Civilian
    • Level: 76
    • Posts: 207
    • Karma: 200
    • Last Action: 1 month
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:09:00 - 12/01/24 (1 year ago)
    Post link copied to clipboard Copy post link
    Amazing. Thank you. R+
    • danielporsh911 [1842280]
    • Role: Civilian
    • Level: 76
    • Posts: 207
    • Karma: 200
    • Last Action: 1 month
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 14:09:26 - 12/01/24 (1 year ago)
    Post link copied to clipboard Copy post link

    Korbrm [2931507]

    Your only option there would be to use Dolphin browser if you are on Android. And then install TornTools.
    You can use kiwi browser also
    • Elzeothis [2961389]
    • Role: Civilian
    • Level: 69
    • Posts: 2,285
    • Karma: 2,067
    • Last Action: 1 minute
      • 0
    • Reason:
      Are you sure you want to report this post to staff?
      Cancel
    Posted on 01:18:31 - 13/01/24 (1 year ago)
    Post link copied to clipboard Copy post link
    What a blessing, thank you so very much!

    Honesty costs nothing. Knowledge is power. Truth is freedom.

    7d2c0a5c-3ef4-4901-9eb5-30dc887f2db3-2961389.png

Reply
Thread Title: