Hello guys... I'm here to ask for some help again.
I wanted to create a item that could change the light levels, but not everyone's light level, only a player light level. Something like a "blind" status.
I tried to search for some functions but found nothing.
Anyone?
Light Level
Re: Light Level
Perhaps this
http://docs.polserver.com/pol098/objref.php#UObject
facing Desc: facing or the object (meaningful for mobiles and light-emitting items) range 0-127
http://docs.polserver.com/pol098/objref.php#UObject
facing Desc: facing or the object (meaningful for mobiles and light-emitting items) range 0-127
Re: Light Level
ELSoft facing is only changing the light for items with lightsource tiledata flag. And for them its changing it according to light graphics in light.mul.
For mobiles facing only change the direction the face.
Pachacuti look at the character objref and method .setlightlevel, that is the one used to change a single person lightlevels.
or if you want you can also create a custom function for it ( cant remember what was wrong with that method why I did this )
LightLevel 30 = Dark & LightLevel 0 = DayLight
For mobiles facing only change the direction the face.
Pachacuti look at the character objref and method .setlightlevel, that is the one used to change a single person lightlevels.
or if you want you can also create a custom function for it ( cant remember what was wrong with that method why I did this )
Code: Select all
function SetLightLevel( character, light_level )
var light_level_packet := CreatePacket( 0x4F, 2 );
light_level_packet.SetInt8( 1, CInt( light_level ) );
light_level_packet.SendPacket( character );
endfunction
Re: Light Level
Oh Tomi, Thanks! That is exatelly what I needed.
BUT, I still got a problem.
I wanted this script to create a "blind" status, where the player would be unnable to see. But the max dark I can set, isn't dark enough.
BUT, I still got a problem.
I wanted this script to create a "blind" status, where the player would be unnable to see. But the max dark I can set, isn't dark enough.
Re: Light Level
0x1F - Black
Max normal val = 0x1F
Guys i have another question == how to create lightlevel for MobileRef and avoid ,light from inject?
,light from inject can ignore Packet: 0x4F
Max normal val = 0x1F
Guys i have another question == how to create lightlevel for MobileRef and avoid ,light from inject?
,light from inject can ignore Packet: 0x4F
Re: Light Level
injection ignores both 0x4E and 0x4F ( both lightlevel packets )
because how OSI made the lightlevels working in UO they works this way
Server -> Client
- Tells what lightlevel should be changed to.
Client
- Just changes the lightlevel.
Thats the problem, the client is never responding to the server what lightlevel its using. ( Complain OSI about this if you dont like
)
3 solutions for this problem
1: use a dissambeler to change the client to use some other packet cmd than 0x4E or 4F for lightlevels and hope people from injection doesnt packetlog ( NOT SECURE )
2: use a dissambeler to change the client to respond what lightlevel its using.
3: Custom client and make it work however you want
This is just 1 of many crappy things how OSI has made systems and stuff working in their client.
And just as a small note: Injection is not the only program out there to make the client ignore these packets ( Razor and EasyUO does it too ) And to be more exact about this, is just a damn 1 byte hex editing in the client to do this.
because how OSI made the lightlevels working in UO they works this way
Server -> Client
- Tells what lightlevel should be changed to.
Client
- Just changes the lightlevel.
Thats the problem, the client is never responding to the server what lightlevel its using. ( Complain OSI about this if you dont like
3 solutions for this problem
1: use a dissambeler to change the client to use some other packet cmd than 0x4E or 4F for lightlevels and hope people from injection doesnt packetlog ( NOT SECURE )
2: use a dissambeler to change the client to respond what lightlevel its using.
3: Custom client and make it work however you want
This is just 1 of many crappy things how OSI has made systems and stuff working in their client.
And just as a small note: Injection is not the only program out there to make the client ignore these packets ( Razor and EasyUO does it too ) And to be more exact about this, is just a damn 1 byte hex editing in the client to do this.
Re: Light Level
Yes, it's just a one-byte hex, but
- you've to maintain that fix across client ugprades
- it's not secure
Damn OSI
- you've to maintain that fix across client ugprades
- it's not secure
Damn OSI

Re: Light Level
,light cant prevent to SendInstaResDialog( char ); 