Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stealing from shops



This letter to the mailing list wasn't sent due to the local disk cleanup:

Return-Path: <ftww@minnie.cs.su.oz.au>
Received: from joyce.cs.su.OZ.AU by ifi.uio.no with SMTP
        id <AAifi.uio.no09535>; Wed, 12 Aug 1992 06:32:06 +0200
Message-Id: <199208120432.AAifi.uio.no09535@ifi.uio.no>
Subject: Stealing from shops
To: crossfire@ifi.uio.no
Date: Wed, 12 Aug 92 14:31:48 EST
From: Fred the Wonder Worm <ftww@minnie.cs.su.oz.au>
X-Face:
        )\c`u_%V|7EQUD<y["P?.*a6X>Ut%5v'IJ?=@^Wf^<#,~CjzL`/2q0=-O6XW/Z8A2j.kgg:|
        7|YZPSxy}rIuw8qD|/cQZ9^6kb:1XLleXhOl-U>(c~d`bC)%7FItZOUEw?=<V,Q563/\u<WN
        A[.E4~G]5>x%TBQ~NFJ,U|3wi[jzXd5-bMC
X-Mailer: ELM [version 2.2 PL0]

G'day fellow crossfire lovers!

    Just recently, a player here discovered that you could steal items from
shops.  The sequence of actions is as follows:

1)  Drop all your gold outside -- this ensures you won't be able to pay for
   items you pick up.
2)  Enter the shop, pick up anything you are interested in (sword +3, stuff
   like that)
3)  Try to go out.  You can't, because you can't pay for it, so you are left
   standing on top of the shop mat.
4)  Now drop an item you own (i.e. one which is _not_ unpaid) on top of the
   shop mat, and you will be teleported out of the shop with the rest of the
   items, including the unpaid ones.

Several first level characters have ended up with plate and sword +4 fairly
easily this way.  Only the one shot items (scrolls, potions, food, booze) are
useless to you if this is done.  The others can still be used.
Personally, I think it is a bad idea to let players stay on a supposed
teleporter regardless, so I've put a patch (ftww.patch) in
/pub/crossfire/incoming on ftp.ifi.uio.no.  This just checks to see if the
player has moved onto a shop mat and not been able to pay for everything, in
which case they get moved straight back to the square they came from.

For the curious, the problem might be in input.c, function apply(), case
SHOP_MAT, where the code looks like:

switch(tmp->type) {
....
  case SHOP_MAT:
    {
      ....
      if(op->type!=PLAYER) {
        if(IS_UNPAID(op)) { /* Just move the item to an adjacent place */
          ....
        }
        teleport(tmp,SHOP_MAT);

        ....
      }

The problem seemed not to occur when the teleport line was changed to a
teleport(op,SHOP_MAT), but other problems arose.

Does this trick work on other people's versions?  Or is mine somehow aberrant?
And is there a better solution?

Cheers,
Geoff.

-------------------------------------------------------------------------------
Geoff Bailey (Fred the Wonder Worm)   |   Programmer by trade --
ftww@cs.su.oz.au                      |       Gameplayer by vocation.
-------------------------------------------------------------------------------