All Mob LUAs

Post Reply
brawndo
Posts: 11
Joined: Sun Jul 22, 2012 1:15 pm

All Mob LUAs

Post by brawndo » Sat Jan 05, 2013 10:36 am

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.
Attachments
scripts.zip
Newly created mob LUAs
(4.24 MiB) Downloaded 50 times

User avatar
diatanato
Developer
Posts: 112
Joined: Thu Aug 30, 2012 9:59 pm

Re: All Mob LUAs

Post by diatanato » Sat Jan 05, 2013 3:14 pm

скрипты выполняются только для NMs. для простых монстров это не будет работать.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: All Mob LUAs

Post by PrBlahBlahtson » Sat Jan 05, 2013 6:00 pm

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

Vanyel
Posts: 31
Joined: Sun Jul 22, 2012 10:58 am
Location: New Brunswick, Canada

Re: All Mob LUAs

Post by Vanyel » Sat Jan 05, 2013 6:07 pm

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.

Ezekyel
Developer
Posts: 62
Joined: Sat Jul 21, 2012 11:42 pm

Re: All Mob LUAs

Post by Ezekyel » Mon Jan 07, 2013 4:20 am

onMobFight is only for NM, other function works for all mobs i think
New Gilgamesh Server --> http://gilgamesh.servegame.com

brawndo
Posts: 11
Joined: Sun Jul 22, 2012 1:15 pm

Re: All Mob LUAs

Post by brawndo » Mon Jan 07, 2013 7:34 am

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.

mvd1987
Posts: 112
Joined: Wed Oct 17, 2012 8:36 am

Re: All Mob LUAs

Post by mvd1987 » Thu Jan 10, 2013 11:28 am

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
Owner/GMLeader mvd1987/michaelvandun Fantasy World International Server

Post Reply