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

Solved How to create shop window without npchandler?

whitevo

Feeling good, thats what I do.
Joined
Jan 2, 2015
Messages
3,454
Solutions
1
Reaction score
627
Location
Estonia
Currently I still cant delete old npc system from lib folder, because I have no clue how can I create the trade window without it.

Half of the functions what are used in these scripts do not exist in luascript.cpp nor cant find any of these functions in lib folder.

What function creates the window to right side of the screen?

openShopWindow(cid, itemlist, onBuy, onSell)
also where can I find this function??

And how to close that trade window without pressing button?
Currently player could keep trade window open forever and sell items while farming monsters xD
 
OMG, TY!
This file answers all my questions :D

EDIT:

most of the times closeShopWindow(player:getId()) does not work.
Why is that?

this is not working either:
Npc(UnpcName):closeShopWindow(player)

Sometimes they do work, but most of the time they don't.. why?? >.>
 
Last edited:
seems the current solution to my problem is something stupid like this, but at least it works:
Code:
for x=1, 100 do
closeShopWindow(player:getId())
end

Hopefully one day I figure out how to make it work without loop.
 
Grr.. even spamming in loop that function sometimes leaves it open >.>
What is it with that function!! Why it doesn't work??

ok. addEvent with that function did that trick.
 
Back
Top