Quote:
Originally Posted by sapir619
It's been a while since I wrote anything in lua but I'll try anyway, my advice to you is to try to add 1 more row to your script, dlg_show():
function get_module_name()
return "NPC_custom"
end
function cookietestscript()
dlg_title( "Test salesman" )
dlg_text( "Welcome, I sell a variety of useful items." )
dlg_menu( "Store", 'open_market("cookietestmarket")' )
dlg_menu( "Goodbye", '' )
dlg_show()
end
GL
|
Awesome! This fixed it!
How silly that it just wasn't showing because it was never commanded to.
Just for the record: the edit suggested by Dark Blaze was not necessary to make it work. function get_module_name() can return "NPC_custom". I guess it refers to the lua file name like i first thought.
Quote:
Originally Posted by ThunderNikk
Are you running on ela or lua
If you are loading the rest of your scripts as lua then you don't need to compress it.
|
You are right. i don't need to compress it
I guess the compression is used only when you make your server available over internet and don't want files stolen. But i'm not there yet.
i always compressed it because the initial server files had the lua and compressed files. So i thought it was mandatory.
================================================== ======================
Sadly this is not the end of the problem. The NPC works but when i open the store nothing happens. Does something other need to be done except open_market command and adding the market in marketresource?
marketresource name points to the open_market(name) right? MarketResource doesn't need client dumping because of possible exploit right?
UPDATE
changing the store ID to an existing store works
changing an item in that store in the database does not do anything
=> does this mean the marketresource needs to be dumped in the client? But isn't that an amazing exploit if you can just change stores client side?
I also remember reading somewhere in the forum that marketresource does not need to be client dumped... the RDB tool also doesn't have any database structure for it...
Can anyone give me a hint before i waste a ton of time on this little thing?