Jump to content
  • 0

summongroup


brunoshp

Question


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.01
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

How i use summongroup in script? 

summongroup "1",1002,5000; 

not summon!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

It's not a basic script command.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.01
  • Content Count:  180
  • Reputation:   7
  • Joined:  12/19/12
  • Last Seen:  

see this.

+BUILDIN_FUNC(factionguardian)
+{
+	int _class, timeout=0;
+	const char *str,*event="";
+	TBL_PC *sd;
+	struct mob_data *md;
+	int tick = gettick();
+
+	sd=script_rid2sd(st);
+	if (!sd) return 0;
+	
+	str	=script_getstr(st,2);
+	_class=script_getnum(st,3);
+	if( script_hasdata(st,4) )
+		timeout=script_getnum(st,4);
+	if( script_hasdata(st,5) ){
+		event=script_getstr(st,5);
+		check_event(st, event);
+	}
+
+	clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
+
+	md = mob_once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event);
+	if (md) {
+		md->master_id=pc_getfaction(sd);
+		md->special_state.ai=1;
+		//if( md->deletetimer != INVALID_TIMER )
+		//	delete_timer(md->deletetimer, mob_timer_delete);
+		//md->deletetimer = add_timer(tick+(timeout>0?timeout*1000:60000),mob_timer_delete,md->bl.id,0);
+		mob_spawn (md); //Now it is ready for spawning.
+		clif_misceffect2(&md->bl,344);
+		sc_start4(&md->bl, SC_MODECHANGE, 100, 1, 0, MD_AGGRESSIVE, 0, 60000);
+	}
+	return 0;
+}

 and  summom monster with :  factionguardian "Faction1",1002;

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