PenUltima Online

It is currently Fri Sep 05, 2008 1:29 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: backpack, newbie and easyuo
PostPosted: Sat Dec 15, 2007 2:18 pm 
Offline

Joined: Tue Mar 20, 2007 7:17 am
Posts: 99
Location: Poland
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 18, 2007 8:14 am 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 747
Location: Chicago, IL USA
possible packethook fix:

uopacket.cfg
Code:
Packet 0x07
{
   Length 7
   ReceiveFunction drag:dragging
}


drag.src
Code:
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:
   var item := SystemFindObjectBySerial(packet.GetInt32(1));
   if (item && item.serial == who.backpack.serial)


could just be narrowed down to

Code:
   if (packet.GetInt32(1) == who.backpack.serial)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl