OunoriBaka Posted July 28, 2013 Posted July 28, 2013 our server has clone potions.i can make it so that the potion wont be clickable. or cannot be use.but they can summon it outside the map then enter back again with clones. how can i prevent this?would help a lot. thank you. Quote
Xynvaroth Posted August 1, 2013 Posted August 1, 2013 In general, the clone( ) command will return the monster unit id which can be used to later kill the clone using unitkill( ). That said, you will have to somehow store all the clones' ids which are spawned and as soon as a player enters a gvg map, kill the clones of that player. I would recommend you using my Xynvaroth_Array script, because you can create permanent character arrays with it. Everytime someone uses a clone pot, add the clone's id to the array. Then, when a player enters a gvg map - you can use the OnMapLoad event to know when a player enters such a map -, go through the array, kill the clones and reset the array using Xynvaroth_Array_Reset( ). You might face two problems with this solution: 1. The array will contain ids of clones which are already dead, because most clones will have a limited living duration. 2. The array will grow and grow when a player uses the potions and never goes on a gvg map. To solve these issues, you could, for example, always when a player uses a potion and before you save the clone's id, go through all the ids in the array and delete the ids of clones which are already dead using Xynvaroth_Delete( ). Quote
Jasc Posted July 28, 2013 Posted July 28, 2013 you can use onpcloadmap function then @killmonster2 Quote
OunoriBaka Posted August 1, 2013 Author Posted August 1, 2013 you can use onpcloadmap function then @killmonster2 that will kill the emperium aswell. no? Quote
Evelynn Posted August 1, 2013 Posted August 1, 2013 (edited) You can make it when they load inside the map to kill the player. Usually when the master dies, the clones will die also... You should probably disable clone potions in general when an event that you don't want clones inside starts since im sure players will try to find loopholes if it is still enabled like they did after disabling use inside a certain area. Edited August 1, 2013 by Evelynn Quote
OunoriBaka Posted August 8, 2013 Author Posted August 8, 2013 okay ill try experimenting on it. thank you guys. Quote
Emistry Posted August 8, 2013 Posted August 8, 2013 you can try this OnPCLoadMapEvent: .@map$ = strcharinfo(3); if( .@map$ == "mapname" ){ killmonster .@map$,"All"; } end; make sure you added the loadevent mapflag Quote
Question
OunoriBaka
our server has clone potions.
i can make it so that the potion wont be clickable. or cannot be use.
but they can summon it outside the map then enter back again with clones.
how can i prevent this?
would help a lot. 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.