• 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!

Strange delay when using items (depotchest etc)

Rickolajten

Member
Joined
Jul 21, 2008
Messages
175
Reaction score
16
Hi!

I'm using 04 rev 3884 and i have this extremely strange thing happening.
When i'm using stuff, like opening my backpack there is this 0,5 second delay, same with the depotchest. (not the locker whom holds the depotchest inside, that works along with alot of other stuff)

Same if i summon a cyclops and kill it, i can loot it immidieatly, but if it drops a bag, it takes 0,5 seconds to open that bag.. so it seem to be something with the containers.

Any idea where i might start?
 
lua]
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'help') then
if getPlayerStorageValue(cid,45008) == 1 then
selfSay('Oh you, thank you for helping me.', cid)
else
selfSay('Those rotworms attacked me and ate my {jacket}, can you please bring it back?', cid)
talkState[talkUser] = 1
end
elseif msgcontains(msg, 'jacket') and talkState[talkUser] == 1 then
if getPlayerItemCount(cid, 10363,1) == 1 then
doPlayerRemoveItem(cid, 10363, 1)
setPlayerStorageValue(cid, 45008, 1)
doPlayerAddExp(cid, 4235)
doPlayerAddItem(cid, 2152, 12)
selfSay('Thank you, take those coins and may your soul be drained when you die.', cid)
talkState[talkUser] = 0
 

Similar threads

Back
Top