• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling ::0.3.6pl1 Error with a line codes:: Help Please ::

Nubaza

LUA Scripter
Joined
Jun 5, 2011
Messages
337
Solutions
1
Reaction score
23
Location
Chile
I have this line-codes:

creature.cpp
Code:
void Creature::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const
{
	fpp.fullPathSearch = !hasFollowPath;
	fpp.clearSight = true;
	if(creature->isPlayerSummon())   
		{
		         if(creature->getName() == "Gengar")
                 fpp.clearSight = false;
		         if(creature->getName() == "Haunter")
                 fpp.clearSight = false;
		         if(creature->getName() == "Gastly")
                 fpp.clearSight = false;
                 if(creature->getName() == "Shiny Gengar")
                 fpp.clearSight = false;
                 if(creature->getNameDescription() == "thedarkabra")
                 fpp.clearSight = false;
                 if(creature->getName() == "Shiny Alakazam")
                 fpp.clearSight = false;
        }
	fpp.clearSight = true;
	fpp.maxSearchDist = 12;
	fpp.minTargetDist = fpp.maxTargetDist = 1;
}

It makes a ghost walk creatures, but don't work the getNameDescription() line.

That it's my dark abra.xml of my monsters :

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dark Abra" nameDescription="thedarkabra" race="ghost" experience="600" speed="250" manacost="450">
  <health now="5000" max="5000"/>
	<look type="491" corpse="8771"/>
	<targetchange interval="1000" chance="1000"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
	<attack name="physical" interval="1700" chance="100" range="3" min="-190" max="-230">

	<attribute key="shootEffect" value="eartharrow"/>

   	</attack>
  </attacks>

  <voices interval="5000" chance="10">
	<voice sentence="ABRA!"/>
    <voice sentence="ABRAAA!"/>
	</voices>
</monster>

Someone can help me? thanks

Edited: Yep, i test with summons, not monsters
 
why only use code
LUA:
void Creature::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const
{
	fpp.fullPathSearch = !hasFollowPath;
	fpp.clearSight = true;
	fpp.maxSearchDist = 12;
	fpp.minTargetDist = fpp.maxTargetDist = 1;
}
and
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Dark Abra" nameDescription="an dark abra" race="psychic" experience="386" speed="140" manacost="0">
  <health now="620" max="620"/>
  <look type="491" corpse="8771"/>
	<targetchange interval="10000" chance="0"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="1"/>
    <flag canpushitems="0"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="3"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
	<attack name="physical" interval="2000" chance="100" range="3" min="-35" max="-80">

	<attribute key="shootEffect" value="eartharrow"/>

   	</attack>
  </attacks>
  <defenses armor="0" defense="0">
  </defenses>
  <immunities>
  </immunities>
  <voices interval="5000" chance="10">
	<voice sentence="Abraaaa!"/>
    <voice sentence="Abra!"/>
  </voices>
  <loot>
  </loot>

</monster>
 
Because i only need work with Gengar, Haunter, Gastly, Shiny Gengar, Dark Abra and Shiny Alakazam.
Code:
if(creature->getName() == "Gastly")

If u use the function creature->getName the lines works.. the summon named Gastly in the game can ghost walk, but, i have a nick system (Change Summon Name In Game) and if the player have a gastly with nick "Brill", Brill cannot ghost walk, undestood?

I need a lines that only uses the outfit of the summons, example creature->getOutfit or something.
Someone can help me?

Thanks
 
ohh.. and you have this in creature.cpp
LUA:
void Creature::getPathSearchParams(const Creature* creature, FindPathParams& fpp) const
{
	fpp.fullPathSearch = !hasFollowPath;
	fpp.clearSight = true;
	if(creature->isPlayerSummon())   
		{
		         if(creature->getName() == "Gengar")
                 fpp.clearSight = false;
		         if(creature->getName() == "Haunter")
                 fpp.clearSight = false;
		         if(creature->getName() == "Gastly")
                 fpp.clearSight = false;
                 if(creature->getName() == "Shiny Gengar")
                 fpp.clearSight = false;
                 if(creature->getNameDescription() == "thedarkabra")
                 fpp.clearSight = false;
                 if(creature->getName() == "Shiny Alakazam")
                 fpp.clearSight = false;
        }
	fpp.clearSight = true;
	fpp.maxSearchDist = 12;
	fpp.minTargetDist = fpp.maxTargetDist = 1;
}

You need summon gengar, you don't get any error in summon pokemon? *console
 
LUA:
getCreatureSummons(cid)
or this?
LUA:
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178)
else
doSendMagicEffect(getThingPos(cid), 178)
end
end
 
LUA:
getCreatureSummons(cid)
or this?
LUA:
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178)
else
doSendMagicEffect(getThingPos(cid), 178)
end
end

I didn't undestood your response, i'm searching a line to make in the sources.
 
Oh man, look... that line:
Code:
if(creature->getNameDescription() == "thedarkabra")

don't work, undestood? i have set to Dark Abra his nameDescription="thedarkabra"
 
Back
Top