• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help pelase scripts windows.lua:

Bandoleiro

Member
Joined
Sep 5, 2019
Messages
29
Reaction score
6
Hi i need help in my server appears this message occasionally and the server (otx2) It does not work any more :

22/7/2020 11:35:23] [Error - Action Interface]

[22/7/2020 11:35:23] data/actions/scripts/other/windows.lua:eek:nUse

[22/7/2020 11:35:23] Description:

[22/7/2020 11:35:23] (LuaInterface::luaGetHouseFromPosition) Tile not found


Thanks!!

:
 

Attachments

Solution
replace whole script for this

Lua:
local WINDOWS = {
    [6438] = 6436, [6436] = 6438,
    [6439] = 6437, [6437] = 6439,
    [6442] = 6440, [6440] = 6442,
    [6443] = 6441, [6441] = 6443,
    [6446] = 6444, [6444] = 6446,
    [6447] = 6445, [6445] = 6447,
    [6452] = 6450, [6450] = 6452,
    [6453] = 6451, [6451] = 6453,
    [6456] = 6454, [6454] = 6456,
    [6457] = 6455, [6455] = 6457,
    [6460] = 6458, [6458] = 6460,
    [6461] = 6459, [6459] = 6461,
    [6464] = 6462, [6462] = 6464,
    [6465] = 6463, [6463] = 6465,
    [6468] = 6466, [6466] = 6468,
    [6469] = 6467, [6467] = 6469,
    [6472] = 6470, [6470] = 6472,
    [6473] = 6471, [6471] = 6473,
    [6790] = 6788, [6788] = 6790,
    [6791] = 6789, [6789] = 6791,
    [7027] = 7025, [7025] = 7027,
    [7028] = 7026, [7026] = 7028,
    [7031] = 7029, [7029] = 7031,
    [7032] =...
replace whole script for this

Lua:
local WINDOWS = {
    [6438] = 6436, [6436] = 6438,
    [6439] = 6437, [6437] = 6439,
    [6442] = 6440, [6440] = 6442,
    [6443] = 6441, [6441] = 6443,
    [6446] = 6444, [6444] = 6446,
    [6447] = 6445, [6445] = 6447,
    [6452] = 6450, [6450] = 6452,
    [6453] = 6451, [6451] = 6453,
    [6456] = 6454, [6454] = 6456,
    [6457] = 6455, [6455] = 6457,
    [6460] = 6458, [6458] = 6460,
    [6461] = 6459, [6459] = 6461,
    [6464] = 6462, [6462] = 6464,
    [6465] = 6463, [6463] = 6465,
    [6468] = 6466, [6466] = 6468,
    [6469] = 6467, [6467] = 6469,
    [6472] = 6470, [6470] = 6472,
    [6473] = 6471, [6471] = 6473,
    [6790] = 6788, [6788] = 6790,
    [6791] = 6789, [6789] = 6791,
    [7027] = 7025, [7025] = 7027,
    [7028] = 7026, [7026] = 7028,
    [7031] = 7029, [7029] = 7031,
    [7032] = 7030, [7030] = 7032,
    [10264] = 10266, [10266] = 10264,
    [10265] = 10267, [10267] = 10265,
    [10488] = 10490, [10490] = 10488,
    [10489] = 10491, [10491] = 10489
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local window = WINDOWS[item.itemid]
    if(not window or (not getHouseFromPos(getCreaturePosition(cid)) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))) then
        return false
    end

    doTransformItem(item.uid, window)
    return true
end
 
Solution
replace whole script for this

Lua:
local WINDOWS = {
    [6438] = 6436, [6436] = 6438,
    [6439] = 6437, [6437] = 6439,
    [6442] = 6440, [6440] = 6442,
    [6443] = 6441, [6441] = 6443,
    [6446] = 6444, [6444] = 6446,
    [6447] = 6445, [6445] = 6447,
    [6452] = 6450, [6450] = 6452,
    [6453] = 6451, [6451] = 6453,
    [6456] = 6454, [6454] = 6456,
    [6457] = 6455, [6455] = 6457,
    [6460] = 6458, [6458] = 6460,
    [6461] = 6459, [6459] = 6461,
    [6464] = 6462, [6462] = 6464,
    [6465] = 6463, [6463] = 6465,
    [6468] = 6466, [6466] = 6468,
    [6469] = 6467, [6467] = 6469,
    [6472] = 6470, [6470] = 6472,
    [6473] = 6471, [6471] = 6473,
    [6790] = 6788, [6788] = 6790,
    [6791] = 6789, [6789] = 6791,
    [7027] = 7025, [7025] = 7027,
    [7028] = 7026, [7026] = 7028,
    [7031] = 7029, [7029] = 7031,
    [7032] = 7030, [7030] = 7032,
    [10264] = 10266, [10266] = 10264,
    [10265] = 10267, [10267] = 10265,
    [10488] = 10490, [10490] = 10488,
    [10489] = 10491, [10491] = 10489
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local window = WINDOWS[item.itemid]
    if(not window or (not getHouseFromPos(getCreaturePosition(cid)) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))) then
        return false
    end

    doTransformItem(item.uid, window)
    return true
end

Thanks tomorrow after the global save i will test your scrypt on my server with 20-40players on
 
Back
Top