Jump to content
Sign in to follow this  
Naruto

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

Recommended Posts

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

Edited by Naruto

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.