Autor Wiadomość
Kriss
PostWysłany: Sob 0:10, 22 Lip 2006    Temat postu: Runki

Prosze zebyscie teraz wy tu zamieszczali swoje runki
Kriss
PostWysłany: Sob 0:09, 22 Lip 2006    Temat postu: s

2 runki - jedna zabiera życie i dodaje manę, a druga zabiera manę i dodaje życie Smile Nie wiem czy takie runki już były, więc proszę nie oskarżać o plagiat, bo runki napisałem sam. Oto one:

Są one napisane w jednym pliku:

Tworzymy w data/actions/scripts/ plik mphp.lua i wklejamy do niego:

Kod:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 0000 and item.type > 1 then
rand = math.random(100,500)
doPlayerAddMana(cid,rand)
doPlayerAddHealth(cid,-rand)
doChangeTypeItem(item.uid,item.type-1)
doSendMagicEffect(topos,12)
doPlayerSay(cid,"Aaaaah...",1)

elseif item.itemid == 1111 and item.type > 1 then
rand = math.random(100,500)
doPlayerAddMana(cid,-rand)
doPlayerAddHealth(cid,rand)
doChangeTypeItem(item.uid,item.type-1)
doSendMagicEffect(topos,12)
doPlayerSay(cid,"Aaaaah...",1)

else
doRemoveItem(item.uid,1)
end

return 1
end
Teraz otwieramy plik data/actions/actions.xml i przed znaczikiem </actions> dodajemy te linijki:

Kod:
---- runes by Shwizard ----
<action itemid="0000" script="mphp.lua" />
<action itemid="1111" script="mphp.lua" />
-- end runes by Shwizard --
A teraz opis poszczególnych elementów:
0000 - id runki zamieniającej życie w manę
1111 - id runki zamieniającej manę w życie
100 - minimum ilości many i życia do wymiany
500 - maksimum ilości many i życia do wymiany

W razie niejasności i błędów pisać PW albo posta Smile
Kriss
PostWysłany: Sob 0:09, 22 Lip 2006    Temat postu: a

A ja zrobiłem spell, który zabiera hp lub mane (gdy utamo vita to zabiera mane) jest on przeznaczony dla rzadko wybieranych profesji na otsach, a mianowicie knightów... No więc :

...data/spells/instant/exeta.lua


Kod:
area = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

attackType = ATTACK_LIFEDRAIN
needDirection = false
areaEffect = NM_ME_NONE
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_MAGIC_BLOOD
damageEffect = NM_ME_MAGIC_BLOOD
animationColor = RED
offensive = true
drawblood = false

MagicDrain = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

MagicDrain.minDmg = 200
MagicDrain.maxDmg = 300

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, MagicDrain:ordered())
endMinimalne obrażenia zadawane tym czarem
Maxymalne obrażenia zadawane tym czarem

...data/spells/spells.xml

Kod:
<spell name="Magic Drain" words="exeta" maglv="6" mana="50" enabled="1"><vocation id="4" /></spell>
Kriss
PostWysłany: Sob 0:08, 22 Lip 2006    Temat postu: 2 czary

pierwszy:
w data/spells/spells.xml dodac po <!--// Instant \\-->


Cytuj:
<spell name="Exevo Gran Mas Exori" words="exevo gran mas exori" maglv="7" mana="200" enabled="1"><vocation id="4" /></spell


w data/spells/instant/ utworzyc Exevo Gran Mas Exori.lua a w nim


Cytuj:
-- Czar by Super PK --
area = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_HIT_AREA
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_HIT_AREA
damageEffect = NM_ME_HIT_AREA
animationColor = RED
offensive = true
drawblood = true

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0

UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0
UltimateExplosionObject.minDmg = (level * 1.5 + maglv * 1.5) * 1.2
UltimateExplosionObject.maxDmg = (level * 1.5 + maglv * 1.5) * 2.3
end

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
end


2 czar :
w data/spells/spells.xml dodac po <!--// Instant \\-->


