Jump to content
  • 0

Checking the race of killed monster


ran0120

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.04
  • Content Count:  25
  • Reputation:   0
  • Joined:  05/18/23
  • Last Seen:  

I'm trying to implement a race change system in which when a player kills a certain number of say, angel monsters, their race will be changed to demon. I already have the bRace diff implemented and I'm just setting up the script but I can't seem to get the error. I have done this script in the past but I can't remember now as it has been multiple years since then.

 

Here's the rough script:

Quote

-    script    Angel_Counter#Demon    -1,{

OnNPCKillEvent:
    if ( demon_race_change_hydro > 0 && getmonsterinfo( (killedrid,MOB_RACE) == "RC_ANGEL") {
        dispbottom "Yes";
        end;
}
    dispbottom "No";
    end;
}

I'm setting up the condition that when the player has the quest variable and they kill an angel monster, the script will run. Any help on this?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

dont put RC_ANGEL on a quotation marks.. otherwise it would return to str instead. do this instead:

 

OnNPCKillEvent:
	if ( demon_race_change_hydro > 0 && getmonsterinfo(killedrid,MOB_RACE) == RC_ANGEL)
		dispbottom "Yes";
	else
		dispbottom "No";
	end;
}

 

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