11-29-2015, 10:55 AM
(Сообщение последний раз редактировалось: 11-29-2015, 02:08 PM MaxLindvior.)
Ребятяги подскажите как установить время респавна АК .
Выставляю тут любое время спавна не влияет не чего .
Рб спавнится как моб раз в минуту с лишним.
<spawn count="1" respawn="129600" respawn_random="0" period_of_day="none">
<point x="-21610" y="181594" z="-5734" h="0"/>
<npc id="29001"/>
<!--Queen Ant-->
</spawn>
package ai;
import spirth5oh.commons.util.Rnd;
import spirth5oh.gameserver.ai.Mystic;
import spirth5oh.gameserver.model.Creature;
import spirth5oh.gameserver.model.instances.NpcInstance;
import spirth5oh.gameserver.scripts.Functions;
public class CaughtMystic extends Mystic
{
private static final int TIME_TO_LIVE = 60000;
private final long TIME_TO_DIE = System.currentTimeMillis() + TIME_TO_LIVE;
public CaughtMystic(NpcInstance actor)
{
super(actor);
}
@Override
public boolean isGlobalAI()
{
return true;
}
@Override
protected void onEvtSpawn()
{
super.onEvtSpawn();
if(Rnd.chance(75))
{
Functions.npcSayCustomMessage(getActor(), "scripts.ai.CaughtMob.spawn");
}
}
@Override
protected void onEvtDead(Creature killer)
{
if(Rnd.chance(75))
{
Functions.npcSayCustomMessage(getActor(), "scripts.ai.CaughtMob.death");
}
super.onEvtDead(killer);
}
@Override
protected boolean thinkActive()
{
NpcInstance actor = getActor();
if(System.currentTimeMillis() >= TIME_TO_DIE)
{
actor.deleteMe();
return false;
}
return super.thinkActive();
}
}
<npc id="29001" name="Queen Ant" title="">
<set name="aggroRange" value="0" />
<set name="ai_type" value="Mystic" />
<set name="baseAtkRange" value="40" />
<set name="baseCON" value="57" />
<set name="baseCritRate" value="70" />
<set name="baseDEX" value="73" />
<set name="baseHpMax" value="95760031" />
<set name="baseHpRate" value="1" />
<set name="baseHpReg" value="208" />
<set name="baseINT" value="76" />
<set name="baseMAtk" value="9" />
<set name="baseMAtkSpd" value="1972" />
<set name="baseMDef" value="328" />
<set name="baseMEN" value="80" />
<set name="baseMpMax" value="300.8" />
<set name="baseMpReg" value="2.1" />
<set name="basePAtk" value="2161" />
<set name="basePAtkSpd" value="253" />
<set name="basePDef" value="1615" />
<set name="baseRunSpd" value="372" />
<set name="baseSTR" value="60" />
<set name="baseShldDef" value="0" />
<set name="baseShldRate" value="0" />
<set name="baseWIT" value="70" />
<set name="baseWalkSpd" value="129" />
<set name="collision_height" value="53.0" />
<set name="collision_radius" value="45.0" />
<set name="level" value="40" />
<set name="rewardExp" value="2179536" />
<set name="rewardRp" value="1680" />
<set name="rewardSp" value="140740" />
<set name="shots" value="NONE" />
<set name="type" value="QueenAnt" />
<ai_params>
<set name="MaxPursueRange" value="2500" />
</ai_params>
<faction name="queen_ant_clan" range="1000"/>
<minions>
<minion npc_id="29003" count="6" /> <!--Nurse Ant-->
<minion npc_id="29005" count="6" /> <!--Court Guard Ant-->
</minions>
<skills>
<skill id="4408" level="1" /> <!--HP Increase (1x)-->
<skill id="4409" level="1" /> <!--MP Increase (1x)-->
<skill id="4410" level="11" /> <!--Average P. Atk.-->
<skill id="4411" level="11" /> <!--Average M. Atk.-->
<skill id="4412" level="11" /> <!--Average P. Def.-->
<skill id="4413" level="11" /> <!--Average M. Def.-->
<skill id="4414" level="2" /> <!--Standard Type-->
<skill id="4415" level="3" /> <!--One-handed Sword-->
<skill id="4017" level="1" /> <!--Queen Ant Brandish-->
<skill id="4018" level="1" /> <!--Decrease Speed-->
<skill id="4019" level="1" /> <!--Decrease Speed-->
<skill id="4021" level="1" /> <!--Queen Ant-->
<skill id="4045" level="1" /> <!--Resist Full Magic Attack-->
<skill id="4416" level="12" /> <!--Bugs-->
</skills>
<attributes>
<defence attribute="water" value="20" />
<defence attribute="wind" value="20" />
<defence attribute="earth" value="20" />
<defence attribute="holy" value="20" />
<defence attribute="unholy" value="20" />
</attributes>
</npc>
Выставляю тут любое время спавна не влияет не чего .
Рб спавнится как моб раз в минуту с лишним.
<spawn count="1" respawn="129600" respawn_random="0" period_of_day="none">
<point x="-21610" y="181594" z="-5734" h="0"/>
<npc id="29001"/>
<!--Queen Ant-->
</spawn>
package ai;
import spirth5oh.commons.util.Rnd;
import spirth5oh.gameserver.ai.Mystic;
import spirth5oh.gameserver.model.Creature;
import spirth5oh.gameserver.model.instances.NpcInstance;
import spirth5oh.gameserver.scripts.Functions;
public class CaughtMystic extends Mystic
{
private static final int TIME_TO_LIVE = 60000;
private final long TIME_TO_DIE = System.currentTimeMillis() + TIME_TO_LIVE;
public CaughtMystic(NpcInstance actor)
{
super(actor);
}
@Override
public boolean isGlobalAI()
{
return true;
}
@Override
protected void onEvtSpawn()
{
super.onEvtSpawn();
if(Rnd.chance(75))
{
Functions.npcSayCustomMessage(getActor(), "scripts.ai.CaughtMob.spawn");
}
}
@Override
protected void onEvtDead(Creature killer)
{
if(Rnd.chance(75))
{
Functions.npcSayCustomMessage(getActor(), "scripts.ai.CaughtMob.death");
}
super.onEvtDead(killer);
}
@Override
protected boolean thinkActive()
{
NpcInstance actor = getActor();
if(System.currentTimeMillis() >= TIME_TO_DIE)
{
actor.deleteMe();
return false;
}
return super.thinkActive();
}
}
<npc id="29001" name="Queen Ant" title="">
<set name="aggroRange" value="0" />
<set name="ai_type" value="Mystic" />
<set name="baseAtkRange" value="40" />
<set name="baseCON" value="57" />
<set name="baseCritRate" value="70" />
<set name="baseDEX" value="73" />
<set name="baseHpMax" value="95760031" />
<set name="baseHpRate" value="1" />
<set name="baseHpReg" value="208" />
<set name="baseINT" value="76" />
<set name="baseMAtk" value="9" />
<set name="baseMAtkSpd" value="1972" />
<set name="baseMDef" value="328" />
<set name="baseMEN" value="80" />
<set name="baseMpMax" value="300.8" />
<set name="baseMpReg" value="2.1" />
<set name="basePAtk" value="2161" />
<set name="basePAtkSpd" value="253" />
<set name="basePDef" value="1615" />
<set name="baseRunSpd" value="372" />
<set name="baseSTR" value="60" />
<set name="baseShldDef" value="0" />
<set name="baseShldRate" value="0" />
<set name="baseWIT" value="70" />
<set name="baseWalkSpd" value="129" />
<set name="collision_height" value="53.0" />
<set name="collision_radius" value="45.0" />
<set name="level" value="40" />
<set name="rewardExp" value="2179536" />
<set name="rewardRp" value="1680" />
<set name="rewardSp" value="140740" />
<set name="shots" value="NONE" />
<set name="type" value="QueenAnt" />
<ai_params>
<set name="MaxPursueRange" value="2500" />
</ai_params>
<faction name="queen_ant_clan" range="1000"/>
<minions>
<minion npc_id="29003" count="6" /> <!--Nurse Ant-->
<minion npc_id="29005" count="6" /> <!--Court Guard Ant-->
</minions>
<skills>
<skill id="4408" level="1" /> <!--HP Increase (1x)-->
<skill id="4409" level="1" /> <!--MP Increase (1x)-->
<skill id="4410" level="11" /> <!--Average P. Atk.-->
<skill id="4411" level="11" /> <!--Average M. Atk.-->
<skill id="4412" level="11" /> <!--Average P. Def.-->
<skill id="4413" level="11" /> <!--Average M. Def.-->
<skill id="4414" level="2" /> <!--Standard Type-->
<skill id="4415" level="3" /> <!--One-handed Sword-->
<skill id="4017" level="1" /> <!--Queen Ant Brandish-->
<skill id="4018" level="1" /> <!--Decrease Speed-->
<skill id="4019" level="1" /> <!--Decrease Speed-->
<skill id="4021" level="1" /> <!--Queen Ant-->
<skill id="4045" level="1" /> <!--Resist Full Magic Attack-->
<skill id="4416" level="12" /> <!--Bugs-->
</skills>
<attributes>
<defence attribute="water" value="20" />
<defence attribute="wind" value="20" />
<defence attribute="earth" value="20" />
<defence attribute="holy" value="20" />
<defence attribute="unholy" value="20" />
</attributes>
</npc>