What's new

Skrypty & Kody Summon

Status
Not open for further replies.

woj132

Active User
Joined
May 18, 2010
Messages
57
Reaction score
1
Witam, zrobi?em summon i wszystko gra, ale... jest on nie?miertelny i bije ownera, o ile pami?tam odznacza?em hostile i te? bi? ownera, i co tu zrobi??
Protok?? 8.54
spell:
[XML]function onCastSpell(cid, var)

local playerpos = getPlayerPosition(cid)
local cloth = getCreatureOutfit(cid)
local health = getCreatureHealth(cid)
local maxhealth = getCreatureMaxHealth(cid)
local MaximoSummon = 1


local summons = getCreatureSummons(cid)
if(table.maxn(summons) < MaximoSummon) then -- no summons
if getPlayerLevel(cid) <= 29 then
local clone = doCreateMonster("akamaru", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
return TRUE
elseif getPlayerLevel(cid) <= 39 then
local clone = doCreateMonster("akamaru1", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
elseif getPlayerLevel(cid) <= 49 then
local clone = doCreateMonster("akamaru2", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
elseif getPlayerLevel(cid) <= 79 then
local clone = doCreateMonster("akamaru3", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
elseif getPlayerLevel(cid) <= 99 then
end
end
end
[/XML]

monster:
[XML]<?xml version="1.0" encoding="UTF-8"?>
<monster name="Akamaru" nameDescription="akamaru" race="blood" experience="35" speed="250" manacost="300">
<health now="50" max="50"/>
<look type="420" corpse=""/>
<targetchange interval="2000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="1"/>
<flag attackable="0"/>
<flag hostile="0"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="1"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="15" attack="150"/>
<attack name="lifedrain" interval="1000" chance="9" range="1" min="-7" max="-13"/>
</attacks>
<defenses armor="2" defense="9"/>
<elements>
<element deathPercent="100"/>
<element holyPercent="-25"/>
</elements>
<loot>
<item id="2152" countmax="2" chance="24400"/> <!-- platinum coin -->
</loot>
</monster>[/XML]

@edit:
Zaznaczy?em attackable i mo?na bi? summona, ale... nadal bije ownera
 

Mr ImaGu?

Advanced User
Joined
Dec 13, 2014
Messages
289
Reaction score
10
Odp: Summon

problem zapewne jest przy czarze zmien na inny i spr?buj ponownie , jak to wypali szukaj b??du w spells . Tez tak kiedy? mia?em dlatego wklei?em inny .
 

woj132

Active User
Joined
May 18, 2010
Messages
57
Reaction score
1
Odp: Summon

@up:
Szuka?em innego summon skrypta i nie znalaz?em takiego, ?eby by? podobny do tego


Zmieni?em:
[LUA]elseif getPlayerLevel(cid) <= 49 then
local clone = doCreateMonster("akamaru2", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
[/LUA]
Na:
[LUA]local clone = doSummonCreature("akamaru2", playerpos)
doConvinceCreature(cid, clone)
setCreatureMaxHealth(clone, maxhealth)
doCreatureAddHealth(clone, health)
doSendMagicEffect(playerpos, 2)
[/LUA]
I summon przez pierwsze X(5sek max) nie bije, potem dalej bije ownera
 
Last edited:

woj132

Active User
Joined
May 18, 2010
Messages
57
Reaction score
1
Odp: Summon

f5, serio musz? inny wykmini? skrypt?
 

dami1310

Poskramiacz Internet?w
Joined
Jun 1, 2009
Messages
1,385
Reaction score
113
Odp: Summon

Spr?buj z tym:
Code:
function onCastSpell(cid, var)
local summons = getCreatureSummons(cid)

if getPlayerStorageValue(cid, 19663) == -1 then
if getPlayerMana(cid) >= 100 then
local summonek = doCreateMonster("Taurus", getCreaturePosition(cid))
    doSendMagicEffect(getCreaturePosition(cid), 1)
    doConvinceCreature(cid, summonek)
    doPlayerAddMana(cid, -100)
    setPlayerStorageValue(cid, 19663, 1)
end
end

if getPlayerStorageValue(cid, 19663) == 1 then
for _, pid in ipairs(summons) do
if getCreatureName(pid) == "Taurus" then
    doSendMagicEffect(getCreaturePosition(pid), 2)
	doRemoveCreature(pid)
	setPlayerStorageValue(cid, 19663, -1)
end
end
end

return false
end
Podmie? "Taurus" na nazw? potworka, kt?rego chcesz przywo?a?.
 

woj132

Active User
Joined
May 18, 2010
Messages
57
Reaction score
1
Odp: Summon

Musz? 1 linijk? dopisa? odno?nie z lvlem, jak wr?c? to sprawdz? po 20;00 dam zna? czy zadzia?a


@edit
zsummonowa?em akamaru, lecz zaraz da?em hide i chcia?em od nowa i ju? nie mog?em poprzez storage zrobi? go, wi?c usun??em storage i nie dzia?a? d?? i d?? te? i dzia?a? skrypt, ale dalej bi? ownera.
 
Last edited:
Status
Not open for further replies.
Top