Page 1 of 1

All Mob LUAs

Posted: Sat Jan 05, 2013 10:36 am
by brawndo
Hi there,

In order to speed up time for myself, I created a script to automatically create a basic LUA script for each mob in each zone. It contains the zone, zone id, mob name, and empty 'onMobX' functions. If the mob's lua was already created, I skipped it. Below is an example of the template.

Code: Select all


-----------------------------------
--  Area: Al Zahbi (48)
--   Mob: Acrolith
-----------------------------------

-- require("scripts/zones/Al_Zahbi/MobIDs");

-----------------------------------
-- onMobInitialize
-----------------------------------

function onMobInitialize(mob)	
end;

-----------------------------------
-- onMobSpawn
-----------------------------------

function onMobSpawn(mob)	
end;

-----------------------------------
-- onMobEngaged
-----------------------------------

function onMobEngaged(mob,target)	
end;

-----------------------------------
-- onMobFight
-----------------------------------

function onMobFight(mob,target)	
end;

-----------------------------------
-- onMobDeath
-----------------------------------

function onMobDeath(mob,killer)	
end;

Due to the fact most mobs probably won't need a LUA, I'm unsure as to whether it should be committed. Until then you can download the attached zip file and save yourself some time creating the LUAs.

Re: All Mob LUAs

Posted: Sat Jan 05, 2013 3:14 pm
by diatanato
скрипты выполняются только для NMs. для простых монстров это не будет работать.

Re: All Mob LUAs

Posted: Sat Jan 05, 2013 6:00 pm
by PrBlahBlahtson
diatanato wrote:scripts are executed only for NMs. for a monster that will not work.
What about how FoV is handled? Those seem to work. Example: /zones/Rolanberry_Fields/mobs/Berry_Grub.lua

Re: All Mob LUAs

Posted: Sat Jan 05, 2013 6:07 pm
by Vanyel
I don't know that he meant the lua won't work, I think he might have meant more that it's not a good way to do it.

Re: All Mob LUAs

Posted: Mon Jan 07, 2013 4:20 am
by Ezekyel
onMobFight is only for NM, other function works for all mobs i think

Re: All Mob LUAs

Posted: Mon Jan 07, 2013 7:34 am
by brawndo
This was only meant to save people time creating LUAs. I put all the 'onMob' functions because its easier to take what you need and delete the rest. Either way it saves time and standardizes the mob LUAs.

So far its been saving me a lot of time.

Re: All Mob LUAs

Posted: Thu Jan 10, 2013 11:28 am
by mvd1987
i will put all the lua's in my server and we will screw around withh and will let you know how they work.

all mobs can use lua's only some need some parts.

thanx on all your work on this :) im adding all mobs to the project so this wil come in hand

greetings michael