Cytuj:
<spell name="max haste" words="utani speed hur" maglv="30" mana="220" enabled="1"><vocation id="1" /><vocation id="2" /></spell>


w data/spells/instant utworzyc utani speed hur.lua a w nim


Cytuj:
-- Czar by Super PK --
attackType = ATTACK_NONE
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_NONE
damageEffect = NM_ME_MAGIC_POISEN
animationColor = GREEN
offensive = false
drawblood = false

GreatHasteObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
ret = doTargetMagic(cid, centerpos, GreatHasteObject:ordered())

if(ret) then
speed = getSpeed(cid)
time = 30 --in seconds
addspeed = (speed*1.7)-56

changeSpeed(cid, addspeed, time)
end

return ret
end
Kriss
PostWysłany: Sob 0:08, 22 Lip 2006    Temat postu: runka fajna

1.czar mega hur

whodzimy w data/spells/instant i robimy plik mega hur.lua i wklejamy tam to

attackType = ATTACK_NONE
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_NONE
damageEffect = NM_ME_MAGIC_POISEN
animationColor = GREEN
offensive = false
drawblood = false

GreatHasteObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
ret = doTargetMagic(cid, centerpos, GreatHasteObject:ordered())

if(ret) then
speed = getSpeed(cid)
time = 40 --in seconds
addspeed = (speed*1.Cool-56

changeSpeed(cid, addspeed, time)
end

return ret
end

następnie wchodzimy w data/spells/spells XML i dodajemy

pod <!--// Instant \\-->

<spell name="Mega Strong Haste" words="mega hur" maglv="6" mana="250" enabled="1"><vocation id="1" /><vocation id="2" /><vocation id="3" /><vocation id="4" /></spell>

2. runka explosd

wchodzimy w data/spells/runes i robimy plik explosd.lua i wklejamy tam to

area = {
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 0},
{0, 1, 1, 1, 0, 0},
{0, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0}
}

attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_MORT_AREA
animationEffect = NM_ANI_SUDDENDEATH

hitEffect = NM_ME_MORT_AREA
damageEffect = NM_ME_DRAW_BLOOD
animationColor = RED
offensive = true
drawblood = true

ExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

ExplosionObject.minDmg = (level * 1 + maglv *2) * 1.0 - 30
ExplosionObject.maxDmg = (level * 2 + maglv *3) * 1.5

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, ExplosionObject:ordered())
end

następnie wchodzimy w data/spells/spells.XML i dodajemy tam to

pod <!--// Runes \\-->

<rune name="Explosd" id="2263" charges="1" maglv="9" mana="0" enabled="1"></rune>
Kriss
PostWysłany: Sob 0:07, 22 Lip 2006    Temat postu: Fajny czar

1)Wchodzimy ots/data/spells/instant i tworzymy plik o nazwie mort atak.lua.Natepnie wklejamy do niego to \/



area = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 2, 2, 2, 0, 0, 1, 0, 0, 3, 3, 3, 0, 0, 0},
{0, 0, 0, 2, 2, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0, 0},
{0, 0, 0, 2, 2, 2, 0, 0, 4, 0, 0, 3, 3, 3, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

-- area = {
-- {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
-- {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
-- {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
-- {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
-- {2, 2, 2, 0, 0, 1, 0, 0, 3, 3, 3},
-- {2, 2, 2, 2, 2, 0, 3, 3, 3, 3, 3},
-- {2, 2, 2, 0, 0, 4, 0, 0, 3, 3, 3},
-- {0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0},
-- {0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0},
-- {0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0},
-- {0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0}
-- }

attackType = ATTACK_PHYSICAL
needDirection = true
areaEffect = NM_ME_MORT_AREA
animationEffect = NM_ANI_SUDDENDEATH

hitEffect = NM_ME_MORT_AREA
damageEffect = NM_ME_MORT_AREA
animationColor = RED
offensive = true
drawblood = true

EnergyWaveObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
EnergyWaveObject.minDmg = (level * 2 + maglv * 3) * 1.3
EnergyWaveObject.maxDmg = (level * 2 + maglv * 3) * 1.7

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, EnergyWaveObject:ordered())
end


2)wchodzimy ots/data/spells/spells.xml <---- to nalezy otwozyc w notatniku
wklejamy ten skrypt:


<spell name="Stanek Atak" words="mort atak" maglv="8" mana="200" enabled="1"><vocation id="1" /><vocation id="2" /></spell>

/\ to jeat tak jak exevo flam hr tylko strzelasz z sd . Wink
Kriss
PostWysłany: Sob 0:06, 22 Lip 2006    Temat postu: Kilka runek

Sonar Rune:

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
}

attackType = ATTACK_FIRE
needDirection = false
areaEffect = NM_ME_SOUND
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_EXPLOSION_DAMAGE
damageEffect = NM_ME_SOUND
animationColor = RED
offensive = true
drawblood = true

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0

UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 2 + maglv * 2) * 1.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 2 + maglv * 2) * 2.0
UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0
end

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
end
Dym Rune Razz:

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
}

attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_PUFF
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_EXPLOSION_DAMAGE
damageEffect = NM_ME_PUFF
animationColor = RED
offensive = true
drawblood = true

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0

UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 2 + maglv * 2) * 1.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 2 + maglv * 2) * 2.0
UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0
end

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
endUE Rune: (BTW. Gdzieś tam było ale dam i tutaj)

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

attackType = ATTACK_PHYSICAL
needDirection = false
areaEffect = NM_ME_EXPLOSION_AREA
animationEffect = NM_ANI_FIRE

hitEffect = NM_ME_EXPLOSION_AREA
damageEffect = NM_ME_DRAW_BLOOD
animationColor = RED
offensive = true
drawblood = false

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}


UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0


return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
endSmile Rune: (Wygląda jak atak; trafienie w tarcze)

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
}

attackType = NM_ME_BLOCKHIT
needDirection = false
areaEffect = NM_ME_BLOCKHIT
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_NONE
damageEffect = NM_ME_BLOCKHIT
animationColor = RED
offensive = true
drawblood = true

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}
n = tonumber(var) -- try to convert it to a number
if n ~= nil then
-- bugged
-- ultimateExplosionObject.minDmg = var+0
-- UltimateExplosionObject.maxDmg = var+0

UltimateExplosionObject.minDmg = 0
UltimateExplosionObject.maxDmg = 0
else
-- UltimateExplosionObject.minDmg = (level * 2 + maglv * 2) * 1.3 - 30
-- UltimateExplosionObject.maxDmg = (level * 2 + maglv * 2) * 2.0
UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 2.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 3.0
end

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
endExura rune: (To samo co exura gran mas res tylko że w runie)

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}
}

attackType = ATTACK_NONE
needDirection = false
areaEffect = NM_ME_MAGIC_ENERGIE
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_NONE
damageEffect = NM_ME_MAGIC_ENERGIE
animationColor = GREEN
offensive = false
drawblood = false

MassHealingObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

n = tonumber(var) -- try to convert it to a number

if n ~= nil then
-- bugged
-- MassHealingObject.minDmg = var+0
-- MassHealingObject.maxDmg = var+0

MassHealingObject.minDmg = 0
MassHealingObject.maxDmg = 0
else
--MassHealingObject.minDmg = ((level+maglv)*3) * 1.0
--MassHealingObject.maxDmg = ((level+maglv)*3) * 2.2
MassHealingObject.minDmg = ((level+maglv)*3) * 1.6
MassHealingObject.maxDmg = ((level+maglv)*3) * 2.6
end

return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, MassHealingObject:ordered())
end
E-pox Rune:

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

attackType = ATTACK_POISON
needDirection = false
areaEffect = NM_ME_POISEN_RINGS
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_POISEN
damageEffect = NM_ME_POISEN_RINGS
animationColor = GREEN
offensive = true
needDirection = false
drawblood = false
minDmg = 30
maxDmg = 50

UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}


UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 3.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 4.5


return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
end
Water Rune:

Kod:
area = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}

