Jump to content
  • 0

Checking the race of killed monster


Question

Posted

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?

1 answer to this question

Recommended Posts

  • 0
Posted

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;
}

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...