Class KilledForQuestCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.KilledForQuestCondition
- All Implemented Interfaces:
ChatCondition
,PreTransitionCondition
@Dev(category=KILLS,
label="Kills?")
public class KilledForQuestCondition
extends Object
implements ChatCondition
Checks the records of kills.
Quest string should have in proper quest index string like "creature1,w,x,y,z,creature2,a,b,c,d,creature3,..."
Where creature1, creature2 - names of creatures to kill;
w,x and a,b - number of creatures to kill, solo and shared;
y,z and c,d - number of creatures killed by player before starting this quest, both solo and shared.
- Author:
- yoriy
- See Also:
StartRecordingKillsAction
,KilledInSumForQuestCondition
-
Constructor Summary
ConstructorDescriptionKilledForQuestCondition(String quest, int index)
Creates a new KilledForQuestCondition. -
Method Summary
-
Constructor Details
-
KilledForQuestCondition
Creates a new KilledForQuestCondition.- Parameters:
quest
- the quest slotindex
- index of sub state
-
-
Method Details
-
fire
return true if player have killed proper creature numbers.- Specified by:
fire
in interfaceChatCondition
- Specified by:
fire
in interfacePreTransitionCondition
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidnpc
- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-