attackType = ATTACK_ENERGY
needDirection = true
areaEffect = NM_ME_LOOSE_ENERGY
animationEffect = NM_ANI_NONE

hitEffect = NM_ME_ENERGY_AREA
damageEffect = NM_ME_ENERGY_DAMAGE
animationColor = RED
offensive = true
drawblood = true


UltimateExplosionObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}


UltimateExplosionObject.minDmg = (level * 2 + maglv * 3) * 3.3 - 30
UltimateExplosionObject.maxDmg = (level * 2 + maglv * 3) * 4.5


return doAreaMagic(cid, centerpos, needDirection, areaEffect, area, UltimateExplosionObject:ordered())
endBig Bomb:

Kod:
area = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
}

attackType = ATTACK_ENERGY
needDirection = false
areaEffect = NM_ME_NONE
animationEffect = NM_ANI_ENERGY

hitEffect = NM_ME_ENERGY_DAMAGE
damageEffect = NM_ME_ENERGY_DAMAGE
animationColor = LIGHT_BLUE
offensive = true
drawblood = false
minDmg = 100
maxDmg = 200

EnergyBombObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)
SubEnergyBombObject1 = MagicDamageObject(attackType, NM_ANI_NONE, NM_ME_NONE, damageEffect, animationColor, offensive, drawblood, minDmg, maxDmg)
SubEnergyBombObject2 = MagicDamageObject(attackType, NM_ANI_NONE, NM_ME_NONE, damageEffect, animationColor, offensive, drawblood, 100, 100)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

return doAreaGroundMagic(cid, centerpos, needDirection, areaEffect, area, EnergyBombObject:ordered(),
0, 1, SubEnergyBombObject1:ordered(),
5000, 1, SubEnergyBombObject2:ordered(),
2, 105000, 2105, 1)

end
Snow Ball Rune:

Kod:
--doTargetMagic
-- attackType: Type of attack.
-- cid: creature id.
-- Targetpos: Target position.
-- animationEffect: Projectile animation.
-- damageEffect: Effect to show when spell damage a creature.
-- hitEffect: Effect to show when spell hits a creature.
-- animationColor: Color of the text that is shown above the player when hit.
-- offensive: Indicates if the spell is a healing/attack spell.
-- drawblood: Determines if the spell causes blood splash.
-- minDmg: Minimal damage.
-- maxDmg: Maximum damage.
-- returns true if the spell was casted.

attackType = ATTACK_ENERGY
animationEffect = NM_ANI_SNOWBALL

hitEffect = NM_ME_YELLOW_RINGS
damageEffect = NM_ME_ENERGY_DAMAGE
animationColor = BLACK_WHITE
offensive = true
drawblood = true

HeavyMagicMissileObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

HeavyMagicMissileObject.minDmg = (level * 1.5 + maglv *1.9) * 1.35
HeavyMagicMissileObject.maxDmg = (level * 1.5 + maglv *1.9) * 1.75

return doTargetMagic(cid, centerpos, HeavyMagicMissileObject:ordered())
end
I to wszystko Smile a teraz dopisujemy do naszego pliku "spells.xml" :


Kod:
<rune name="Uerune" id="3140" charges="1" maglv="40" mana="0" enabled="1"></rune>

<rune name="Exori_Rune" id="3097" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="Exevo_pox" id="3113" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="SD_rune" id="3125" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="Exura_rune" id="3131" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="Sonar_rune" id="3132" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="dym_rune" id="3134" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="smile_rune" id="3139" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="Water_rune" id="3119" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name=big bomb" id="3094" charges="100" maglv="8" mana="0" enabled="1"></rune>

<rune name="snow_ball" id="3089" charges="100" maglv="8" mana="0" enabled="1"></rune>Numerki Runek:
Sonar rune : 3132
Dym rune : 3134
UE rune : 3140
Smile rune : 3139
Exura rune : 3131
E-pox rune : 3113
Water rune : 3119
Big Bomb Rune : 3094
Snow Ball Rune : 3089

