Jump to content
  • 0

About Area Healing


Fahhad

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   5
  • Joined:  07/01/14
  • Last Seen:  

Hi , can i ask how to make this script repair items and identify them with the same area?

 

 

amatsu,235,237,4    script    healer    925,{
    end;
OnInit:
OnTimer5000:
    initnpctimer;
    getmapxy(.@m$,.@x,.@y,1,strnpcinfo(0));
    areapercentheal .@m$,.@x-15,.@y-15,.@x+15,.@y+15,100,100;
    end;
}
 

 

thanks in advance /no1 .

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


amatsu,235,237,4 script healer 925,{

end;

OnInit:

freeloop(1);

getmapxy( .m$, .x, .y, 1, strnpcinfo(0) );

OnTimer5000:

initnpctimer;

addrid( 4, 0, .x-15, .y-15, .x+15, .y+15 );

if( playerattached() ) {

getinventorylist;

.@len = @inventorylist_count;

copyarray .@inventorylist_id, @inventorylist_id, .@len;

copyarray .@inventorylist_identify, @inventorylist_identify, .@len;

for ( .@j = 0; .@j < .@len; .@j++ ) {

if ( !.@inventorylist_identify[.@j] ) {

delitem2 .@inventorylist_id[.@j], 1, 0, 0, 0, 0, 0, 0, 0;

getitem .@inventorylist_id[.@j], 1;

}

}

if( HP < MAXHP ) {

specialeffect2 EF_HEAL2;

percentheal 100, 100;

}

repairall;

}

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   5
  • Joined:  07/01/14
  • Last Seen:  

amatsu,235,237,4    script    healer    925,{
	end;
OnInit:
	freeloop(1);
	getmapxy( .m$, .x, .y, 1, strnpcinfo(0) );
OnTimer5000:
	initnpctimer;
	addrid( 4, 0, .x-15, .y-15, .x+15, .y+15 );
	if( playerattached() ) {
		getinventorylist;
		.@len = @inventorylist_count;
		copyarray .@inventorylist_id, @inventorylist_id, .@len;
		copyarray .@inventorylist_identify, @inventorylist_identify, .@len;
		for ( .@j = 0; .@j < .@len; set .@j++ ) {
			if ( !.@inventorylist_identify[.@j] ) {
				delitem2 .@inventorylist_id[.@j], 1, 0, 0, 0, 0, 0, 0, 0;
				getitem .@inventorylist_id[.@j], 1;
			}
		}
		percentheal 100, 100;
		repairall;
	}
}

 

[Error]:  Loading NPC file: npc/custom/area.txt
script error on npc/custom/area.txt line 13
    parse_callfunc: not enough arguments, expected ','
     8 :        addrid( 4, 0, .x-15, .y-15, .x+15, .y+15 );
     9 :        getinventorylist;
    10 :        .@len = @inventorylist_count;
    11 :        copyarray .@inventorylist_id, @inventorylist_id, .@len;
    12 :        copyarray .@inventorylist_identify, @inventorylist_identify, .@len;
*   13 :        for ( .@j = 0; .@j < .@len; set .@j++ ')' {
    14 :                if ( !.@inventorylist_identify[.@j] ) {
    15 :                        delitem2 .@inventorylist_id[.@j], 1, 0, 0, 0, 0, 0, 0, 0;
    16 :                        getitem .@inventorylist_id[.@j], 1;
    17 :                }
    18 :        }

 

getting this error

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

getting this error

 

 

Just remove set from that line.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   5
  • Joined:  07/01/14
  • Last Seen:  

 

 

getting this error

 

 

Just remove set from that line.

 

 

 

doesnt work , with no error , and it doesnt heal anymore, before it was healing

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

doesnt work , with no error , and it doesnt heal anymore, before it was healing

 

 

I've tested it and it is working... I recommend using rAthena if you aren't already.

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