Jolteo Posted November 24, 2014 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 02/26/14 Last Seen: April 26, 2023 Share Posted November 24, 2014 I would love to know if you can put Porings in a custom map and not allow players to attack these Porings !!! Thank you Quote Link to comment Share on other sites More sharing options...
tr0n Posted November 28, 2014 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 562 Reputation: 153 Joined: 02/21/12 Last Seen: February 27, 2024 Share Posted November 28, 2014 You can check if a cell is walkable or not and then let the npc walk to it or use a new random coordination. checkcell("<map name>",<x>,<y>,<type>); This command will return 1 or 0, depending on whether the specified cell has the 'type' flag set or not. There are various types to check, all mimicking the server's cell_chk enumeration. The types can be found in db/const.txt. source: Checkcell 2 Quote Link to comment Share on other sites More sharing options...
Nerfwood Posted November 25, 2014 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 104 Reputation: 27 Joined: 12/05/13 Last Seen: August 26, 2015 Share Posted November 25, 2014 Not sure if you can make monsters unkillable, but you can disguise an NPC as a monster by using the mob's ID as the NPC's sprite ID. Then, you can use the script command npcwalkto to make the NPC walk. Here's a working sample: jupe_ele,42,47,4 script Poring#1 1002,{ OnInit: initnpctimer; OnTimer5000: getmapxy( .map$, .x, .y, 1, strnpcinfo(0) ); set .x, .x+ rand(1,7) - rand(1,13); set .y, .y+ rand(1,7) - rand(1,13); npcwalkto .x, .y; initnpctimer; } You can then just duplicate it as many as you like. You should also take note that the NPC may not always be able to move every 5 seconds since the random coordinates may be unwalkabe. (To be honest, I don't know if this is the best idea.) 1 Quote Link to comment Share on other sites More sharing options...
Jolteo Posted November 25, 2014 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 02/26/14 Last Seen: April 26, 2023 Author Share Posted November 25, 2014 Not sure if you can make monsters unkillable, but you can disguise an NPC as a monster by using the mob's ID as the NPC's sprite ID. Then, you can use the script command npcwalkto to make the NPC walk. Here's a working sample: jupe_ele,42,47,4 script Poring#1 1002,{ OnInit: initnpctimer; OnTimer5000: getmapxy( .map$, .x, .y, 1, strnpcinfo(0) ); set .x, .x+ rand(1,7) - rand(1,13); set .y, .y+ rand(1,7) - rand(1,13); npcwalkto .x, .y; initnpctimer; } You can then just duplicate it as many as you like. You should also take note that the NPC may not always be able to move every 5 seconds since the random coordinates may be unwalkabe. (To be honest, I don't know if this is the best idea.) okay, it's a great option. Won a liked by posting a mode. Will be someone who has more an alternative to the issue at hand? Quote Link to comment Share on other sites More sharing options...
Zell Posted November 25, 2014 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 412 Reputation: 266 Joined: 04/25/12 Last Seen: Saturday at 11:42 PM Share Posted November 25, 2014 (edited) With the mob control source mod have a option to make the mob untouchable Edited November 25, 2014 by Zell Quote Link to comment Share on other sites More sharing options...
Jolteo Posted November 25, 2014 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 02/26/14 Last Seen: April 26, 2023 Author Share Posted November 25, 2014 With the mob control source mod have a option to make the mob untouchable Hello friend! Could you tell me the exact place please? I do not know much about src if you could show me I would be grateful and also already learn more ... I await your response Quote Link to comment Share on other sites More sharing options...
Jolteo Posted December 2, 2014 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 12 Reputation: 0 Joined: 02/26/14 Last Seen: April 26, 2023 Author Share Posted December 2, 2014 You can check if a cell is walkable or not and then let the npc walk to it or use a new random coordination. checkcell("<map name>",<x>,<y>,<type>); This command will return 1 or 0, depending on whether the specified cell has the 'type' flag set or not. There are various types to check, all mimicking the server's cell_chk enumeration. The types can be found in db/const.txt. source: Checkcell Very good. Solved Quote Link to comment Share on other sites More sharing options...
Question
Jolteo
I would love to know if you can put Porings in a custom map and not allow players to attack these Porings !!! Thank you
Link to comment
Share on other sites
6 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.