backpack, newbie and easyuo

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am
Location: Poland

backpack, newbie and easyuo

Post by coltain »

simple EUO script to make blessed backpacks

set %plecak #BACKPACKID
set %dokad XQNVXQE ; <---- Id
finditem %plecak C_ , #charid
Exevent Drag #findid
wait 20
Exevent Dropc %dokad
stop

It`s not POL bug but I just notify about this...

This script removes old backpack and insert a new one (made by tailor)
Old backpack is blessed. New is blessed also.

I added to chardeath script a log when player dies and a newbie backpack is in gohost.backpack. Then it removes newbie thing and moves to corpse.
User avatar
CWO
POL Expert
Posts: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

possible packethook fix:

uopacket.cfg

Code: Select all

Packet 0x07
{
	Length 7
	ReceiveFunction drag:dragging
}
drag.src

Code: Select all

use uo;
use os;
use polsys;

program drag()
	return 1;
endprogram

exported function dragging(who, byref packet)
	var item := SystemFindObjectBySerial(packet.GetInt32(1));
	if (item && item.serial == who.backpack.serial)
		var reject := CreatePacket(0x27, 2);
		reject.SetInt8(1, 0x00);
		reject.SendPacket(who);
		return 1;
	endif
	return 0;
endfunction
I know theres a little extra code there but its there to make sure the check behaves properly...

Code: Select all

	var item := SystemFindObjectBySerial(packet.GetInt32(1));
	if (item && item.serial == who.backpack.serial)
could just be narrowed down to

Code: Select all

	if (packet.GetInt32(1) == who.backpack.serial)
Locked