Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stealing skill & item weight
#1
This is something that I *think* is era-accurate, but I'm not sure about it.

_________________________

If you use the stealing skill and target an item inside a container (any container except another NPC or PC backpack) that is within a 1-tile range of your character, it should place the targeted item in your pack 100% of the time at 0.0 Stealing skill.

If the item is 2 tiles away or more, you get the message "that object is too far away." It doesn't work on "newbied" items (items you start with, like dagger or spellbook, etc.), you get the message "You can't steal that!" with newbied items.

Lastly, the item weight must just be low enough that your character can carry the item in their pack: depending how empty your pack is, this means any item weighing up to 399 stones.

_________________________

It might seem like a useless thing to ask to be implemented, but using some creativity, this little quirk is often useful in automating certain tasks in razor (alchemy, crafting, sorting, poisoning).

Thanks for reading!
Veranis: Who's brokering the deed fight @Brutal ?
Elk: How much are you betting and what are the rules
Brutal: patio deed
Brutal: Blitz can broker, i dont trust elk
Elk: it's time for me to cash in all my non-scamming years
Elk: And steal a patio deed
Reply
#2
This is from the T2A Demo Server and is what happens after a player target something to steal.

1. Check that the target is something or exit the trigger.
2. Check if the target is alive and if it is dead, exit the trigger.
3. Check distance to the object by count tiles from the thief and the container/item. If it over 1 tile it will say "You must be standing..." and exit.


Code:
TRIGGER( oortargetobj )(obj user, obj usedon)

{
  if(usedon == NULL())
  {
    return(false);
  }
  if(isDead(this))
  {
    return(false);
  } 
 
  obj Q63P = getTopmostContainer(usedon);
  int Q5F2 = getDistanceInTiles(getLocation(usedon), getLocation(this));
  if(getDistanceInTiles(getLocation(usedon), getLocation(this)) > 0x01)
  {
    systemMessage(this, "You must be standing next to an item to steal it.");
    return(false);
  }

...


Later in the script we have calculations of weight.

1. Get the weight of the object we are trying to steal.
2. Check if over 10 stones, if it is write "This item is too Heavy.." and exit.

(it also check that it is at least 1 item in the stack here or the same "too Heavy" message is sent)

Code:
  ...

  int Q68B = getWeight(usedon);
  int quantity = getQuantity(usedon);

  if((Q68B > 0x0A) && (quantity <= 0x01) && (owner != NULL()))
  {
    systemMessage(this, "This item is too heavy to steal from someone's backpack.");
    return(false);
  }

  ...

Another thing I didnt know before I looked into the script was that it is three times bigger chance to get catched if a single item is targeted vs a random thing from a bag/box.

-Grim 
Jack and Veranis like this post
Reply
#3
So reviewing the script I'm not sure if it's possible to draw any conclusions about this without knowing what the return value of witnessCrime is (is this a core function?)

From the demo:
Code:
 list Q57W;
 int Q5TF = 0x64 + getSkillLevelReal(this, 0x21);
 int Q4IB = Q569 * Q5YS * 0x1388 / Q5TF;
 int Q691 = witnessCrime(getLocation(usedon), this, owner, getName(usedon), Q4IB, (getValue(usedon) + 0x04) / 0x05, 0x01);
 changeKarma(this, 0x00 - 0x1388);
 if(!getCompileFlag(0x01))
 {
   criminalActAdvanced(this, owner, 0x01, 0x06, 0x18 * 0x02, 0x00);
 }
 if(Q691 > 0x00)
 {
   if(!getCompileFlag(0x01))
   {
     setCriminal(this, 0x01E0);
   }
   Q4IB = Q569 * Q5YS * 0x1E + 0x64;
   if(testAndLearnSkill(this, 0x21, Q4IB, 0x32) <= 0x00)
   {
     systemMessage(this, "You fail to steal the item.");
     return(0x00);
   }
 }
 systemMessage(this, "You successfully steal the item.");

witnessCrime passes in "this" (the person who is stealing), along with "owner" (the person being stolen from, which is null when it's not a mobile) along with some other calculations to do with weight, skill level and whether or not it was a random steal.

I think it's likely that stealing from a container probably always returns 0 from witnessCrime, since "owner" is null. And in which case no skill check would take place either. Meaning it has 100% success rate. Since weight only gets checked if "owner" is not null, there should be no limit on the weight you can steal from a container, except for how much weight you can carry. This echoes Veranis' original post.

Without knowing what witnessCrime truly does, these are just assumptions. It would be worth testing in the demo if possible, unfortunately I do not have access to a demo server.
[Image: jack-sig.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)