[8.1]swimming by dami

Status
Zamknięty.

Soul of dragon

Active User
Zarejestrowany
Dołączył
Kwiecień 5, 2008
Posty
138
Liczba reakcji
5
mam w tym pliku cos takiego:
Kod:
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == 1 then
swimvalue = 3330 --storagevalue to check
diveroutfit = { lookType=267,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0}
standardoutfit = { lookType = getPlayerStorageValue(cid, 3331), lookHead = getPlayerStorageValue(cid, 3332), lookBody =
getPlayerStorageValue(cid, 3333), lookLegs = getPlayerStorageValue(cid, 3334), lookFeet = getPlayerStorageValue(cid, 3335), lookAddons =
getPlayerStorageValue(cid, 3336) }
isswimming = getPlayerStorageValue(cid, swimvalue)
if isPlayer(cid) == 1 and (isswimming == -1) or (isswimming == 2) then
if item.itemid == 4632 then
pos = {x = position.x, y = position.y - 1, z = position.z}
elseif item.itemid == 4633 then
pos = {x = position.x - 1, y = position.y, z = position.z}
elseif item.itemid == 4634 then
pos = {x = position.x, y = position.y + 1, z = position.z}
elseif item.itemid == 4635 then
pos = {x = position.x + 1, y = position.y, z = position.z}
elseif item.itemid == 4636 then
pos = {x = position.x + 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4637 then
pos = {x = position.x - 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4638 then
pos = {x = position.x + 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4639 then
pos = {x = position.x - 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4640 then
pos = {x = position.x + 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4641 then
pos = {x = position.x - 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4642 then
pos = {x = position.x + 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4643 then
pos = {x = position.x - 1, y = position.y - 1, 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, swimvalue, 1)
doSetCreatureOutfit(cid, diveroutfit, 60000)
doSendMagicEffect(fromPosition, 2)
doTeleportThing(cid, pos, TRUE)
doSendMagicEffect(player1pos, 53)
elseif isswimming == 1 then
if item.itemid == 4632 then
dir = 2
elseif item.itemid == 4633 then
dir = 1
elseif item.itemid == 4634 then
dir = 0
elseif item.itemid == 4635 then
dir = 3
elseif item.itemid == 4636 then
dir = 3
elseif item.itemid == 4637 then
dir = 1
elseif item.itemid == 4638 then
dir = 3
elseif item.itemid == 4639 then
dir = 2
elseif item.itemid == 4640 then
dir = 3
elseif item.itemid == 4641 then
dir = 1
elseif item.itemid == 4642 then
dir = 3
elseif item.itemid == 4643 then
dir = 1
end
doSetCreatureOutfit(cid, standardoutfit, 1)
doMoveCreature(cid, dir)
setPlayerStorageValue(cid, swimvalue, 2)
end
else
return False
end
return TRUE
end
i teraz chodzi oto ze jak wchodze do wody to przezmoment plywam na brzegu
zamiast go przezkoczyc i niema efektu plusku. Co zrobic napewno wiele osob ma tensam problem.
plz pomuz ktos....
 
Masz tutaj dobrego skrypta:

data/movements/scripts robisz plik o nazwie: swimming.lua

HTML:
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == 1 then
swimvalue = 3330 --storagevalue to check
diveroutfit = { lookType=267,lookHead=0,lookAddons=0,lookLegs=0,lookBody=0,lookFeet=0}
standardoutfit = { lookType = getPlayerStorageValue(cid, 3331), lookHead = getPlayerStorageValue(cid, 3332), lookBody =
getPlayerStorageValue(cid, 3333), lookLegs = getPlayerStorageValue(cid, 3334), lookFeet = getPlayerStorageValue(cid, 3335), lookAddons =
getPlayerStorageValue(cid, 3336) }
isswimming = getPlayerStorageValue(cid, swimvalue)
if isPlayer(cid) == 1 and (isswimming == -1) or (isswimming == 2) then
if item.itemid == 4632 then
pos = {x = position.x, y = position.y - 1, z = position.z}
elseif item.itemid == 4633 then
pos = {x = position.x - 1, y = position.y, z = position.z}
elseif item.itemid == 4634 then
pos = {x = position.x, y = position.y + 1, z = position.z}
elseif item.itemid == 4635 then
pos = {x = position.x + 1, y = position.y, z = position.z}
elseif item.itemid == 4636 then
pos = {x = position.x + 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4637 then
pos = {x = position.x - 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4638 then
pos = {x = position.x + 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4639 then
pos = {x = position.x - 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4640 then
pos = {x = position.x + 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4641 then
pos = {x = position.x - 1, y = position.y + 1, z = position.z}
elseif item.itemid == 4642 then
pos = {x = position.x + 1, y = position.y - 1, z = position.z}
elseif item.itemid == 4643 then
pos = {x = position.x - 1, y = position.y - 1, 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, swimvalue, 1)
doSetCreatureOutfit(cid, diveroutfit, 60000)
doSendMagicEffect(fromPosition, 2)
doTeleportThing(cid, pos, TRUE)
doSendMagicEffect(pos, 53)
elseif isswimming == 1 then
if item.itemid == 4632 then
dir = 2
elseif item.itemid == 4633 then
dir = 1
elseif item.itemid == 4634 then
dir = 0
elseif item.itemid == 4635 then
dir = 3
elseif item.itemid == 4636 then
dir = 3
elseif item.itemid == 4637 then
dir = 1
elseif item.itemid == 4638 then
dir = 3
elseif item.itemid == 4639 then
dir = 2
elseif item.itemid == 4640 then
dir = 3
elseif item.itemid == 4641 then
dir = 1
elseif item.itemid == 4642 then
dir = 3
elseif item.itemid == 4643 then
dir = 1
end
doSetCreatureOutfit(cid, standardoutfit, 1)
doMoveCreature(cid, dir)
setPlayerStorageValue(cid, swimvalue, 2)
end
else
return False
end
return TRUE
end

nast?pnie:

data/movemonts/movements.xml

HTML:
<movevent event="StepIn" actionid="7000" script="swimming.lua"/>

pami?taj, aby to doda? jeszcze przed </movements> mam nadziej?, ?e pomog?em. Pozdrawiam
 
Soul wes sobie skrpyt z B-Foxa tam jest Ladnie i all dziala jak umnie na servie =]]] ale ja musze jeszce Skocznie zrobic nie wiem czy mi sie uda xd =]!!!
 
tak ten skrypt dzia?a na 100% bo mam go na swoim OTSie tylko jest takie co? ?e trzeba mie? jeszcze outfit p?ywaka wtedy podchodzisz do wody a on automatycznie zmienia outfit i mo?esz p?ywa? ;)
 
nie chodzi mi oto ze zmienia outfit bo pod tym wzgledem moj skrypt dziala ale czy jest plusk.
 
Ostatnia edycja:
rany jest te? i plusk. A na co ci ten plusk? :p
 
rl tibia jest plusk XD i poto
@edit
sprawdzilem plusku niema tego efektu 53

Soul wes sobie skrpyt z B-Foxa tam jest Ladnie i all dziala jak umnie na servie =]]] ale ja musze jeszce Skocznie zrobic nie wiem czy mi sie uda xd =]!!!

daj tu ten skrypt
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry