Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Automatic launch of the event

Newbie Spellweaver
Joined
Aug 1, 2014
Messages
26
Reaction score
10
Hello everyone I wrote an event using LUA and it works great, creates NPCs with certain coordinates. Who has encountered, tell me how you can link the creation of an NPC to a specific location and make the event script automatically run? Now I have to run the event on my own using the /gm ? pcall command.

I spent a lot of time trying to find a solution, but I couldn't find it :(
 
Junior Spellweaver
Joined
Sep 29, 2014
Messages
149
Reaction score
66
Hello,

I´m not going into details, but you can make scripts run/work using invisible props. If you have the gm addon, there is a obj_edit addon within it, that can make invisible objects visible. If you turn that on, you will notice that many server scripts/quests/events etc are working like this. Invis obj that is being triggered via player input (i.e. clickling it, moving over it......).

Ofc this is only 1 way to find a solution for your requests, others might be willing/able to explain a detailed way or give different input.
 
Upvote 0
Elite Diviner
Joined
Sep 12, 2020
Messages
442
Reaction score
224
if you look at my boss fight you notice did exactly that with the Barriers in and out of the each boss ....
https://forum.ragezone.com/threads/boss-skills.1221096/

here i use 781537 to spawn the wall barriers when the npc is triggered and here you see i create also a Controller NPC that is Invisible and he starts the fight not the boss this way if it does not get finished then the boss fight is easily cleaned up and starts over, I cant take credit for this FHT pointed me in the right direction, but thanks to him i finished most of my bosses .... just the barriers as for the fight getting the Buffs and the way they should work still is driving me NUTS. but when i can would be easy to add..

adding this to your lua script ties it all together
Code:
-- Flags
local g_FlagID              = {};
g_FlagID.FlagID             = 781537;   -- B2 flag
g_FlagID.Boss               = 0;        -- Boss location
g_FlagID.BeforeDoor         = 1;        -- Barrier before boss location
g_FlagID.AfterDoor          = 2;        -- Barrier after boss location

as you can see the controller has the invisible flag marked 1 , after that all you need to do is spawn the controller and everything should appear including the boss in NPCData (GlobalDB)

1707359252463 - Automatic launch of the event - RaGEZONE Forums

1707358807064 - Automatic launch of the event - RaGEZONE Forums



I hope this helps
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Back
Top