Adam Posted July 27, 2012 Posted July 27, 2012 (edited) Hello people, Once again, need you expert advise on this case: We created a PvP room which people can access from almost any town using a custom warper. To get out of this room they simply use a warp At the moment this warp only warps back to prontera, regardless where people came from at the first place. QUESTION : Is there a way to make sure people when they use the warp out are warped back where they first came from ? Thanks you in advance, all suggestions are welcome ! Edited July 28, 2012 by iROnic Quote
Mystery Posted July 27, 2012 Posted July 27, 2012 (edited) You could use this for example: xxxx,xxx,xxx,0 script Out#Portal 45,4,2,{ OnTouch: mes "[Portal]"; mes "Where would you like to go?"; next; switch(select("prontera.:morocc.:geffen.:payon.:alberta.:Cancel.")) { case 1: warp "prontera",107,60; end; case 2: warp "morocc",157,96; end; case 3: warp "geffen",120,36; end; case 4: warp "payon",96,100; end; case 5: warp "alberta",41,243; end; case 6: close; } } If you wanna do it your way, you're gonna have to get the warper who sent players into that map to save their last position by using: *getmapxy("<variable for map name>",<variable for x>,<variable for y>,<type>{,"<search string>"}) This function will locate a character object, NPC object or pet's coordinates and place their coordinates into the variables specified when calling it. It will return 0 if the search was successful, and -1 if the parameters given were not variables or the search was not successful. Type is the type of object to search for: 0 - Character object 1 - NPC object 2 - Pet object 3 - Monster object 4 - Homunculus object 5 - Mercenary object 6 - Elemental object While 3 is meant to look for a monster object, no searching will be done if you specify type 3, and the function will always return -1. The search string is optional. If it is not specified, the location of the invoking character will always be returned for types 0 and 2, the location of the NPC running this function for type 1. If a search string is specified, for types 0 and 1, the character or NPC with the specified name will be located. If type is 3, the search will locate the current pet of the character who's name is given in the search string, it will NOT locate a pet by name. In a variable and then get the NPC to warp back those players using their saved map in the variable. Refer to the post http://rathena.org/board/topic/68349-warping-back-to-departure-point/#entry124791 below mine :> Edited July 27, 2012 by Mysterious Quote
Euphy Posted July 27, 2012 Posted July 27, 2012 When players warp to the map, add temporary variables for map location: getmapxy(@tmap$,@tx,@ty,0); Then use a scripted warp instead of a warp portal: <header> 45,2,2,{ warp @tmap$,@tx,@ty; end; } @Mysterious: That isn't quite what he wants. xP 1 Quote
Mystery Posted July 27, 2012 Posted July 27, 2012 When players warp to the map, add temporary variables for map location: getmapxy(@tmap$,@tx,@ty,0); Then use a scripted warp instead of a warp portal: <header> 45,2,2,{ warp @tmap$,@tx,@ty; end; } @Mysterious: That isn't quite what he wants. xP I was editing my post when you replied D: 1 Quote
Euphy Posted July 27, 2012 Posted July 27, 2012 I was editing my post when you replied D: It's just because you aren't Tyranitar enough :< 2 Quote
Adam Posted July 28, 2012 Author Posted July 28, 2012 You guyz are just awesome, thanks a lot for the golden help Quote
Emistry Posted July 28, 2012 Posted July 28, 2012 just some precaution... make sure you add in a nosave mapflag into the map when using euphy script. why ? because the variable / data stored inside the character..will be removed upon player logout.. so, if you didnt have the mapflag ..your charcter will probably stuck inside..and ur map server will spam error also. this is because the warper warp you based on the saved variable. Quote
Adam Posted July 28, 2012 Author Posted July 28, 2012 Thanks a lot for warning me, really appreciate it Emistry ! Once again thanks all for helping me out. Quote
Question
Adam
Hello people,
Once again, need you expert advise on this case:
We created a PvP room which people can access from almost any town using a custom warper.
To get out of this room they simply use a warp
At the moment this warp only warps back to prontera, regardless where people came from at the first place.
QUESTION :
Is there a way to make sure people when they use the warp out are warped back where they first came from ?
Thanks you in advance, all suggestions are welcome !
Edited by iROnic7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.