Jump to content
  • 0

how can i block slave clones in guild map?


OunoriBaka

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  06/27/13
  • Last Seen:  

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. 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  254
  • Reputation:   72
  • Joined:  07/10/13
  • Last Seen:  

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( ).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

you can use onpcloadmap function then @killmonster2

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  06/27/13
  • Last Seen:  

you can use onpcloadmap function then @killmonster2

that will kill the emperium aswell. no?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  93
  • Reputation:   14
  • Joined:  12/12/11
  • Last Seen:  

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 by Evelynn
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   0
  • Joined:  06/27/13
  • Last Seen:  

okay ill try experimenting on it. thank you guys. 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you can try this

OnPCLoadMapEvent:
.@map$ = strcharinfo(3);
if( .@map$ == "mapname" ){
	killmonster .@map$,"All";
}
end;

make sure you added the loadevent mapflag

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...