Bardzo ciche to forum wiec ja tez co¶ wrzucę.
--------------------------------------------------------
Skrypt wypróbowany na The Forgotten Server i możliwe, że na innych będ± błędy.
1
Tworzymy plik data/movements/scripts/swimming.lua
Kod:
function onStepIn(cid, item, position, fromPosition) 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
Oczywi¶cie w miejsce moich współrzędnych wpisujemy własne.
|