lllaaazzz Posted November 15, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 10/14/17 Last Seen: February 16, 2019 Share Posted November 15, 2018 (edited) Greetings friends I would like an item or an npc i can call that does the follow : I am standing in pay_fild01 150,150 i use the item and it will ALWAYS teleport me to Prontera but to the cords i was standing before : So i would want it to teleport me to Prontera 150,150 Why do i need this you ask? Because I would like to make a multi dimensional dungeon using this feature. Edited November 15, 2018 by lllaaazzz Quote Link to comment Share on other sites More sharing options...
2 luizragna Posted November 15, 2018 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 107 Reputation: 28 Joined: 02/12/14 Last Seen: January 9, 2023 Share Posted November 15, 2018 The script commands is getmapxy: NPC Script: getmapxy(@mapname$, @mapx, @mapy, UNITTYPE_PC, ""+strcharinfo(0)+""); warp "prontera",@mapx,@mapy; Item Script: { getmapxy(@mapname$, @mapx, @mapy, UNITTYPE_PC, ""+strcharinfo(0)+""); warp "prontera",@mapx,@mapy; } To more info search in doc/script_commands.txt *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: UNITTYPE_PC - Character object UNITTYPE_NPC - NPC object UNITTYPE_PET - Pet object UNITTYPE_HOM - Homunculus object UNITTYPE_MER - Mercenary object UNITTYPE_ELEM - Elemental object The search string is optional. If it is not specified, the location of the invoking character will always be returned for types UNITTYPE_PC and UNITTYPE_PET, the location of the NPC running this function for type 1. If a search string is specified, for types UNITTYPE_PC and UNITTYPE_NPC, the character or NPC with the specified name will be located. If type is UNITTYPE_PET/UNITTYPE_HOM/UNITTYPE_MER/UNITTYPE_ELEM, the search will locate the current object of the character who's name is given in the search string, it will NOT locate the object by name. Example: prontera,164,301,3%TAB%script%TAB%Meh%TAB%730,{ mes "My name is Meh. I'm here so that Nyah can find me."; close; } prontera,164,299,3%TAB%script%TAB%Nyah%TAB%730,{ mes "My name is Nyah."; mes "I will now search for Meh all across the world!"; if (getmapxy(@mapname$, @mapx, @mapy, UNITTYPE_NPC, "Meh") != 0) { mes "I can't seem to find Meh anywhere!"; close; } mes "And I found him on map " + @mapname$ + " at X:" + @mapx + " Y:" + @mapy + " !"; close; } Notice that NPC objects disabled with 'disablenpc' will still be located. 1 Quote Link to comment Share on other sites More sharing options...
0 lllaaazzz Posted November 15, 2018 Group: Members Topic Count: 18 Topics Per Day: 0.01 Content Count: 154 Reputation: 6 Joined: 10/14/17 Last Seen: February 16, 2019 Author Share Posted November 15, 2018 thanks i knew it existed but no clue how to start lol... thank you 1 Quote Link to comment Share on other sites More sharing options...
Question
lllaaazzz
Greetings friends
I would like an item or an npc i can call that does the follow :
I am standing in pay_fild01 150,150
i use the item and it will ALWAYS teleport me to Prontera but to the cords i was standing before
:
So i would want it to teleport me to Prontera 150,150
Why do i need this you ask? Because I would like to make a multi dimensional dungeon using this feature.
Link to comment
Share on other sites
2 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.