#1 2008-02-24 14:22:33

Rah Vook

http://img170.imageshack.us/img170/1838/moderatorcq9.png

7186578
Skąd: Exiva "Me
Zarejestrowany: 2008-02-24
Posty: 26
Punktów :   

Pływanie na OTS ; )

Zrob plik plywanie.lua w scierzce data/movements/scripts/plywanie.lua

A teraz kod:

Cytat:
    function onStepIn(cid, item, position, fromPosition)
--Skrypt na plywanie by Slawkens & edit by Muniek
if isPlayer(cid) == TRUE then
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
if item.itemid == 7943 then
pozycja = {x = position.x, y = position.y - 2, z = position.z}
elseif item.itemid == 7944 then
pozycja = {x = position.x - 2, y = position.y, z = position.z}
elseif item.itemid == 7945 then
pozycja = {x = position.x, y = position.y + 2, z = position.z}
elseif item.itemid == 7946 then
pozycja = {x = position.x + 2, y = position.y, z = position.z}
elseif item.itemid == 7947 then
pozycja = {x = position.x + 2, y = position.y + 1, z = position.z}
elseif item.itemid == 7948 then
pozycja = {x = position.x - 2, y = position.y + 1, z = position.z}
elseif item.itemid == 7949 then
pozycja = {x = position.x + 2, y = position.y - 1, z = position.z}
elseif item.itemid == 7950 then
pozycja = {x = position.x - 2, y = position.y - 1, z = position.z}
elseif item.itemid == 7951 then
pozycja = {x = position.x + 2, y = position.y + 2, z = position.z}
elseif item.itemid == 7952 then
pozycja = {x = position.x - 2, y = position.y + 2, z = position.z}
elseif item.itemid == 7953 then
pozycja = {x = position.x + 2, y = position.y - 2, z = position.z}
elseif item.itemid == 7954 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 == 7943 then
kierunek = 2
elseif item.itemid == 7944 then
kierunek = 1
elseif item.itemid == 7945 then
kierunek = 0
elseif item.itemid == 7946 then
kierunek = 3
elseif item.itemid == 7947 then
kierunek = 3
elseif item.itemid == 7948 then
kierunek = 1
elseif item.itemid == 7949 then
kierunek = 3
elseif item.itemid == 7950 then
kierunek = 2
elseif item.itemid == 7951 then
kierunek = 3
elseif item.itemid == 7952 then
kierunek = 1
elseif item.itemid == 7953 then
kierunek = 3
elseif item.itemid == 7954 then
kierunek = 1
end
doSetCreatureOutfit(cid, zwykly, 1)
doMoveCreature(cid, kierunek)
setPlayerStorageValue(cid, plywavalue, 2)
end
end
return TRUE
end


Wejdz w data/movements/movements.xml i plik movements.xml


I dopisz kod:

Cytat:
    <!-- Swimming by slawkens & edit by Muniek-->
<movevent event="StepIn" fromid="7943" toid="7954" script="plywanie.lua"/>

Ok, no więc ten skrypt działa tak samo jak na RL - na plaży. Brzegi muszą mieć ID - 7943-7954
Żeby można było pływać po wodzie to musi ona mieć ID - 4622.

Offline

 

#2 2008-03-20 11:22:38

Admin

http://img262.imageshack.us/img262/9884/adminep0.png

Zarejestrowany: 2008-02-23
Posty: 41
Punktów :   
WWW

Re: Pływanie na OTS ; )

Fajny scrypt napewno sie przyda

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
przegrywanie kaset vhs zasięg odbioru kaset vhs w-wa PIT i CIT gastronomia