• logo_cipsoft
    Nowe serwery zostały otwarte 27 Paź 2025:
    Idyllia (Optional PvP) Hostera (Open PvP) us_logo Dracobra (Open PvP)

[7.1] Potwory sie atakuj?!!

Status
Zamknięty.

Maro222225

Active User
ehh...mam pytanie w moim ots-ie potwory sie atakuj? !!!!! Oto 1 przyk?ad
Kod:
 <?xml version="1.0"?>

<npc name="a Troll" script="data/npc/scripts/minor.lua" access="0" moveable="0" speed="210" npc="3" respawn="1" monster="1" givenxp="200" level="30" maglevel="80">
	<mana now="800" max="800"/>
	<health now="150" max="150"/>
<respawn x="263" y="234" z="7"/>
	<respawn2 x="263" y="234" z="7"/>
<experience experience="15000"/>	
<look type="15" head="2" body="2" legs="2" feet="2" corpse="2018"/>
	<attack type="melee" damage="50"/>
	<loot>
		<lootitem loot="0" lootid="1890" chance="5"/>
		<lootitem loot="1" lootid="1746" chance="10"/>
		<lootitem loot="2" lootid="1737" chance="5"/>
                <lootitem loot="3" lootid="1741" chance="10"/>
		<lootitem loot="4" lootid="1793" chance="5"/>			
</loot>
       
</npc>
Dla czego tak sie dziaje ??? Zna kto? odpowiedz??? :confused::):p:mad:;):rolleyes::cool::eek:


@ edit
daje tu minor.lua
Kod:
meta = 0 
target = 0 
following = false 
attacking = false 
kret = 0 

function onThingMove(creature, thing, oldpos, oldstackpos) 
end 

function onCreatureAppear(creature)    
end 

function onCreatureDisappear(id, stackpos)    
end 

function onCreatureTurn(creature, stackpos) 
end 

function onCreatureSay(cid, type, msg) 
end 

function onCreatureChangeOutfit(creature) 
end 

function onThink() 

-- find random target 9 tiles away check if he is not in friendlist    
   if attacking == false then    
      target = FindTarget(8) 
      dist = getDistanceToCreature(target) 
      if dist ~= nil and not checkattackable(target) then 
      attacking = true 
      end 
   end    
-- target found starting attack 
   if attacking == true then 

-- starting random switch code 
   rand = math.random(1, 1000) 
-- change 985 to lower for monsters to switch more oftern or viceverse 
                if (rand > 985) then 
   meta = FindTarget(8) 
    
   dist = getDistanceToCreature(meta) 
      if dist ~= nil and not checkattackable(meta) then 
      target = meta 
      attacking = true 
      end 
   end 

      dosomething() 

      dist = getDistanceToCreature(target) 
      if dist == nil then 
         selfGotoIdle() 
         return 
      end 
     if dist >= 8 then 
      attacking = false 
      end 
      if dist <= 1 then 
         selfAttackCreature(target) 
   jiggle(target,5) 
         return


      else 
    
-- slow down code (to speed them up put kret = kret - 2 or more and increase their level too :P) 

         if (kret <= 1) then 
            kret = kret + 1 
            moveToCreature(target) 
            return 
            else 
            kret = kret - 1 
            return 
         end 
      end 
-- check if target managed to escape us... 
   dist = getDistanceToCreature(target) 
   if (dist ~= nil or dist > 9) then 
   attacking = false 
   target = 0 
   end 

end 
end 

-- casting spells at random 
function dosomething() 
   rand = math.random(1, 1000) 

if attacking == true then 
dist = getDistanceToCreature(target) 
selfAttackCreature(target) 
return 
end 
end
 

Our partners and their custom servers:

Odp: [7.1] Potwory sie atakuj?!!

Brakuje zak?adki attack, nie wiem sk?d te potwory wzi??e?, jak s? one w og?le nie do u?ycia.

Spr?buj wrzuci? po exp tak? zak?adk?:
Kod:
  <attacks>
    <attack name="melee" interval="1500" skill="15" attack="10"/>
  </attacks>

Pozdrawiam.
 
Odp: [7.1] Potwory sie atakuj?!!

Chcia?em dac z inne go potworki...... Ale ka?dy silnik 7.1 ma inn? forme programowania potwork?w !!!!!!!(bezsensowny post 2 x up) Pomoc ci?gle potrzebna1!
@up
Nie masz pomys??w... szkoda ale plz wymy?l co?!!!!! (moge da? innego monstera :P)
 
Ostatnia edycja:
Odp: [7.1] Potwory sie atakuj?!!

Hmmm ... MI te? jakos nic nie przychodzi do g?owy . Nie spotka?em sie jeszcze z czym? takim . A nie mo?esz po prostu zmieni? silnika na inny ???
 
Odp: [7.1] Potwory sie atakuj?!!

Niestety Nie!! Jest to najlepszy silnik 7.1 jaki znalazlem (dziala depo,przes?wanie i wyrzucanie item?w, loot z potwor?w, etc)
 
Odp: [7.1] Potwory sie atakuj?!!

Drakonia <<<< najlepszy silnik (survival ma duuzo wi?cej b??d?w)
@ off topic
Mam tez map edytora , ale nim nic nie zdzia?am :(
 
Status
Zamknięty.
Back
Do góry Bottom