Jump to content
  • 0

R>monster2 separate size and ai from event label


QQfoolsorellina

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

*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
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

I think the default 'monster' command should be structured like this, tbh.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

It'd work better as:

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

For backwards compatibility. :>

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   46
  • Joined:  11/02/11
  • Last Seen:  

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

Link to comment
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
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.

×
×
  • Create New...