It is currently Wed Nov 19, 2008 3:32 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Send Character List on Logon Hook
PostPosted: Tue Mar 07, 2006 11:52 am 
Offline

Joined: Tue Mar 07, 2006 7:28 am
Posts: 39
Location: Poland
POL 096 - 2006-01-18 release

As in topic... I've wrote something like this below, it compiles ok, but POL crashes on first loaded logon script if you log in character in a place you see another character (if you log in character in place you don't see another char and this char arrives or etc (or was concealed when you logged in and unconcealed after) it works fine). Any ideas?

uopacket.cfg:
Code:
Packet 0xA9
{
  Length variable
  SendFunction SendCharList:CharList
}


SendCharList.src:
Code:

use uo;
use polsys;
use file;
use util;

program SendCharList()
  Print( "przechwytywanie SendCharList" );
  return 1;
endprogram

exported function CharList( who, byref packet )
  var ilosc := packet.GetInt8(3);
  var i;
  var j := 4;
  for (i:=1; i<=ilosc; i:=i+1)
    var imie := "kurwa"+CStr(RandomInt(100)); //example, i need here GetObjProperty from char references but i don't know how to get it like here...
    packet.SetInt32(j, 0);
    packet.SetInt32(j+4, 0);
    packet.SetInt32(j+8, 0);
    packet.SetInt32(j+12, 0);
    packet.SetInt32(j+16, 0);
    packet.SetInt32(j+20, 0);
    packet.SetInt16(j+24, 0);
    packet.SetString(j, imie, 0);
    j := j+60;
  endfor
  return 0;
endfunction


Edit: I tried to hook 0x5D client -> server packet and change the name of character too (in order to give server the same name which it expects) and... the problem still exists(!).

_________________
Sorry for my English... I don't know it well.


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

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