Spawning on the grid , more then 1 at once plus x/y

Naruto

New member
Messages
174
Points
0
Hi I was working on another skill for a bit today

I wanted to get certain mobs to spawn in certain squares... 

giphy.gif


I managed to make a skill that places an area similar to cultivation from creator

I couldnt figure out any other way to get them to spawn how I wanted but this should suffice...

Switching it to target and NOT GROUND PLACED might take a bit of tweaking though this is a PLACE skill

skill.c

case CL_MAGGOT:
int md1 = mob->once_spawn_sub(src, src->m, x-5, y, clif->get_bl_name(src), 1005, "", SZ_SMALL, AI_NONE);
int md2 = mob->once_spawn_sub(src, src->m, x+5, y, clif->get_bl_name(src), 1005, "", SZ_SMALL, AI_NONE);
int md3 = mob->once_spawn_sub(src, src->m, x, y-5, clif->get_bl_name(src), 1005, "", SZ_SMALL, AI_NONE);
int md4 = mob->once_spawn_sub(src, src->m, x, y+5, clif->get_bl_name(src), 1005, "", SZ_SMALL, AI_NONE);
mob->spawn (md1);
mob->spawn (md2);
mob->spawn (md3);
mob->spawn (md4);
break;


I just declared a bunch of stuff, gave them numbers, you can name them whatever you want

as you can see where it casts, it spawns enemies about 5 cells in 4 directions from the targeted location, again, this is a PLACE skill

1005 is my monster ID,

feel free to change the SZ_ and AI_ to whatever you want

AI_ATTACK is your personal friendly summons

and skill.db

{
Id: 1614
Name: "CL_MAGGOT"
Description: "Spawn Maggots"
MaxLevel: 1
Range: 12
Hit: "BDT_SKILL"
SkillType: {
Place: true
}
DamageType: {
NoDamage: true
}
SkillData1: 300000
CoolDown: 0
Requirements: {
SPCost: 10
}
},


:poporing:

ps : 

If you want them to follow you i think you just need this

md->master_id = sd->bl.id;


I dont know how to use it though as of the time I am writing this

 
Last edited by a moderator:
Back
Top