how add a command is @shop?
how add a command is @shop?
how add a command is @shop? and can in where open shop and buy/sell item.
Re: how add a command is @shop?
Place attached file into your \scripts\commands folder.
Updated, see new post below.
You can edit the file to change the shop contents. I may later try to create a version that calls existing NPC shops. This version was thrown together just to see if this would work without an actual NPC. Its a quick and messy copy pasta job.
Updated, see new post below.
You can edit the file to change the shop contents. I may later try to create a version that calls existing NPC shops. This version was thrown together just to see if this would work without an actual NPC. Its a quick and messy copy pasta job.
Last edited by TeoTwawki on Tue Aug 05, 2014 11:45 am, edited 2 times in total.
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: how add a command is @shop?
Thank you very much
Re: how add a command is @shop?
Updated.
I had originally left a lot of unneeded junk in the script because I intended to try and call existing NPC shop scripts, but I decided that is unnecessarily complicated for what it would accomplish and wouldn't really be a popular feature, so instead I've given the command a page parameter and included a heavily edited example called @mogshop with conditional branches. The examples are based on mission status.
You'll see near the bottom some commented out code. This was from my experimenting with a spoofed chat packet to actually make it appear as if a Moogle NPC shop were speaking. This worked but was capable of crashing the server if the command were called in the mog house, so I replaced it with system messages via PrintToPlayer.
I had originally left a lot of unneeded junk in the script because I intended to try and call existing NPC shop scripts, but I decided that is unnecessarily complicated for what it would accomplish and wouldn't really be a popular feature, so instead I've given the command a page parameter and included a heavily edited example called @mogshop with conditional branches. The examples are based on mission status.
You'll see near the bottom some commented out code. This was from my experimenting with a spoofed chat packet to actually make it appear as if a Moogle NPC shop were speaking. This worked but was capable of crashing the server if the command were called in the mog house, so I replaced it with system messages via PrintToPlayer.
- Attachments
-
- GM command shops.7z
- (2.11 KiB) Downloaded 1012 times
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: how add a command is @shop?
I've been trying to find the @ah command to add to my server. The shop command is nice, I at least understand how to customize it. Thanks.
Re: how add a command is @shop?
Scriptic wrote:I've been trying to find the @ah command to add to my server. The shop command is nice, I at least understand how to customize it. Thanks.
Code: Select all
---------------------------------------------------------------------------------------------------
-- func: @ah
-- auth: forgottenandlost
-- desc: opens the Auction House menu anywhere in the world just to see if we can
---------------------------------------------------------------------------------------------------
cmdprops =
{
permission = 1,
parameters = ""
};
function onTrigger(player,npc)
player:sendMenu(3);
end;
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: how add a command is @shop?
P.s.
Kj recently updated the packet so a single shop page can now hold up to 50 entries, rather than maxing out at 16 (the client caps it at 50, server side is technically not capped at all).
Kj recently updated the packet so a single shop page can now hold up to 50 entries, rather than maxing out at 16 (the client caps it at 50, server side is technically not capped at all).
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: how add a command is @shop?
Nice. Forgive me if this should be self explanatory but I saved the @ah info as a .lua file and put it in my commands folder like the shop. Tried it and it didn't work, am I supposed to populate the file with items or is it supposed to open the AH menu as if I was standing there? Still learning to script in my spare time, just figured I'd ask.
Edit: By the way, this isn't something I absolutely need to have but it is a clever idea.
Edit: By the way, this isn't something I absolutely need to have but it is a clever idea.
Re: how add a command is @shop?
Need more info than "didn't work". Look at your server console log while trying to use it. Works as is on my server right now, it just pulls up the AH menu as if I went into town and clicked the AH counter.Scriptic wrote:Nice. Forgive me if this should be self explanatory but I saved the @ah info as a .lua file and put it in my commands folder like the shop. Tried it and it didn't work, am I supposed to populate the file with items or is it supposed to open the AH menu as if I was standing there? Still learning to script in my spare time, just figured I'd ask.
Edit: By the way, this isn't something I absolutely need to have but it is a clever idea.
Hi, I run The Demiurge server.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGSPLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
Re: how add a command is @shop?
Your probably not a GM, make sure your least a GM level 1 in Navicat. Can find this in the "chars" table at the very end. Will require a server restart and then do "@ah"