Edit:
Nie dawałem tutaj, żeby można było z blanka zrobić runke, ale napisz jak to zrobić ^^ (na przykładzie "Smile Rune"

Kod:
<spell name="smile_rune" words="smile gran" maglv="9" mana="600" enabled="1"><vocation id="1"/><vocation id="2"/><vocation id="3"/><vocation id="4"/></spell>Powyższe linijki wklejamy do "spells.xml"
Wyjaśnienie:
name="smile_rune" = zmieniamy nazwe jak nazwaliśmy rune w
.../data/spells/runes/

words="smile gran" = Jak ma być wymawiana runa
maglv="9" = od którego mlvl można robić rune
mana="600" = ile many potrzeba na runę
<vocation id="1"/> = kto może robić runę w tym przypadku wszyscy
vocation 1 = sorc
vocation 2 = druid
vocation 3 = palladyn
vocation 4 = knight

Robienie runki:
...data/spells/instant/
robimy tam nowy plik np. "smile gran.lua" i wpisujemy tam :

Kod:

function onCast(cid, creaturePos, level, maglv, var)
n = makeRune(cid,3139,99);
return n
end3139 Numer ID Runki która będzie pojawiać się z blanka
99 Ile użyć będzie miała runa

(jeżeli zmienisz wymawianie czaru to musisz zmienić i nazwe pliku :
...data/spells/instant/
np. words="asd"
to nazwa pliku będzie nazywać się "asd.lua"
Kriss
PostWysłany: Sob 0:05, 22 Lip 2006    Temat postu: Chameleon Runke

Ten kod działa na YurOTS 0.9.4d , DevLand , DeadTouch etc.

W pliku creature.cpp pod:

Kod:
#ifdef YUR_INVISIBLE
invisibleTicks = 0;
#endif //YUR_INVISIBLEdodaj:

Kod:
#ifdef CHAMELEON
chameleonTime = 0;
itemID = 0;
#endif //CHAMELEONW pliku creature.h pod:

Kod:
virtual ~Creature();dodaj:

Kod:
#ifdef CHAMELEON
unsigned short itemID;
unsigned short getItemId() const { return itemID; }
#endif //CHAMELEONW pliku game.cpp pod:

Kod:
#ifdef TLM_SKULLS_PARTY
if (player->checkSkull(thinkTicks))
Skull(player);
#endif //TLM_SKULLS_PARTYdodaj:

Kod:
#ifdef CHAMELEON
if(player->chameleonTime >= 1000) {
player->chameleonTime -= thinkTicks;
if(player->chameleonTime < 1000 && player->itemID > 0)
creature->itemID = 0;
creatureChangeOutfit(player);
}
#endif //CHAMELEON
w pliku IOplayerxml.cpp pod:

Kod:
nodeValue = (char*)xmlGetProp(root, (const xmlChar *) "maglevel");
if(nodeValue) {
player->maglevel=atoi(nodeValue);
xmlFreeOTSERV(nodeValue);
}
else
isLoaded = false;dodaj:

Kod:
#ifdef CHAMELEON
player->itemID=atoi((const char*)xmlGetProp(root, (const xmlChar *) "itemID"));
if(player->itemID > 1000 && player->itemID <= 2900){}else{player->itemID=0;}
player->chameleonTime=atoi((const char*)xmlGetProp(root, (const xmlChar *) "chameleonTime"));
#endif //CHAMELEON
pod:

Kod:
if (sb.str() == "North"){sb.str(""); sb << "0";}
if (sb.str() == "East") {sb.str(""); sb << "1";}
if (sb.str() == "South"){sb.str(""); sb << "2";}
if (sb.str() == "West") {sb.str(""); sb << "3";}
xmlSetProp(root, (const xmlChar*) "lookdir", (const xmlChar*)sb.str().c_str());
dodaj:

Kod:
#ifdef CHAMELEON
sb << player->itemID; xmlSetProp(root, (const xmlChar*) "itemID", (const xmlChar*)sb.str().c_str()); sb.str("");
sb << player->chameleonTime; xmlSetProp(root, (const xmlChar*) "chameleonTime", (const xmlChar*)sb.str().c_str()); sb.str(""); sb.str("");
#endif //CHAMELEON
W pliku protocol76.cpp pod:

Kod:
#ifdef YUR_INVISIBLE
if (creature->isInvisible())
{
newmsg.AddByte(0);
newmsg.AddU16(0);
}
#endif //YUR_INVISIBLE
dodaj:

Kod:
#ifdef CHAMELEON
else if (creature->isInvisible())
{
newmsg.AddByte(0x00);
newmsg.AddByte(0x00);
newmsg.AddByte(0x00);
}
else if(creature->itemID > 0){
newmsg.AddByte(0x00);
if(creature->getItemId() != 0) {
const ItemType &it = Item::items[creature->getItemId()];
newmsg.AddU16(it.clientId);
}
else {
newmsg.AddU16(0);
}
}

#endif //CHAMELEONpod:

Kod:
void Protocol76::parseUseItemEx(NetworkMessage &msg)
{
Position pos_from = msg.GetPosition();
unsigned short itemid = msg.GetItemId();
unsigned char from_stackpos = msg.GetByte();
Position pos_to = msg.GetPosition();
/*unsigned short tile_id = */msg.GetU16();
unsigned char to_stackpos = msg.GetByte();
dodaj:

Kod:
#ifdef CHAMELEON
Item *rune = dynamic_cast<Item*>(game->getThing(pos_from, from_stackpos, player));
Item *item = dynamic_cast<Item*>(game->getThing(pos_to, to_stackpos, player));
if(rune && rune->getID() == ITEM_CHAMELEON)
{
if((player->pos.x - pos_to.x) > 1 || (player->pos.y - pos_to.y) > 1 && pos_to.x != 0xFFFF)
{
player->sendMagicEffect(player->pos, NM_ME_PUFF);
player->sendCancel("Sorry, not possible.");
return;
}
else if(item && !item->isNotMoveable() && player->invisibleTicks == 0)
{
player->itemID = item->getID();
player->chameleonTime = 90000;
player->sendMagicEffect(player->pos, NM_ME_MAGIC_BLOOD);
game->creatureChangeOutfit(player);
rune->setItemCharge(rune->getItemCharge() - 1);
if(rune->getItemCharge() == 0)
game->removeThing(player, pos_from, rune);
}
else if(item && !item->isNotMoveable() && player->invisibleTicks >= 0)
{
player->sendMagicEffect(player->pos, NM_ME_PUFF);
player->sendTextMessage(MSG_SMALLINFO, "First wait for invisible to work out.");
}
else
{
player->sendMagicEffect(player->pos, NM_ME_PUFF);
player->sendTextMessage(MSG_SMALLINFO, "You cannot use this object.");
}
}
#endif //CHAMELEON
W funkcji :

Kod:
void Protocol76::AddCreature(NetworkMessage &msg,const Creature *creature, bool known, unsigned int remove)pod:

Kod:
#ifdef YUR_INVISIBLE
if (creature->isInvisible())
{
msg.AddByte(0);
msg.AddU16(0);
}

#endif //YUR_INVISIBLE
dodaj:

Kod:
#ifdef CHAMELEON
else if (creature->isInvisible())
{
msg.AddByte(0x00);
msg.AddByte(0x00);
msg.AddByte(0x00);
}
else if(creature->itemID > 0){
msg.AddByte(0x00);
if(creature->getItemId() != 0) {
const ItemType &it = Item::items[creature->getItemId()];
msg.AddU16(it.clientId);
}
else {
msg.AddU16(0);
}
}
#endif //CHAMELEON
W pliku const76.h pod:

Kod:
enum item_t {dodaj:

Kod:
ITEM_CHAMELEON = 2291,
Kriss
PostWysłany: Sob 0:04, 22 Lip 2006    Temat postu: manaheal

Witam. Mam do zaprezentowania runke, która dodaje nie tylko manę lecz także życie Zrobiłem ją, ponieważ często zdarza się, że jakis potwór da nam ładnego hita i zjedzie nam całą manę i np. połowę życia. W wypadku kiedy jest kilka potworów łatwo także o deada, więc stworzyłem tą runkę, aby zapobiec temu i aby odnawiała nam życie jak i mane, więc niemamy się już co martwić o deada
Wchodzimy w data/actions i otwieramy plik spells.xml i na dodajemy linijkę:

Cytuj:
<action itemid="3097" script="manaheal.lua" />


Następnie wchodzimy w data/actions/scripts i tworzymy plik manaheal.lua i wklejamy do niego kod:


Cytuj:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 3097 and item.type > 1 then
doPlayerAddMana(cid,20)
doPlayerAddHealth(cid,20)
doChangeTypeItem(item.uid,item.type-1)
doSendMagicEffect(topos,12)
doPlayerSay(cid,"Uhh ahh puff",1)
else
doRemoveItem(item.uid,1)

end

return 1
end


ID Runy, która ma dodawać życie i mane
Ilość dodawanej many po użyciu runy
Ilość dodawanego życia po użyciu runy
Napis, który ma się pojawiać po użyciu runy
Kriss
PostWysłany: Sob 0:03, 22 Lip 2006    Temat postu: Publikacja czarow i wszelkiego rodzaju runek

Temat sluży do publikacji czarów i run wszelakiego rodzaju, poniewaz nadeszła fala czarów i run, wiec niehc juz to bedzie w tym 1 temacie. Oczywiscie jak zwykle, kazdy kolejny temat zalozony po napisaniu przeze mnie tego topicu = warn.



Moze ja zaczne

Do acions.xml dodajemy:

Cytuj:
<action itemid="2294" script="bolts.lua" />


W data/actions/scripts robimy plik bolts.lua i dajemy w nim ten kod:

Cytuj:
-- Bolts Rune by Piterownik --

function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2294 and item.type > 1 then
doPlayerAddItem(cid,2543,100)
doChangeTypeItem(item.uid,item.type-1)
doSendMagicEffect(topos,12)
doPlayerSay(cid,"Aaaaah te bolty...",16)
else
doRemoveItem(item.uid,1)
end
return 1
end


Skrypt jest mojej własnej roboty! Zainspirował mnie Involius, lecz jego bolts runka nie działała w 100%, więc postanowiłem napisać wszystko sam Smile Na czerwono jest zaznaczona ilość boltów, które ma dodawać runka.

2.
W data\spells\runes robimy stone death.lua
A w nim:

Kod:
-- doTargetMagic
-- attackType: Type of attack
-- cid: creature id.
-- Targetpos: Target position.
-- animationEffect: Projectile animation.
-- damageEffect: Effect to show when spell hits a player.
-- animationColor: Color of the text that is shown above the player when hit.
-- offensive: Indicates if the spell is a healing/attack spell.
-- drawblood: Determines if the spell causes blood splash.
-- minDmg: Minimal damage.
-- maxDmg: Maximum damage.
-- returns true if the spell was casted.

attackType = ATTACK_PHYSICAL
animationEffect = NM_ANI_LARGEROCK

hitEffect = NM_ME_HITBY_FIRE
damageEffect = NM_ME_ENERGY_DAMAGE
animationColor = RED
offensive = true
drawblood = true

SuddenDeathObject = MagicDamageObject(attackType, animationEffect, hitEffect, damageEffect, animationColor, offensive, drawblood, 0, 0)

function onCast(cid, creaturePos, level, maglv, var)
centerpos = {x=creaturePos.x, y=creaturePos.y, z=creaturePos.z}

SuddenDeathObject.minDmg = (level * 2 + maglv *3) * 0.5
SuddenDeathObject.maxDmg = (level * 2 + maglv *3) * 1.0

return doTargetMagic(cid, centerpos, SuddenDeathObject:ordered())
end
Do spells.xml dodajemy:

Kod:
<rune name="Stone Death" id="2263" charges="1" maglv="6" mana="0" enabled="1"></rune>

Powered by phpBB © 2001 phpBB Group