Jump to content
  • 0

Error when my mob is killed by another mob.


Peopleperson49

Question


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I created a script that spawns mobs on a map and it executes a script upon there death. It works fine when a player kills them, but I need a command to detects when a non-player attached mob (bomb poring) kills the mob. Otherwise I get [Error]: script:op_2: invalid data for operator C_EQ. I just want it to execute an action when a mob is killed by the bombs also.

Peopleperson49

OnMobKill:
if(getcharid(2)==0) { }
if($GName==getcharid(2)) { }
if($GName!=getcharid(2)) { }
end;

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   3
  • Joined:  02/24/12
  • Last Seen:  

/sry Edited by SaZzuke
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

try to use playerattached()

btw, getcharid can't use on mob

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I knwe that command wouldnt work which is why I posted. I knew there was something. Thanks I will give it a try.

Peopleperson49

The SQL is not necessery. If(playerattached)==0) { end; } works

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