Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
54 stars 43 forks source link

Players can loot hair and beard from NPC humanoids #775

Open a1exp opened 2 years ago

a1exp commented 2 years ago

There is a weird issue reported by a player:

some time is possible looting hair and beard from humanoid mobs
[5:24 PM]
and that items are invisible in your backpack
[5:26 PM]
and persist to exists in backpack after death, like an item newbie
[5:27 PM]
function looter(){
    while (Orion.FindTypeEx(any,any,lastcontainer).length > 0){
        var i = Orion.FindTypeEx(any,any,lastcontainer).shift();
        Orion.MoveItem(i.Serial());
        Orion.Wait(100);
    }
}
[5:28 PM]
i looted them by this script with orion
[5:28 PM]
function testShowMyItems(){
    var myItems = Orion.FindTypeEx(any, any, backpack);
    TextWindow.Open();
    TextWindow.Clear();
    for (var i = 0; i< myItems.length;i++){
        Orion.Click(myItems[i].Serial());
        Orion.CheckLag();
        TextWindow.Print("  Name=" + myItems[i].Name() + " -Serial="+myItems[i].Serial() + " \t\t\t-Graphic=" + myItems[i].Graphic() + " \t\t\t-Color="+ myItems[i].Color() );
    }
}
[5:29 PM]
and i can see that are in back pack with this function

I tried to reproduce it with the default script pack and it is reproduceable with this Orion script. E.g. add c_barbarian_chieftain, kill him, loot by a player with Orion.

Note the hair/beard item is not visible in backpack even to a GM, so I used .x show findlayer(21).findtype.t_hair to make sure the item exists. Also checked attr on such items, thery are newbie :) This may prevent a player going to a tournament which requires empty backpack..

On the next save sphere's GC deletes such items:

18:18:ERROR:GC: Deleted UID=04000a52b, Defname='i_hair_curly', Name='Curly'. Invalid code=0x2227 (Hair/Beard item not equipped / not in a corpse / not in a vendor box).
a1exp commented 2 years ago

First of all, this does not happen on 56b with Orion, just on SphereX. Second, such logic should be handled by server not client, otherwise a lot of cheats would be posisble if client contolled newbie flags :)

Tolokio commented 1 year ago

if item appear in the looters backpack using .xshow, it can't be orion issue only as sphere should deny to move the item. Did it work with other newbie stuff?