Jump to content
  • 0

Question

Posted

So, I have an idea on how to do it, but I'm still getting used to rathena again, so just to check if anyone has something similar before I crack my brain into this.

 

In the cpp file:

 

I want to cast a skill that will spawn a poring, 2 cells from where the caster is, this poring will be frozen and in the second he spawns he will start casting something for 3 seconds (basicly just a timer above his head), after this he will die and a random mob will spawn from a certain array of mobs defined by me. If the poring dies in the middle, nothing will be spawned. I think I will use something like this:

 

If anyone can help me by anymeans or tell me if its impossible, I would be very appreciated.

 

int x = 0, y = 0, i = 0, master = 0;
		struct map_session_data* pl_sd = NULL;

		master = sd->bl.id;
		
		do {
			x = sd->bl.x + (rnd() % 10 - 5);
			y = sd->bl.y + (rnd() % 10 - 5);
		} while (map_getcell(sd->bl.m, x, y, CELL_CHKNOPASS) && i++ < 10);

		if (i >= 10) {
			x = sd->bl.x;
			y = sd->bl.y;
		}

 

2 answers to this question

Recommended Posts

  • 0
Posted

Try thinking of it this way:

AM_CANNIBALIZE summons a plant monster.

NPC_METAMORPHOSIS is a monster skill that spawns a monster from another monster (think Mi Gao).

So, try using what AM_CANNIBALIZE does, summon a monster that has a skill like NPC_METAMORPHOSIS.

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...