function _0x364c(_0x33c131,_0x1f69c1){
const _0x22d50c=_0x22d5();
return _0x364c=function(_0x364ca6,_0x520c66){
_0x364ca6=_0x364ca6-0xfe;
let _0x3cd2bf=_0x22d50c[_0x364ca6];
return _0x3cd2bf;
}
,_0x364c(_0x33c131,_0x1f69c1);
}
const _0x1cbdd7=_0x364c;
function _0x22d5(){
const _0x54d393=['[��� ��������� ��� ��������!]','Calculated distance to object','Picking up item ','length','Teleported and frozen','[�� ������� �������� ������� �������!]','offServer','Requesting inventory data','21593568UuKUFM','188634vjFCJx','[������ ��� �������� ������� �������: ','getClosestObjectOfType','toISOString','1026798bcPPSv','freezeEntityPosition','Failed to emit initialization notification','MAX_VALUE','Script unloaded','inventoryApi.inventoryDataResult','Pickup process completed','[������ ��������! Numpad 5 - �������� � ������, Numpad 0 - ������ ������, Numpad 7 - ���/����, Numpad 6 - ��������]','[�������� ����������: ������ ��������!]','Teleporting to position','[�������� �������� ���������!]','Error during teleport','scriptID','[������ ','Teleport and pickup triggered','keyup','getEntityCoords','pow','Inventory data request sent','Starting pickup process','Processing inventory data','Player','6558060lhYWJU','Object found','Pickup skipped','10305ByFtaK',' ���������!]','pos','35sTMaIt','5026420xElSEj','[������ ��������!]','Player scriptID not available','Unload script triggered','6VGDDQU','Unknown key pressed','Script disabled','Key event received','message','2339186918','2165746766','11qRIYRd','Numpad 7','Error requesting inventory data','setEntityCoords','[������ ��� ��������: ','8UpydAa','6640KhPuZs','stringify','No object found for hash','Script initialized','[������� ','[������ ��� ���������: ','Searching for nearest object','Script toggled','Numpad 5','local','Invalid inventory source','api.notify','emitServer','Received pickup data','onServer','No object found for teleport','269998cyOdki','[������ ��� ������� ������ ���������: ','Pickup triggered','log','emit'];
_0x22d5=function(){
return _0x54d393;
};
return _0x22d5();
}
(function(_0x147d95,_0x377921){
const _0x34d77a=_0x364c,_0x3f6fb9=_0x147d95();
while(!![]){
try{
const _0x35bc7c=-parseInt(_0x34d77a(0x137))/0x1*(-parseInt(_0x34d77a(0x104))/0x2)+parseInt(_0x34d77a(0x116))/0x3*(parseInt(_0x34d77a(0x143))/0x4)+-parseInt(_0x34d77a(0x133))/0x5+parseInt(_0x34d77a(0x112))/0x6*(-parseInt(_0x34d77a(0x132))/0x7)+parseInt(_0x34d77a(0x144))/0x8*(-parseInt(_0x34d77a(0x12f))/0x9)+-parseInt(_0x34d77a(0x12c))/0xa+-parseInt(_0x34d77a(0x13e))/0xb*(-parseInt(_0x34d77a(0x111))/0xc);
if(_0x35bc7c===_0x377921)break;
else _0x3f6fb9['push'](_0x3f6fb9['shift']());
}
catch(_0x150753){
_0x3f6fb9['push'](_0x3f6fb9['shift']());
}
}
}
(_0x22d5,0x8042b));
let scriptActive=!![],isPickingUp=![];
const OBJECT_HASHES=[0xb7e2ddaf],TELEPORT_OFFSET_Z=-2.3;
function logAction(_0x459a21,_0xca8aca={
}
){
const _0x31c6ef=_0x364c,_0xd4ff23=new Date()[_0x31c6ef(0x115)]();
alt[_0x31c6ef(0x107)]('['+_0xd4ff23+'] [PickupScript] '+_0x459a21+': '+JSON[_0x31c6ef(0x145)](_0xca8aca));
}
function getDistance(_0x265944,_0x37b8a2){
const _0x954541=_0x364c;
return Math['sqrt'](Math[_0x954541(0x127)](_0x265944['x']-_0x37b8a2['x'],0x2)+Math['pow'](_0x265944['y']-_0x37b8a2['y'],0x2)+Math['pow'](_0x265944['z']-_0x37b8a2['z'],0x2));
}
function findNearestObject(){
const _0x2a1ea9=_0x364c;
if(!alt['Player']||!alt[_0x2a1ea9(0x12b)][_0x2a1ea9(0x14d)]||!alt[_0x2a1ea9(0x12b)]['local'][_0x2a1ea9(0x131)])return logAction('Player or position not available',{
}
),null;
const _0x5b7e0d=alt[_0x2a1ea9(0x12b)][_0x2a1ea9(0x14d)]['pos'];
logAction(_0x2a1ea9(0x14a),{
'playerPos':_0x5b7e0d
}
);
let _0x52de14=null,_0xc0fe98=Number[_0x2a1ea9(0x119)];
return OBJECT_HASHES['forEach'](_0x47e927=>{
const _0x56e620=_0x2a1ea9;
logAction('Checking object hash',{
'hash':_0x47e927
}
);
const _0x3f7a5b=native[_0x56e620(0x114)]?.(_0x5b7e0d['x'],_0x5b7e0d['y'],_0x5b7e0d['z'],0x64,_0x47e927,![],![],![]);
if(_0x3f7a5b){
logAction(_0x56e620(0x12d),{
'hash':_0x47e927,'object':_0x3f7a5b
}
);
const _0x3a8300=native[_0x56e620(0x126)]?.(_0x3f7a5b,!![]);
if(_0x3a8300){
const _0x1a65c2=getDistance(_0x5b7e0d,_0x3a8300);
logAction(_0x56e620(0x10a),{
'distance':_0x1a65c2
}
),_0x1a65c2<_0xc0fe98&&(_0x52de14=_0x3f7a5b,_0xc0fe98=_0x1a65c2,logAction('New closest object',{
'distance':_0x1a65c2,'object':_0x3f7a5b
}
));
}
else logAction('Failed to get object position',{
'hash':_0x47e927,'object':_0x3f7a5b
}
);
}
else logAction(_0x56e620(0x146),{
'hash':_0x47e927
}
);
}
),_0x52de14;
}
function teleportToObject(){
const _0x3ba6ca=_0x364c;
logAction('Attempting teleport',{
'scriptActive':scriptActive
}
);
if(!scriptActive){
logAction('Teleport skipped',{
'reason':'Script is disabled'
}
),alt[_0x3ba6ca(0x108)]?.(_0x3ba6ca(0xff),_0x3ba6ca(0x11e),0x1);
return;
}
const _0x5472f3=findNearestObject();
if(!_0x5472f3){
logAction(_0x3ba6ca(0x103),{
}
),alt['emit']?.(_0x3ba6ca(0xff),'[������ �� ������ ��� ���������!]',0x1);
return;
}
const _0x16f2e9=native[_0x3ba6ca(0x126)]?.(_0x5472f3,!![]);
if(!_0x16f2e9){
logAction('Failed to get object position',{
}
),alt[_0x3ba6ca(0x108)]?.(_0x3ba6ca(0xff),_0x3ba6ca(0x10e),0x1);
return;
}
const _0x2d86fe={
'x':_0x16f2e9['x'],'y':_0x16f2e9['y'],'z':_0x16f2e9['z']+TELEPORT_OFFSET_Z
};
logAction(_0x3ba6ca(0x11f),{
'teleportPos':_0x2d86fe
}
);
try{
alt['Player'][_0x3ba6ca(0x14d)]&&alt[_0x3ba6ca(0x12b)][_0x3ba6ca(0x14d)][_0x3ba6ca(0x122)]?(native[_0x3ba6ca(0x141)]?.(alt['Player']['local'][_0x3ba6ca(0x122)],_0x2d86fe['x'],_0x2d86fe['y'],_0x2d86fe['z'],![],![],![],!![]),native[_0x3ba6ca(0x117)]?.(alt[_0x3ba6ca(0x12b)][_0x3ba6ca(0x14d)][_0x3ba6ca(0x122)],!![]),logAction(_0x3ba6ca(0x10d),{
'position':_0x2d86fe
}
),setTimeout(()=>{
const _0x141631=_0x3ba6ca;
native[_0x141631(0x117)]?.(alt[_0x141631(0x12b)]['local'][_0x141631(0x122)],![]),logAction('Player unfrozen after teleport',{
}
),requestAndPickup();
}
,0x3e8),alt[_0x3ba6ca(0x108)]?.(_0x3ba6ca(0xff),'[����������������� � �������!]',0x1)):(logAction(_0x3ba6ca(0x135),{
}
),alt[_0x3ba6ca(0x108)]?.(_0x3ba6ca(0xff),'[������: ����� �� ������!]',0x1));
}
catch(_0x53539e){
logAction(_0x3ba6ca(0x121),{
'error':_0x53539e[_0x3ba6ca(0x13b)]
}
),alt[_0x3ba6ca(0x108)]?.(_0x3ba6ca(0xff),_0x3ba6ca(0x149)+_0x53539e['message']+']',0x1);
}
}
function pickupAllItems(_0x57b063){
const _0x20f65d=_0x364c;
logAction(_0x20f65d(0x101),{
'data':_0x57b063
}
);
if(!scriptActive||isPickingUp||!_0x57b063||!_0x57b063[0x0]){
logAction(_0x20f65d(0x12e),{
'scriptActive':scriptActive,'isPickingUp':isPickingUp,'dataAvailable':!!_0x57b063
}
),alt[_0x20f65d(0x108)]?.(_0x20f65d(0xff),'[�������� ����������: ������ �������� ��� ������� ��� ����!]',0x1);
return;
}
try{
const _0xa8996=_0x57b063[0x0];
logAction(_0x20f65d(0x12a),{
'inventoryData':_0xa8996
}
);
if(_0xa8996[0x0]!==0x7){
logAction(_0x20f65d(0xfe),{
'source':_0xa8996[0x0]
}
),alt[_0x20f65d(0x108)]?.(_0x20f65d(0xff),_0x20f65d(0x120),0x1);
return;
}
const _0xa5f009=_0xa8996[0x2];
if(!_0xa5f009||_0xa5f009[_0x20f65d(0x10c)]===0x0){
logAction('No items to pickup',{
}
),alt[_0x20f65d(0x108)]?.(_0x20f65d(0xff),_0x20f65d(0x109),0x1);
return;
}
isPickingUp=!![],logAction(_0x20f65d(0x129),{
'itemCount':_0xa5f009['length']
}
),_0xa5f009['forEach']((_0x44f612,_0x1beff6)=>{
const [_0x721971,_0x3bbfa2,_0x24a920,_0x3cb56a,_0x393d92,_0x3ff526,_0x1d5774,_0x5b6dcc]=_0x44f612,_0x4ad3fc=[0x7,_0x3ff526,_0x721971,-0x1,0x1,null,-0x1,null];
setTimeout(()=>{
const _0x1c6e24=_0x364c;
logAction(_0x1c6e24(0x10b)+(_0x1beff6+0x1)+'/'+_0xa5f009['length'],{
'itemId':_0x721971,'itemHash':_0x3ff526
}
);
try{
alt[_0x1c6e24(0x100)]?.(_0x1c6e24(0x13d),..._0x4ad3fc);
}
catch(_0x3ede55){
logAction('Error emitting pickup event',{
'error':_0x3ede55[_0x1c6e24(0x13b)]
}
),alt['emit']?.(_0x1c6e24(0xff),_0x1c6e24(0x113)+_0x3ede55[_0x1c6e24(0x13b)]+']',0x1);
}
_0x1beff6===_0xa5f009[_0x1c6e24(0x10c)]-0x1&&setTimeout(()=>{
const _0x58d736=_0x1c6e24;
isPickingUp=![],logAction(_0x58d736(0x11c),{
'totalItems':_0xa5f009['length']
}
),alt[_0x58d736(0x108)]?.('api.notify',_0x58d736(0x148)+_0xa5f009['length']+_0x58d736(0x130),0x1);
}
,0x64);
}
,_0x1beff6*0x32);
}
);
}
catch(_0x2175c1){
logAction('Error during pickup',{
'error':_0x2175c1['message']
}
),alt[_0x20f65d(0x108)]?.(_0x20f65d(0xff),_0x20f65d(0x142)+_0x2175c1[_0x20f65d(0x13b)]+']',0x1),isPickingUp=![];
}
}
function requestAndPickup(){
const _0xc1b115=_0x364c;
logAction(_0xc1b115(0x110),{
'scriptActive':scriptActive
}
);
if(!scriptActive){
logAction(_0xc1b115(0x139),{
}
),alt[_0xc1b115(0x108)]?.(_0xc1b115(0xff),'[������ ��������!]',0x1);
return;
}
if(isPickingUp){
logAction('Pickup already in progress',{
}
),alt['emit']?.(_0xc1b115(0xff),'[�������� ��� � ��������!]',0x1);
return;
}
try{
alt[_0xc1b115(0x100)]?.(_0xc1b115(0x13c),null,null),logAction(_0xc1b115(0x128),{
}
);
}
catch(_0x22c00a){
logAction(_0xc1b115(0x140),{
'error':_0x22c00a[_0xc1b115(0x13b)]
}
),alt['emit']?.(_0xc1b115(0xff),_0xc1b115(0x105)+_0x22c00a[_0xc1b115(0x13b)]+']',0x1);
}
}
function toggleScript(){
const _0x59da0c=_0x364c;
scriptActive=!scriptActive,logAction(_0x59da0c(0x14b),{
'newState':scriptActive
}
),alt['emit']?.(_0x59da0c(0xff),_0x59da0c(0x123)+(scriptActive?'�����������':'�������������')+'!]',0x1);
}
function unloadScript(){
const _0x473097=_0x364c;
scriptActive=![],isPickingUp=![],alt[_0x473097(0x10f)]?.('inventoryApi.inventoryDataResult',pickupAllItems),alt['off']?.(_0x473097(0x125),handleKeyPress),logAction(_0x473097(0x11a),{
}
),alt[_0x473097(0x108)]?.(_0x473097(0xff),_0x473097(0x134),0x1);
}
function handleKeyPress(_0x193439){
const _0x256b67=_0x364c;
logAction(_0x256b67(0x13a),{
'keyCode':_0x193439,'scriptActive':scriptActive
}
);
if(!scriptActive){
logAction('Key press ignored',{
'reason':'Script is disabled'
}
);
return;
}
switch(_0x193439){
case 0x65:logAction(_0x256b67(0x124),{
'key':_0x256b67(0x14c)
}
),teleportToObject();
break;
case 0x60:logAction(_0x256b67(0x106),{
'key':'Numpad 0'
}
),requestAndPickup();
break;
case 0x67:logAction('Toggle script triggered',{
'key':_0x256b67(0x13f)
}
),toggleScript();
break;
case 0x66:logAction(_0x256b67(0x136),{
'key':'Numpad 6'
}
),unloadScript();
break;
default:logAction(_0x256b67(0x138),{
'keyCode':_0x193439
}
);
}
}
alt['onServer']&&alt['on']?(alt[_0x1cbdd7(0x102)](_0x1cbdd7(0x11b),_0x416fa3=>{
logAction('Server event received',{
'event':'inventoryApi.inventoryDataResult','data':_0x416fa3
}
),pickupAllItems(_0x416fa3);
}
),alt['on'](_0x1cbdd7(0x125),handleKeyPress)):logAction('Event registration failed',{
'altAvailable':!!alt
}
);
logAction(_0x1cbdd7(0x147),{
}
);
alt['emit']?alt[_0x1cbdd7(0x108)](_0x1cbdd7(0xff),_0x1cbdd7(0x11d),0x1):logAction(_0x1cbdd7(0x118),{
}
);
© 2023 Quttera Ltd. All rights reserved.