代码:
sp = (int)me->query_skill("stealing",1) * 5 +((int)me->query("kar")+(int)me->query("age"))*2
- (int)me->query("thief") * 20;
if( sp < 1 ) sp = 1;
if( me->is_fighting() ) {
sp /= 2;
me->start_busy(3);
}
dp = ((int)victim->query("sen")+(int)victim->query("age")+(int)victim->query_kar())*2+(int)ob->weight()/25;
if( victim->is_fighting() ) dp *= 10;
if( ob->query("equipped") ) dp *= 10;
if random(sp+dp)>dp, succeed
if random(sp) > dp/2, fail but victim did not notice