Some LUA Scripts I use

Post Reply
User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Some LUA Scripts I use

Post by tagban » Sun Aug 03, 2014 7:07 pm

These are just a collection of a few scripts I've used on my server, nothing super special, but had a few people asking me about them, so figured I'd share.

@ah -- ah.lua (or auction.lua -- whatever you want the command to be)

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: ah/auction
-- auth: <Unknown> :: Modded by Tagban
-- desc: Sets the players position to specific location (can be added to later).
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 0,
    parameters = "iiii"
};
function onTrigger(player)
	player:sendMenu(3);
end
@aspi -- aspi.lua

Code: Select all

---------------------------------------------------------------------------------------------------
-- func:  @aspi
-- auth: <Unknown> :: Modded by Tagban
-- desc: Sets the players position to specific location (near Aspi pop).
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 1,
    parameters = "iiii"
};
function onTrigger(player, x, y, z, zone)
            player:setPos('20', '-1', '48', '84', '128');
end
General job shop -- On my server each job has its own shop for AF1 and AF3 gear. This is just a general idea for you if you want something like it:
@blm -- blm.lua
The first # is item ID from ffxiah, second # is the price. -- Shops have limitations of how many items can be there.

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: BLM Gear Purchase AF1/AF3
-- auth: <Unknown> :: Modded by Tagban
-- desc: Opens Shop for AF1, AF+1 gear. 
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 0,
    parameters = "iiii"
};
function onTrigger(player)
	
stock = {
11991,6000, -- Wizard's Torque
17423,6000, -- Casting Wand
14092,10000, -- Wizard's Sabots
13964,10000, -- Wizard's Gloves
14217,10000, -- Wizard's Tonban
12641,10000, -- Wizard's Coat
13856,10000, -- Wizard's Petasos
15355,10000, -- Wizard's Sabots+1
14893,10000, -- Wizard's Gloves+1
15564,10000, -- Wizard's Tonban+1
14476,10000, -- Wizard's Coat+1
15228,10000, -- Wizard's Petasos+1
	}
 
showShop(player, STATIC, stock);
end
@fafnir -- fafnir.lua

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: Fafnir
-- auth: <Unknown> :: Modded by Tagban
-- desc: Sets the players position to specific location (Fafnir).
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 1,
    parameters = "iiii"
};
function onTrigger(player, x, y, z, zone) 
            player:setPos('61', '6', '25', '245', '154');
end
@gmisland -- gmisland.lua
Sets player to special island in Jugner Forest not normally accessible. I called it gmisland. :)

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: gmisland
-- auth: <Unknown> :: Modded by Tagban
-- desc: Sets the players position to secret island... muahahaha
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 0,
    parameters = "iiii"
};
function onTrigger(player, x, y, z, zone)
            player:setPos('0', '0', '443', '59', '104');
end
@help -- help.lua
Spits out list of commands (would be possible to separate based on command levels, just by modifying permission values based on use, but I'm lazy)

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: Help Command (Commands List)
-- auth: Tagban
-- desc: Spits out a list of commands (obviously can be changed)
---------------------------------------------------------------------------------------------------

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

function onTrigger(player)
        player:PrintToPlayer("Availible Commands: @zone, @goto, @home, @costume, @ah, @shop, @wallhack, @raise, @regen, @<job code>, @spells");
        player:PrintToPlayer("For complete information: http://www.bnet.cc/ffxi/commands/ -- Ask questions on the forums!");
end
@kb -- kb.lua
Teleports player near King Behemoth

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: kb/behemoth @kb
-- auth: <Unknown> :: Modded by Tagban
-- desc: Sets the players position to specific location (can be added to later).
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 1,
    parameters = "iiii"
};
function onTrigger(player, x, y, z, zone)  
            player:setPos('-262', '-20', '21', '196', '127');
end


As I said in the beginning, nothing terribly special, but I'm also not really in the nature of hiding things, so enjoy if they help! Or hopefully anyone that wanted some custom commands can get some ideas from these. Enjoy!

soulsin
Posts: 102
Joined: Sun Mar 17, 2013 9:06 am

Re: Some LUA Scripts I use

Post by soulsin » Sun Aug 03, 2014 9:40 pm

nice work. the @help would be nice for each lvl of Players/GM commands so they know what can and can not use. But still nice on them all. Even tho I kno most have the NM spawn Command I added few for fun

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: @nm -- Spawns a ton of NMs at once 
-- auth: <Unknown> :: Modded by Tagban
-- desc: Allows GM's to trigger NMs that are commonly requested. Add more if you tell me!
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 5,
    parameters = "iiii"
};
function onTrigger(player)
       SpawnMob('17297441'); -- KB
   SpawnMob('17408018'); -- Fafnir
   SpawnMob('17301538'); -- Aspi
   SpawnMob('17301537'); -- Adamantoise
   SpawnMob('17387866'); -- Morbol
   SpawnMob('17498522'); -- Chary
   SpawnMob('17268851'); -- Deadly Dodo
   SpawnMob('16806215'); -- Xolotl
   SpawnMob('17231971'); -- Nue
       SpawnMob('17404333'); -- Voluptuous Vivian
	   SpawnMob('17281358'); -- Voluptuous Vilma 
   SpawnMob('17645755'); -- Ungur
   SpawnMob('17649731'); -- LoO
   SpawnMob('17199438'); -- VE
   SpawnMob('17228242'); -- Simurgh
   SpawnMob('17244539'); -- Cactrot
   SpawnMob('16806227'); -- Tiamat
   SpawnMob('17461307'); -- Sewer Syrup
   SpawnMob('17596720'); -- Serket
   SpawnMob('16797969') -- Jormungand
   SpawnMob('16912838') -- Jailer_of_Hope
   SpawnMob('16912839') -- Jailer_of_Justice
   SpawnMob('16912848') -- Jailer_of_Love
   SpawnMob('16912876') -- Absolute_Virtue
   SpawnMob('17289575') -- King_Vinegarroon
   SpawnMob('17056168') -- Pandemonium_Warden
   SpawnMob('17109367') -- Dark_Ixion
   
   player:PrintToPlayer( "NM Spawn." );
end
[GM] Soulsin

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Some LUA Scripts I use

Post by tagban » Mon Aug 04, 2014 4:52 pm

Yep, I have NM Spawn commands as well. :) I was working on trying to get Pirates working on the boats.. but I gave up, because the zones seem to have some strange crap going on when pirates actually appear. I got lost and gave up on it.

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: Some LUA Scripts I use

Post by atom0s » Tue Aug 05, 2014 2:46 am

Lua not LUA. :P

Climhazzard
Posts: 3
Joined: Fri May 22, 2015 9:24 pm

Re: Some LUA Scripts I use

Post by Climhazzard » Tue Aug 11, 2015 7:23 am

dude your awesome thnx for some of the ideas :)

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Some LUA Scripts I use

Post by tagban » Thu Aug 13, 2015 9:41 am

Happy to help. My favorite mod I've done is the login announcements when a user gets into the server...

User avatar
tabitaru
Posts: 99
Joined: Sun Apr 12, 2015 4:49 am

Re: Some LUA Scripts I use

Post by tabitaru » Sun Aug 16, 2015 3:46 am

!
Last edited by tabitaru on Sun Oct 18, 2015 7:13 am, edited 1 time in total.

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Some LUA Scripts I use

Post by tagban » Mon Aug 17, 2015 7:05 pm

Sure, although since I never submitted it officially to the project I never cared to udpate that kind of stuff. :) The paremeters are also wrong. But it still works. Just won't do anything regardless of what parameter you put in there.

Post Reply