Jump to content
  • 0

R>monster2 separate size and ai from event label


Question

Posted (edited)

*monster2 "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};

"<event label>" paramater : no longer work with size or ai and should check if it's a event name

<size> paramater: 0(small size), 2(MEDIUM size), 4(big size)

<ai> paramater: if value 1 , active the summoned mob ai mode

Edited by QQfoolsorellina

7 answers to this question

Recommended Posts

Posted

I agree, the default monster command should be structured like this. As it is all mobs listed in Mob_db have the same number of columns. So i could effectively summon a Fabre as an MVP so to speak.

Posted

Could you please test this patch that I've done?

The syntax should work like:

*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,<size>, <ai>, "<event label>"};
<size>: 0=small, 1=medium, 2=big
<ai>: 0=off, 1=on

There should be no trouble compiling, since I did it myself and got no errors nor warnings.

However I can't test at the moment, which is why I asked you to do so.

Patch: monster_size_ai.patch

Posted (edited)

Sure.

Can someone try to say if its working? I can only do that tomorrow.

New patch with unsigned type vars and syntax proprosed by OP and Euphy.

monster_size_ai_syntax_nwe.patch

thank for your mode , but after tested it doesn't work for me

as you mention <size>: 0=small, 1=medium, 2=big ,but autually 0 = medium ,1=small,2= big

*monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>};

I feel something wrong about this part

+	if( script_hasdata(st,9) )
+	{
+		if( ( size = script_getnum(st,8) ) > 3 )
+		{
+			ShowWarning("buildin_monster: Invalid size %u while spawning monster class %d\n", size, class_);
+			return 1;
+		}
+	}
+	
+	if( script_hasdata(st,10) )
+	{
+		if( ( ai = script_getnum(st,9) ) > 1 )
+		{
+			ShowWarning("buildin_monster: Invalid ai %u while spawning monster class %d\n", ai, class_);
+			return 1;
+		}
+	}

and

BUILDIN_DEF(monster,"siisii?*"),

I'd deeply appreciate the example , now I know how to create the needed monster script command.

Edited by QQfoolsorellina
Posted

OH f*ck me I totally forgot that. And sorry for the mistakes, I did the parameter modification in a hurry.

Hmm, I thought the sizes were right, I was using this as my reference:

enum size {
   SZ_SMALL = 0,
   SZ_MEDIUM, //1
   SZ_BIG, //2
};

@edit

Should work.

monster_patch.patch

And you should suggest this as the official behavior, it's a great idea :D

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...