Autor Wiadomość
Game Over
PostWysłany: Czw 7:56, 17 Sty 2008    Temat postu:

No Basenik sie przyda
dla innych kturzy robia ots
ja narazie nie robie nie chce mi sie Smile
Shadow
PostWysłany: Śro 13:28, 16 Sty 2008    Temat postu: Pływanie :D

No to zaczynamy !

Robimy plik tak jak tu jest pokazane
---->data/movements/scripts/swimming.lua

i wklejamy do niego to :

function onStepIn(cid, item, position, fromPosition)
--Skrypt na plywanie by Slawkens
plywavalue = 3330
nurek = { lookType = 267, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0 }
zwykly = { lookType = getPlayerStorageValue(cid, 3331), lookHead = getPlayerStorageValue(cid, 3332), lookBody = getPlayerStorageValue(cid, 3333), lookLegs = getPlayerStorageValue(cid, 3334), lookFeet = getPlayerStorageValue(cid, 3335), lookAddons = getPlayerStorageValue(cid, 3336) }
czyplywa = getPlayerStorageValue(cid, plywavalue)
if (czyplywa == -1) or (czyplywa == 2) then
pozycja = {x = 124, y = 58, z= 7}
if item.itemid == 4632 then
pozycja = {x = position.x, y = position.y - 2, z = position.z}
elseif item.itemid == 4633 then
pozycja = {x = position.x - 2, y = position.y, z = position.z}
elseif item.itemid == 4634 then
pozycja = {x = position.x, y = position.y + 2, z = position.z}
elseif item.itemid == 4635 then
pozycja = {x = position.x + 2, y = position.y, z = position.z}
elseif item.itemid == 4636 then
pozycja = {x = position.x + 2, y = position.y + 1, z = position.z}
elseif item.itemid == 4637 then
pozycja = {x = position.x - 2, y = position.y + 1, z = position.z}
elseif item.itemid == 4638 then
pozycja = {x = position.x + 2, y = position.y - 1, z = position.z}
elseif item.itemid == 4639 then
pozycja = {x = position.x - 2, y = position.y - 1, z = position.z}
elseif item.itemid == 4640 then
pozycja = {x = position.x + 2, y = position.y + 2, z = position.z}
elseif item.itemid == 4641 then
pozycja = {x = position.x - 2, y = position.y + 2, z = position.z}
elseif item.itemid == 4642 then
pozycja = {x = position.x + 2, y = position.y - 2, z = position.z}
elseif item.itemid == 4643 then
pozycja = {x = position.x - 2, y = position.y - 2, z = position.z}
end
setPlayerStorageValue(cid, 3331, getCreatureOutfit(cid).lookType)
setPlayerStorageValue(cid, 3332, getCreatureOutfit(cid).lookHead)
setPlayerStorageValue(cid, 3333, getCreatureOutfit(cid).lookBody)
setPlayerStorageValue(cid, 3334, getCreatureOutfit(cid).lookLegs)
setPlayerStorageValue(cid, 3335, getCreatureOutfit(cid).lookFeet)
setPlayerStorageValue(cid, 3336, getCreatureOutfit(cid).lookAddons)
setPlayerStorageValue(cid, plywavalue, 1)
doSetCreatureOutfit(cid, nurek, 600000)
doTeleportThing(cid, pozycja, TRUE)
doSendMagicEffect(position, 2)
doSendMagicEffect(pozycja, 53)
elseif czyplywa == 1 then
if item.itemid == 4632 then
kierunek = 2
elseif item.itemid == 4633 then
kierunek = 1
elseif item.itemid == 4634 then
kierunek = 0
elseif item.itemid == 4635 then
kierunek = 3
elseif item.itemid == 4636 then
kierunek = 3
elseif item.itemid == 4637 then
kierunek = 1
elseif item.itemid == 4638 then
kierunek = 3
elseif item.itemid == 4639 then
kierunek = 2
elseif item.itemid == 4640 then
kierunek = 3
elseif item.itemid == 4641 then
kierunek = 1
elseif item.itemid == 4642 then
kierunek = 3
elseif item.itemid == 4643 then
kierunek = 1
end
doSetCreatureOutfit(cid, zwykly, 1)
doMoveCreature(cid, kierunek)
setPlayerStorageValue(cid, plywavalue, 2)
end
return TRUE
end

-----------------------------------------------------------

I na konciec wchodzimy w data/movements/movements.xml
i wklejamy gdzies to :

<!-- Swimming -->
<movevent event="StepIn" actionid="3333" script="swimming.lua"/>


Mam nadzieje ze skrypt bendzie działał dla innych to udostepniam

Powered by phpBB © 2001,2002 phpBB Group