Jump to content
  • 0

Targets


Komnis

Question

Recommended Posts

  • 0

to ekana etc opos m eipes:

if (skill.getTargetType()==TargetType.TARGET_ONE)

 

alla kai pali to TargetType pali mou to vgazei la8os... :/

 

wrea, pata sto kokinaki dipla stile mou mia photo

Link to comment
Share on other sites

  • 0

ennoes to TargetType na to kanw L2SkillType? den se katalava... :P

 

pantos dn ginete tpt... akoma k auto ean valw to pianei la8os...

 

se ka9e pack afto einai diaforetiko, ti na sou kanw tora na mantepsw pos legete to class ? edw den 3ereis esy ti pack exeis

Link to comment
Share on other sites

  • 0

Apo SkillTargetType  kanto L2Skill.SkillTargetType

 

wraios. mou to pianei swsto. to testara kai douleuei. Omos otan pataw skill k dn exw target pianei kateu8eian ton eauto tou.

mipos ginete na to kanoume xwris na pianei target?

Link to comment
Share on other sites

  • 0

wraios. mou to pianei swsto. to testara kai douleuei. Omos otan pataw skill k dn exw target pianei kateu8eian ton eauto tou.

mipos ginete na to kanoume xwris na pianei target?

 

Svise ton palio kwdika sto RequestMagicSkillUse kai vale tis grammes me ta + ekei pou sou grafw.

 

L2PcInstance:

                switch(sklTargetType)
	{
		// Target the player if skill type is AURA, PARTY, CLAN or SELF
		case TARGET_AURA:
			if(isInOlympiadMode() && !isOlympiadStart())
				setTarget(this);
		case TARGET_PARTY:
		case TARGET_ALLY:
		case TARGET_CLAN:
		case TARGET_GROUND:
		case TARGET_SELF:
			target = this;
			break;
		case TARGET_PET:
			target = getPet();
			break;
		default:
			target = getTarget();
			break;
	}

	// Check the validity of the target
	if (target == null)
	{
+                   if (skill.isOffensive())
+                   {
		sendPacket(new SystemMessage(SystemMessageId.TARGET_CANT_FOUND));
		sendPacket(ActionFailed.STATIC_PACKET);
		return;
+                   }
+                   else
+                       target = this;
	}

Link to comment
Share on other sites

  • 0

Svise ton palio kwdika sto RequestMagicSkillUse kai vale tis grammes me ta + ekei pou sou grafw.

 

to ekana filos alla dn douleuei. mou elipe auti i grammi kiolas

sendPacket(new SystemMessage(SystemMessageId.TARGET_CANT_FOUND));

 

stin arxi dokimasa xwris autin kai meta pros8esa kai autin alla kai pali tpt. otan dn exw target apla mou leei incorrect target opos panta. :/

to proigoumeno itan pio konta... :P

Link to comment
Share on other sites

  • 0

to ekana filos alla dn douleuei. mou elipe auti i grammi kiolas

sendPacket(new SystemMessage(SystemMessageId.TARGET_CANT_FOUND));

 

stin arxi dokimasa xwris autin kai meta pros8esa kai autin alla kai pali tpt. otan dn exw target apla mou leei incorrect target opos panta. :/

to proigoumeno itan pio konta... :P

Einai etsi sto pack wste 8a s stelnei "incorrect target" eite mporeis na to kaneis cast (me ton twrino kwdika), eite oxi.

 

Episis pigaine L2Character kai allakse auto:

                if(skill.getTargetType() == SkillTargetType.TARGET_AURA || skill.getTargetType() == SkillTargetType.TARGET_GROUND || skill.isPotion())
	{
		target = this;
	}
	else if(targets == null || targets.length == 0)
	{
+                     if (skill.isOffensive())
+                     {
		    getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
		    return;
+                     }
+                     else
+                          target = this;
	}

 

To 8ema einai na mi dokimaseis me debuff. Dokimase me heal as poume.

Twra an einai na afaireis to incorrect target apo ka8e target type, tote kalutera na xrisimopoihseis to proigoumeno code pou s edwsan.

Link to comment
Share on other sites

  • 0

Einai etsi sto pack wste 8a s stelnei "incorrect target" eite mporeis na to kaneis cast (me ton twrino kwdika), eite oxi.

 

Episis pigaine L2Character kai allakse auto:

                if(skill.getTargetType() == SkillTargetType.TARGET_AURA || skill.getTargetType() == SkillTargetType.TARGET_GROUND || skill.isPotion())
	{
		target = this;
	}
	else if(targets == null || targets.length == 0)
	{
+                     if (skill.isOffensive())
+                     {
		    getAI().notifyEvent(CtrlEvent.EVT_CANCEL);
		    return;
+                     }
+                     else
+                          target = this;
	}

 

To 8ema einai na mi dokimaseis me debuff. Dokimase me heal as poume.

Twra an einai na afaireis to incorrect target apo ka8e target type, tote kalutera na xrisimopoihseis to proigoumeno code pou s edwsan.

 

me heal kai buffs to dokimazw. egw auto 8elw, oxi me debuffs.

ara krataw ton kodika sto L2PcInstance kai pros8eto kai auto?

k ean ginete pes m pou 8a vrw to L2Character. :P

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...