Jolteo Posted November 24, 2014 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
tr0n Posted November 28, 2014 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
Nerfwood Posted November 25, 2014 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
Jolteo Posted November 25, 2014 Author 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
Zell Posted November 25, 2014 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
Jolteo Posted November 25, 2014 Author 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
Jolteo Posted December 2, 2014 Author 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
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
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.