Xart Irok
Senior User
- Dołączył
- Wrzesień 7, 2008
- Posty
- 2925
- Liczba reakcji
- 410
- Wiek
- 34
teraz bym chcial powiedziec ze ten skrypt zostal przezemnie na pisany dzialanie tego skryptu zostalo pokazane na tym filmie
Link:
teraz moze do kon kretu przejde przedstawiam wam
zacnijmy od czegos prostego
w Data/movements/movements.xml wklej te dwie lnijki
Wersja prosta v1
Data/movements/script/nazwa.lua
Data/movements/script/nazwa.lua
Wersja drudniejsza v2
Data/movements/script/nazwa.lua
Data/movements/script/nazwa.lua
Legenda:
xxx - pozycja potwora
zzz - effekt magic
nazwa.lua - nazwa skryptu
8961 - id itemu
---- - uniqueid plytki
Trainer2 - nazwa treinera
potwor do tego dla z krzecznosci wam go daje
prosze oceniac dawac kometarze i reputki za wszystko bog zaplaci
Zabraniam kopjowania tego tematu na inne fora
mam prawa autorskie©
Link:
Nie masz wystarczających uprawnień, aby zobaczyć link.
Zaloguj or Rejestracja
teraz moze do kon kretu przejde przedstawiam wam
Train advance system ots
teraz skryptyzacnijmy od czegos prostego
w Data/movements/movements.xml wklej te dwie lnijki
Kod:
<movevent event="StepIn" uniqueid="[COLOR="Blue"]----[/COLOR]" script="[COLOR="Red"]nazwa.lua[/COLOR]" />
<movevent event="StepOut" uniqueid="[COLOR="#0000ff"]----[/COLOR]" script="[COLOR="#ff0000"]nazwa.lua[/COLOR]" />
Wersja prosta v1
Data/movements/script/nazwa.lua
PHP:
function onStepIn(cid, item, position, fromPosition)
local monster1 = "Trainer" -- Nazwa 1 monstera
local monster2 = "Trainer" -- Nazwa 2 monstera
local charPos = getCreaturePosition(cid)
local monster1pos = {x = charPos.x + 1, y = charPos.y + 1, z = charPos.z, stackpos=1} -- Pozycja 1 monstera
local monster2pos = {x = charPos.x - 1, y = charPos.y + 1, z = charPos.z, stackpos=1} -- Pozycja 2 monstera
local efekt = 53 -- Efekt, gdy potwory sie pojawiaja
if item.actionid == 3000 then
doCreateMonster(monster1, monster1pos)
doCreateMonster(monster2, monster2pos)
doSendMagicEffect(monster1pos, efekt)
doSendMagicEffect(monster2pos, efekt)
end
return 1
end
PHP:
function onStepOut(cid, item, position, fromPosition)
local efekt = 53
local charPos = getCreaturePosition(cid)
local monster1pos = {x = charPos.x + 1, y = charPos.y + 2, z = charPos.z, stackpos=255} -- Pozycja 1 monstera
local monster2pos = {x = charPos.x - 1, y = charPos.y + 2, z = charPos.z, stackpos=255} -- Pozycja 2 monstera
if item.actionid == 3000 then
doRemoveCreature(getThingfromPos(monster1pos).uid)
doRemoveCreature(getThingfromPos(monster2pos).uid)
doSendMagicEffect(monster1pos, efekt)
doSendMagicEffect(monster2pos, efekt)
end
return 1
end
Wersja drudniejsza v2
Data/movements/script/nazwa.lua
PHP:
function onStepIn(cid, item, pos)
local monster1 = "Trainer" -- Nazwa 1 monstera
local monster2 = "Trainer" -- Nazwa 2 monstera
local charPos = getCreaturePosition(cid)
local monster1pos = {x = charPos.x - 1, y = charPos.y + 1, z = charPos.z, stackpos=1} -- Pozycja 1 monstera
local monster2pos = {x = charPos.x - 1, y = charPos.y - 1, z = charPos.z, stackpos=1} -- Pozycja 2 monstera
local efekt = 255 -- Efekt, gdy potwory sie pojawiaja
if item.actionid == 3000 then
doRemoveItem(getThingfromPos(monster1pos).uid, 1)
doRemoveItem(getThingfromPos(monster2pos).uid, 1)
doSummonCreature(monster1, monster1pos)
doSummonCreature(monster2, monster2pos)
doSendMagicEffect(monster1pos, efekt)
doSendMagicEffect(monster2pos, efekt)
end
end
PHP:
function onStepOut(cid, item, pos)
local efekt = 45
local charPos = getCreaturePosition(cid)
local monster1pos = {x = charPos.x - 2, y = charPos.y + 1, z = charPos.z, stackpos=255} -- Pozycja 1 monstera
local monster2pos = {x = charPos.x - 2, y = charPos.y - 1, z = charPos.z, stackpos=255} -- Pozycja 2 monstera
if item.actionid == 3000 then
doRemoveCreature(getThingfromPos(monster1pos).uid)
doRemoveCreature(getThingfromPos(monster2pos).uid)
doCreateItem(8961, 1, monster1pos)
doCreateItem(8961, 1, monster2pos)
doSendMagicEffect(monster1pos, efekt)
doSendMagicEffect(monster2pos, efekt)
end
end
Legenda:
xxx - pozycja potwora
zzz - effekt magic
nazwa.lua - nazwa skryptu
8961 - id itemu
---- - uniqueid plytki
Trainer2 - nazwa treinera
potwor do tego dla z krzecznosci wam go daje
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Trainer2" nameDescription="a Trainer2" race="undead" experience="0" speed="250" manacost="1000">
<health now="60000" max="60000"/>
<look type="292" head="0" body="0" legs="0" feet="0" corpse="8960"/>
<targetchange interval="2000" chance="5"/>
<strategy attack="70" defense="20"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="55" attack="1"/>
</attacks>
<defenses armor="25" defense="52">
<defense name="healing" interval="1000" chance="17" min="100000" max="100000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="10" speedchange="1100" duration="2000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity poison="0"/>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="You think you are strong?!?"/>
</voices>
<loot capacity="500">
</loot>
</monster>
Zabraniam kopjowania tego tematu na inne fora
mam prawa autorskie©
Ostatnia edycja: