Jump to content
  • 0

Request for @recallmap


lirycjames

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

Hi everyone!!

 

requesting for @recallmap commands

 

Thanks!  :D  :D

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

The delay is because of the update delay of char.last_map

try

-	script	atcmd_examplere	-1,{
OnInit:
	bindatcmd "recallmap",strnpcinfo(3)+"::OnAtcommand",60,60;
	end;
OnAtcommand:
	getmapxy .map_self$, .x_self, .y_self, 0;
	.myname$ = strcharinfo(0);
	.count = 0;
	addrid 0;
	if ( strcharinfo(3) == .map_self$ && strcharinfo(0) != .myname$ ) {
		message strcharinfo(0), "You have been recalled by "+ .myname$ +".";
		warp .map_self$, .x_self, .y_self;
		.count++;
	}
	if ( strcharinfo(0) != .myname$ ) end;
	sleep2 10;
	if ( .count == 0 )
		message strcharinfo(0), "There is none player on this map except you.";
	else
		message strcharinfo(0), .count +" player(s) recalled.";
	end;
}

 


 

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

or try

-	script	atcmd_examplere	-1,{
OnInit:
	bindatcmd "recallmap",strnpcinfo(3)+"::OnAtcommand",60,60;
	end;
OnAtcommand:
	.@count = query_sql( "select `char_id`, name from `char` where `last_map` = '"+ strcharinfo(3) +"' and `char_id` != "+ getcharid(0) +" and online = 1 limit 128", .@char_id, .@name$ );
	if ( .@count == 0 )
		message strcharinfo(0), "There is none player on this map except you.";
	else {
		getmapxy .@map$, .@x, .@y, 0;
		.@myname$ = strcharinfo(0);
		while( .@i < .@count ) {
			warpchar .@map$, .@x, .@y, .@char_id[.@i];
			message .@name$[.@i], "You have been recalled by "+ .@myname$ +".";
			.@i++;
		}
		message strcharinfo(0), .@count +" player(s) recalled.";
	}
	end;
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

 
-    script    atcmd_examplere    -1,{

OnInit:

    bindatcmd "recallmap",strnpcinfo(3)+"::OnAtcommand",60,60;

    end;

OnAtcommand:

    .@count = query_sql( "select `char_id`, name from `char` where `last_map` = '"+ strcharinfo(3) +"' and `char_id` != "+ getcharid(0) +" and online = 1 limit 128", .@char_id, .@name$ );

    if ( .@count == 0 )

        message strcharinfo(0), "There is none player on this map except you.";

    else {

        getmapxy .@map$, .@x, .@y, 0;

        .@myname$ = strcharinfo(0);

        while( .@i < .@count ) {

            warpchar .@map$, .@x, .@y, .@char_id[.@i];

            message .@name$[.@i], "You have been recalled by "+ .@myname$ +".";

            .@i++;

        }

        message strcharinfo(0), .@count +" player(s) recalled.";

    }

    end;

}

 

this one is working.. but.. I think theres a 2-3 minutes delay when using @recallmap when I jump in different maps.. 
Edited by lirycjames
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

The delay is because of the update delay of char.last_map

try

-	script	atcmd_examplere	-1,{
OnInit:
	bindatcmd "recallmap",strnpcinfo(3)+"::OnAtcommand",60,60;
	end;
OnAtcommand:
	getmapxy .map_self$, .x_self, .y_self, 0;
	.myname$ = strcharinfo(0);
	.count = 0;
	addrid 0;
	if ( strcharinfo(3) == .map_self$ && strcharinfo(0) != .myname$ ) {
		message strcharinfo(0), "You have been recalled by "+ .myname$ +".";
		warp .map_self$, .x_self, .y_self;
		.count++;
	}
	if ( strcharinfo(0) != .myname$ ) end;
	sleep2 10;
	if ( .count == 0 )
		message strcharinfo(0), "There is none player on this map except you.";
	else
		message strcharinfo(0), .count +" player(s) recalled.";
	end;
}

 

 

error on " line 9 " after i reload the script .. and it can't recall players on map, it always say "There is none player on this map except you." .. thank you for the reply :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

If you are using rAthena. Update your files :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  08/20/13
  • Last Seen:  

If you are using rAthena. Update your files :D

how can I update my files?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

I guess you are using SVN. Change to git (http://rathena.org/board/topic/87120-transitioning-from-svn-to-git/) since most of the updates will be commited to git.

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