gainster81 8 Report post Posted September 13, 2021 Hey, I was trying to make a new skill in which you can teleport on the clicked area within a short range. I used the Mytho teleportation skill (id 296) as a guide. I setted it up but the skill isn't working (the animation happens but my char isn't teleporting to the selected area. Am i missing something in the skilleffect function? function Skill_tptp_End ( ATKER , DEFER , sklv ) local map_name = GetChaMapName (ATKER) local x = math.floor (x/100) local y = math.floor (y/100) GoTo(ATKER, x,y, map_name) end Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted September 13, 2021 (edited) 3 hours ago, gainster81 said: Hey, I was trying to make a new skill in which you can teleport on the clicked area within a short range. I used the Mytho teleportation skill (id 296) as a guide. I setted it up but the skill isn't working (the animation happens but my char isn't teleporting to the selected area. Am i missing something in the skilleffect function? function Skill_tptp_End ( ATKER , DEFER , sklv ) local map_name = GetChaMapName (ATKER) local x = math.floor (x/100) local y = math.floor (y/100) GoTo(ATKER, x,y, map_name) end in your skill x, y not defined x/100 ? you have to use local x, y = GetChaPos(ATKER) Edited September 13, 2021 by mkhzaleh Quote Share this post Link to post Share on other sites
gainster81 8 Report post Posted September 13, 2021 5 hours ago, mkhzaleh said: in your skill x, y not defined x/100 ? you have to use local x, y = GetChaPos(ATKER) Added "local x, y = GetChaPos(ATKER)" but it still didn't work. Also tried removing the /100 lines but it also didn't work. Any other thing i may be missing? Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted September 14, 2021 local x, y = GetChaPos(role) GoTo(role,x/100,y/100,GetChaMapName(role)) works fine Quote Share this post Link to post Share on other sites
gainster81 8 Report post Posted September 14, 2021 10 hours ago, mkhzaleh said: local x, y = GetChaPos(role) GoTo(role,x/100,y/100,GetChaMapName(role)) works fine hmm it isn't working. Do you have the skillinfo line that you are using? Perhaps i need to edit that one. Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted September 15, 2021 (edited) 17 hours ago, gainster81 said: hmm it isn't working. Do you have the skillinfo line that you are using? Perhaps i need to edit that one. no, i just told you how to use the function, Edited September 15, 2021 by mkhzaleh Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted September 27, 2021 Hello @gainster81! As @mkhzaleh mentioned, variables 'x' and 'y' are undefined. You can get these coordinates using GetChaPos() function, but I think it has no sense, your character will teleport to itself, i.e. on the same position. I suggest use skill like Voayger's 'Conch Ray' as a template. As I remember, there is a function that allow to get coordinates clicked on the terrain by the player. Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted September 27, 2021 local x, y = GetChaPos(DEFER) local map_name = GetChaMapName (DEFER) local x = math.floor (x/100) local y = math.floor (y/100) GoTo(ATKER, x,y, map_name) just get it from defer Quote Share this post Link to post Share on other sites
gainster81 8 Report post Posted July 12, 2022 (edited) On 9/27/2021 at 9:28 AM, V3ct0r said: Hello @gainster81! As @mkhzaleh mentioned, variables 'x' and 'y' are undefined. You can get these coordinates using GetChaPos() function, but I think it has no sense, your character will teleport to itself, i.e. on the same position. I suggest use skill like Voayger's 'Conch Ray' as a template. As I remember, there is a function that allow to get coordinates clicked on the terrain by the player. Hi @V3ct0r! Sorry for reviving this thread again. I gave up before but now i am trying to set this up again. Do you remember which is the function that allows to get the coordinates from the clicked terrain? Also, i tried again what @mkhzaleh said but added it in the conch ray script and seems to work (only when it hits a target). Now that it worked, i am wondering if its possible to remove the camera realocation and message that pops out when "GoTo" activates: Edited July 12, 2022 by gainster81 Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted July 21, 2022 Hello @gainster81! On 7/12/2022 at 3:01 AM, gainster81 said: Hi @V3ct0r! Sorry for reviving this thread again. I gave up before but now i am trying to set this up again. Do you remember which is the function that allows to get the coordinates from the clicked terrain? It is ok. Have you found the name of the function? Can you share the code with us? On 7/12/2022 at 3:01 AM, gainster81 said: Now that it worked, i am wondering if its possible to remove the camera realocation and message that pops out when "GoTo" activates: Are you working with official client binaries or source codes? I think you shouldn't remove the camera relocation since the character is always located in the center of the screen (scene). Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
gainster81 8 Report post Posted July 22, 2022 (edited) 12 hours ago, V3ct0r said: It is ok. Have you found the name of the function? Can you share the code with us? Hey @V3ct0r! The code i am currently using is the following: local x, y = GetSkillPos ( ATKER ) local map_name = GetChaMapName ( ATKER ) local x = math.floor (x/100) local y = math.floor (y/100) GoTo(ATKER, x,y, map_name) It also works with GetChaPos but in that case you get teleported into the enemy player instead of the clicked area. A new issue that i am having is that the skill must pass through an enemy in order to work. This means that if i select an area and no enemies are inside the zone, the teleport wont work, as if there was a condition preventing from the ending function to happen if it doesn't hit something. In the gif example below it works only because there is a shrub inside the area: 12 hours ago, V3ct0r said: Are you working with official client binaries or source codes? I think you shouldn't remove the camera relocation since the character is always located in the center of the screen (scene). Only edited client binaries for now, but i have the src as well. By realocating i mean preventing the camera to "zoom out" like in the gif i just showed that the camera goes up again and it rotates back to its standard position. Is there any way of doing that and also deleting the "level 79" text that appears? Edited July 22, 2022 by gainster81 Quote Share this post Link to post Share on other sites
Angelix 374 Report post Posted July 23, 2022 For the “level 79” text, you’d have to edit the sources since that’s coded in there every time you relocate using GoTo (or any other move function?). Quote Share this post Link to post Share on other sites
Saeed 26 Report post Posted July 23, 2022 On 7/22/2022 at 9:07 AM, gainster81 said: Hey @V3ct0r! The code i am currently using is the following: local x, y = GetSkillPos ( ATKER ) local map_name = GetChaMapName ( ATKER ) local x = math.floor (x/100) local y = math.floor (y/100) GoTo(ATKER, x,y, map_name) It also works with GetChaPos but in that case you get teleported into the enemy player instead of the clicked area. A new issue that i am having is that the skill must pass through an enemy in order to work. This means that if i select an area and no enemies are inside the zone, the teleport wont work, as if there was a condition preventing from the ending function to happen if it doesn't hit something. In the gif example below it works only because there is a shrub inside the area: Only edited client binaries for now, but i have the src as well. By realocating i mean preventing the camera to "zoom out" like in the gif i just showed that the camera goes up again and it rotates back to its standard position. Is there any way of doing that and also deleting the "level 79" text that appears? Maybe try to change the skill type in skillinfo to a neutral skill so it would call the skill function despite having no enemies in the selected area 1 Quote Share this post Link to post Share on other sites
gainster81 8 Report post Posted July 23, 2022 23 minutes ago, Saeed said: Maybe try to change the skill type in skillinfo to a neutral skill so it would call the skill function despite having no enemies in the selected area It worked! i was changing the skill type column but it was the "process target" column that i had to set to 1. Thanks! Quote Share this post Link to post Share on other sites
Saeed 26 Report post Posted July 23, 2022 Just now, gainster81 said: It worked! i was changing the skill type column but it was the "process target" column that i had to set to 1. Thanks! Your welcome 1 Quote Share this post Link to post Share on other sites