A few things I'm hoping to find help with (open door commands etc)

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Tue Apr 23, 2019 10:08 pm

I created my own server and I'm looking to add a few things that I've seen around other places.

Is there any chance anyone can help me with the following:

1) A script to open all doors etc when anyone types !open

2) A player can free warp to their HP once every hour or so using the command !hp

3) New characters are given a server linkshell upon character creation. (i did find a guide here on this, but it was several years old and didn't work?)

4) Mog house functions (storage/dbox etc) in towns using a command such as !mog

5) How to remove craft guild test requirements for every 10 levels and also how to allow all crafts to 100

6) Also !capskill 51 (goldsmithing) for example does not work. Is there any way to cap crafts like you can other skills?

If anyone can help with any/all of these that'd be greatly appreciated. Thanks

Delaide
Posts: 472
Joined: Sat Jun 14, 2014 8:58 am

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Delaide » Wed Apr 24, 2019 2:40 am

Sorry, the only one I can answer is the 100 cap.
DSP currently allows all to max level with no changes needed. It does not have the main crafting skill only restriction.

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Wed Apr 24, 2019 8:17 am

Thanks, didn't realise that. Just need to find out how to remove the cap every 10 levels. I've seen another server where they said they run a script that unlocks the caps every 10 levels if you've got even 0.1 skill in a craft.

User avatar
whasf
Site Admin
Posts: 1287
Joined: Thu Jul 19, 2012 9:11 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by whasf » Wed Apr 24, 2019 9:01 am

Skyballer wrote:
Tue Apr 23, 2019 10:08 pm
I created my own server and I'm looking to add a few things that I've seen around other places.

Is there any chance anyone can help me with the following:

1) A script to open all doors etc when anyone types !open
Create a script to set the animation ID for the door that makes it open. I'm sure if you find a door that requires the user to click on something (or trade something) you can see how it's done.
Skyballer wrote:
2) A player can free warp to their HP once every hour or so using the command !hp
Create a script that makes a char_var with a timestamp, then compare that timestamp to the current time and allow the warp if at least an hour has passed
Skyballer wrote: 3) New characters are given a server linkshell upon character creation. (i did find a guide here on this, but it was several years old and didn't work?)
I think you can add it in player.lua
Skyballer wrote: 4) Mog house functions (storage/dbox etc) in towns using a command such as !mog
Create a script to send the mog house menu to the player
Skyballer wrote: If anyone can help with any/all of these that'd be greatly appreciated. Thanks
Answered! :)
-- Whasf

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Wed Apr 24, 2019 9:27 am

Appreciate the replies but I have no idea how to create any of these scripts, my knowledge of lua is not great, i'm learning as I go.

If you can help with one then maybe I can get an idea of what I'm looking at?

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Wed Apr 24, 2019 10:05 am

Ok, so I got a !warp command working by editing the !homepoint command on a new lua called warp using this code:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = "s"
};

function error(player, msg)
    player:PrintToPlayer(msg);
    player:PrintToPlayer("!warp {player}");
end;

function onTrigger(player, target)
    -- validate target
    local targ;
    if (target == nil) then
        targ = player;
    end
	targ:warp();
    if (targ:getID() ~= player:getID()) then
        player:PrintToPlayer(string.format("Sent %s to their homepoint.",targ:getName()));
    end
end


But how do I add a cooldown of 1 hour to it? XD

User avatar
whasf
Site Admin
Posts: 1287
Joined: Thu Jul 19, 2012 9:11 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by whasf » Wed Apr 24, 2019 10:38 am

Skyballer wrote:
Wed Apr 24, 2019 10:05 am
Ok, so I got a !warp command working by editing the !homepoint command on a new lua called warp using this code:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = "s"
};

function error(player, msg)
    player:PrintToPlayer(msg);
    player:PrintToPlayer("!warp {player}");
end;

function onTrigger(player, target)
    -- validate target
    local targ;
    if (target == nil) then
        targ = player;
    end
	targ:warp();
    if (targ:getID() ~= player:getID()) then
        player:PrintToPlayer(string.format("Sent %s to their homepoint.",targ:getName()));
    end
end


But how do I add a cooldown of 1 hour to it? XD
Read up on how to get the current OS date&time in lua, then save the timestamp of when they use the command, and have it compare current date&time to when they last used it

You'll be creating complex scripts in no time ;)
-- Whasf

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Wed Apr 24, 2019 12:17 pm

Can you point me in the direction of where to read up on lua code for timestamps and also other things specific to FFXI like opening the MH menu so I can try do this? I don't mind putting in the work but I can't seem to find the info relevant to FFXI specifically.

For example, there is 100's of lua files in the DSP folder, I could spend weeks trying to find any code relating to opening the MH menu or saving time stamps.

Thanks

**to add, i believe this will get the MH menu up, was just comparing the ah.lua:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = ""
};

function onTrigger(player)
    player:sendMenu(1)
end;
But again, like the more technical part of the !warp lua i am trying to make (adding time check) i can't see how to add a check if the player is in a city.

Skyballer
Posts: 9
Joined: Tue Apr 23, 2019 9:59 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by Skyballer » Wed Apr 24, 2019 2:02 pm

been trying to work with dsp.zoneType but that's not doing anything? any ideas?

User avatar
whasf
Site Admin
Posts: 1287
Joined: Thu Jul 19, 2012 9:11 pm

Re: A few things I'm hoping to find help with (open door commands etc)

Post by whasf » Wed Apr 24, 2019 7:03 pm

Skyballer wrote:
Wed Apr 24, 2019 12:17 pm
Can you point me in the direction of where to read up on lua code for timestamps and also other things specific to FFXI like opening the MH menu so I can try do this? I don't mind putting in the work but I can't seem to find the info relevant to FFXI specifically.

For example, there is 100's of lua files in the DSP folder, I could spend weeks trying to find any code relating to opening the MH menu or saving time stamps.

Thanks

**to add, i believe this will get the MH menu up, was just comparing the ah.lua:

Code: Select all

cmdprops =
{
    permission = 0,
    parameters = ""
};

function onTrigger(player)
    player:sendMenu(1)
end;
But again, like the more technical part of the !warp lua i am trying to make (adding time check) i can't see how to add a check if the player is in a city.
Lua os.time search
os.difftime
-- Whasf

Post Reply