Jump to content
  • 0

Customizing Landprotector


chowking

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  178
  • Reputation:   16
  • Joined:  06/25/12
  • Last Seen:  

i've recently edited the source of spider web following martin's mod

 

http://rathena.org/board/topic/53901-how-to-make-spider-web-works-like-ankle-snare-and-soul-link-that-adds-max-hp/

 

edited it a little. 

 

the spider web will be target to the ground and act as a trap, so when a player steps on it , a timer that restricts a character's movement (can't move but can still use skill) . i'm missing a mod where, when Landprotector is casted on the spider web it also removes the status timer of the player. here's the code 

 

starting at line 11427

case UNT_SPIDERWEB:
			if(sg->val2==0 && tsc){
				int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
					if( status_change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,sec, tick) ) {
						const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
					if (td) sec = DIFF_TICK(td->tick, tick);
					unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
					clif_fixpos(bl);
					sg->val2=bl->id;
					}
					else
						sec = 20;
			}
				break;
Edited by chowking
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Add something in skill_delunit.

When your unit is being deleted stop the associate status foreachinrange.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

inf2 field in skill_db.txt controls this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  178
  • Reputation:   16
  • Joined:  06/25/12
  • Last Seen:  

thanks for the fast rep, i'll try it right away

 

nothing works in inf2

Edited by chowking
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  178
  • Reputation:   16
  • Joined:  06/25/12
  • Last Seen:  

at long last i did it thank you lighta i just needed to add this, just directly copied ankle snare LOL!

in src/map/skill.c

case HT_ANKLESNARE: {	struct block_list* target = map_id2bl(group->val2);	if( target )		status_change_end(target, SC_ANKLE, INVALID_TIMER);}break;+case PF_SPIDERWEB: {+	struct block_list* target = map_id2bl(group->val2);+	if( target)+	status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);+}+break;
Edited by chowking
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  


case HT_ANKLESNARE: {	struct block_list* target = map_id2bl(group->val2);	if( target )		status_change_end(target, SC_ANKLE, INVALID_TIMER);}break;+case PF_SPIDERWEB: {+	struct block_list* target = map_id2bl(group->val2);+	if( target)+	status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);+}+break;

can I ask which line should u input this?

already fix the problem thnx chowking

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  12/13/12
  • Last Seen:  

Hi sir, I'm having error on 

 

 

i've recently edited the source of spider web following martin's mod

 

http://rathena.org/board/topic/53901-how-to-make-spider-web-works-like-ankle-snare-and-soul-link-that-adds-max-hp/

 

edited it a little. 

 

the spider web will be target to the ground and act as a trap, so when a player steps on it , a timer that restricts a character's movement (can't move but can still use skill) . i'm missing a mod where, when Landprotector is casted on the spider web it also removes the status timer of the player. here's the code 

 

starting at line 11427

case UNT_SPIDERWEB:
			if(sg->val2==0 && tsc){
				int sec = skill_get_time2(sg->skill_id,sg->skill_lv);
					if( status_change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,sec, tick) ) {
						const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
					if (td) sec = DIFF_TICK(td->tick, tick);
					unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
					clif_fixpos(bl);
					sg->val2=bl->id;
					}
					else
						sec = 20;
			}
				break;

 this need help.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  178
  • Reputation:   16
  • Joined:  06/25/12
  • Last Seen:  

Hi sir, I'm having error on

 

 

could you please your error from compiler?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  134
  • Reputation:   4
  • Joined:  06/14/12
  • Last Seen:  

BUMP! :) How do you fixed the problem I already tried this : 

 

at long last i did it thank you lighta i just needed to add this, just directly copied ankle snare LOL!

in src/map/skill.c

case HT_ANKLESNARE: {	struct block_list* target = map_id2bl(group->val2);	if( target )		status_change_end(target, SC_ANKLE, INVALID_TIMER);}break;+case PF_SPIDERWEB: {+	struct block_list* target = map_id2bl(group->val2);+	if( target)+	status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);+}+break;

 

 

And yet i can deploy the spider web on the ground :) Howd you fixed it?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   2
  • Joined:  03/24/14
  • Last Seen:  

at long last i did it thank you lighta i just needed to add this, just directly copied ankle snare LOL!

in src/map/skill.c

case HT_ANKLESNARE: {	struct block_list* target = map_id2bl(group->val2);	if( target )		status_change_end(target, SC_ANKLE, INVALID_TIMER);}break;+case PF_SPIDERWEB: {+	struct block_list* target = map_id2bl(group->val2);+	if( target)+	status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);+}+break;

 

sir how did you fix this? im having an error when i compile it.

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