• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

onRemoveItem - pomoc

Julek12

Member
Joined
Feb 19, 2008
Messages
167
Reaction score
5
Location
Universe -> Milky Way -> Solar System -> Earth ->
Witam wiem ze tfs 0.3 beta 2 miał funkcje function onRemoveItem(moveitem, tileitem, pos, cid) i tu moje pytanie czy function onRemoveItem(moveitem, tileitem, pos, cid) jest nadal aktualne czy już nie jeśli nie to czy można dodać taki prametr. I jeszcze mam sprawe do elfa czy mógłbyś napisać do mnie na gg albo chociaż pw bo mam pytanie o multi world system:) moje gg 4151791
 
ok ale bez cida też można stosować??
I jeszcze jedno w takim razie skoro jest to czemu nie działa?
Code:
function onRemoveItem(moveitem, tileitem, pos, cid)
    if(moveitem.actionid-100 > 0) and (moveitem.actionid-100 ~= getPlayerGUID(cid))then
        doPlayerSendCancel(cid, 'You aren\'t an owner of this container.')
        doTeleportThing(moveitem.uid, {x=pos.x,y=pos.y,z=pos.z}, TRUE)
    end
    return TRUE
end

Do elfa!
czy mógłbyś napisać do mnie na gg albo chociaż pw bo mam pytanie o multi world system:) moje gg 4151791
 
do movements.xml dodałem
Code:
    <!-- Mine -->
    <movevent type="RemoveItem" itemid="2000" event="script" value="ownbp.lua"/>
Błąd pojawia się gdy nie właścicielem backpacka chce go przesunąć. Oryginal temat http://forum.otsy.pl/talk-tfs0-3beta2-prawdziwy-wlasny-bp-na-loot-t-5401.html

Błedy mam taki
Code:
[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found

[22/03/2009 17:37:05] Lua Script Error: [MoveEvents Interface] 
[22/03/2009 17:37:05] data/movements/scripts/ownbp.lua:onRemoveItem

[22/03/2009 17:37:05] luaDoPlayerSendCancel(). Player not found
[22/03/2009 17:37:05] [Error - MoveEvent::executeAddRemItem] Call stack overflow.
Ale i tak wlasciciel moze przesunac a inna osoba nie moze ale czy muszą być te błędy?

Gdy usunę linie
Code:
doTeleportThing(moveitem.uid, {x=pos.x,y=pos.y,z=pos.z}, TRUE)
To nie ma błędów ale moge przesuwać;/
 
Last edited:
PHP:
function onRemoveItem(moveItem, tileItem, position, cid)
    if (moveItem.actionid - 100 > 0) and (moveItem.actionid - 100 ~= getPlayerGUID(cid)) and (cid ~= 0) then
        doPlayerSendCancel(cid, "You aren't an owner of this container.")
        doTeleportThing(moveItem.uid, position, TRUE)
    end
    return TRUE
end
Teraz błędów nie będzie ;]
Ten backpack nie jest dobrym pomysłem, można nim zarzucać moby itd.
 
Last edited:
Przykład:
Robisz plecak i rzucasz go na dopiero co zabitego Demona gracza X. On nie może poruszyć plecaka. Ty czekasz 10 sekund, po czym zgarniasz MMS, który był w loocie.
 
Back
Top