#1 2008-05-08 09:05:45

Renion

http://i37.tinypic.com/okwrx1.gif

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

[8.1] Samochód w tibi !

Skrypt nie jest moj !

Dodajemy do global.lua:

function isWall(id)
local walls = {1025, 1032, 1028, 1030, 1035, 1027, 1219, 4645, 4647, 4646, 4644}
if isInArray(walls, id) == 1 then
return 1
else
return 0
end
end

Teraz wchodzimy w data/movements/scripts i robimy plik o nazwie car.lua a w nim:

local storages = {
isMoving = 12550,
direction = 12551,
speed = 12552
}
function CarMoveLeft(x)
cpos = x.Cpos
Car = getThingfromPos(cpos)
newpos = {x=x.pos.x-1, y=x.pos.y, z=x.pos.z}
doCreateItem(7267,1,newpos)
doTeleportThing(x.cid, newpos)
doRemoveItem(Car.uid,1)
end
function CarMoveRight(x)
cpos = x.Cpos
Car = getThingfromPos(cpos)
newpos = {x=x.pos.x+1, y=x.pos.y, z=x.pos.z}
doCreateItem(7267,1,newpos)
doTeleportThing(x.cid, newpos)
doRemoveItem(Car.uid,1)
end
function CarMoveUp(x)
cpos = x.Cpos
Car = getThingfromPos(cpos)
newpos = {x=x.pos.x, y=x.pos.y-1, z=x.pos.z}
doCreateItem(7266,1,newpos)
doTeleportThing(x.cid, newpos)
doRemoveItem(Car.uid,1)
end
function CarMoveDown(x)
cpos = x.Cpos
Car = getThingfromPos(cpos)
newpos = {x=x.pos.x, y=x.pos.y+1, z=x.pos.z}
doCreateItem(7266,1,newpos)
doTeleportThing(x.cid, newpos)
doRemoveItem(Car.uid,1)
end
function onStepIn(cid, item, pos)
if isPlayer(cid) == 1 then
local status = {
isMoving = getPlayerStorageValue(cid, storages.isMoving),
direction = getPlayerStorageValue(cid, storages.direction),
speed = getPlayerStorageValue(cid, storages.speed)
}
if status.speed <= 0 then
setPlayerStorageValue(cid, storages.speed, 500)
status.speed = 800
elseif status.speed >= 2500 then
setPlayerStorageValue(cid, storages.speed, 500)
status.speed = 800
end
CarPos = getThingPos(item.uid)
if status.isMoving == 1 then
if status.direction == 1 then
CheckLeft = getThingfromPos({x = pos.x-1, y = pos.y, z = pos.z, stackpos = 1})
if isWall(CheckLeft.itemid) == 1 or isCreature(CheckLeft.uid) == 1 then
setPlayerStorageValue(cid, storages.direction, 2)
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveRight, status.speed, x)
else
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveLeft, status.speed, x)
end
elseif status.direction == 2 then
CheckRight = getThingfromPos({x = pos.x+1, y = pos.y, z = pos.z, stackpos = 1})
if isWall(CheckRight.itemid) == 1 or isCreature(CheckRight.uid) == 1 then
setPlayerStorageValue(cid, storages.direction, 1)
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveLeft, status.speed, x)
else
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveRight, status.speed, x)
end
elseif status.direction == 3 then
CheckUp = getThingfromPos({x = pos.x, y = pos.y-1, z = pos.z, stackpos = 1})
if isWall(CheckUp.itemid) == 1 or isCreature(CheckUp.uid) == 1 then
setPlayerStorageValue(cid, storages.direction, 4)
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveDown, status.speed, x)
else
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveUp, status.speed, x)
end
elseif status.direction == 4 then
CheckDown = getThingfromPos({x = pos.x, y = pos.y+1, z = pos.z, stackpos = 1})
if isWall(CheckDown.itemid) == 1 or isCreature(CheckDown.uid) == 1 then
setPlayerStorageValue(cid, storages.direction, 3)
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveUp, status.speed, x)
else
x = {cid = cid, pos = pos, Cpos = CarPos}
addEvent(CarMoveDown, status.speed, x)
end
end
elseif status.isMoving == -1 then
setPlayerStorageValue(cid, storages.isMoving, 1)
end
end
end

Teraz do movements.xml dodajemy:

<movevent event="StepIn" itemid="7267" script="car.lua" />
<movevent event="StepIn" itemid="7266" script="car.lua" />

Teraz wchodzimy w data/talkactions/scripts i robimy plik o nazwie car.lua a w nim:

local storages = {
isMoving = 12550,
direction = 12551,
speed = 12552
}
function onSay(cid, words, param)
local status = {
isMoving = getPlayerStorageValue(cid, storages.isMoving),
direction = getPlayerStorageValue(cid, storages.direction),
speed = getPlayerStorageValue(cid, storages.speed)
}
local controls = {
["up"] = {storage = storages.direction, new = 3, txt = "up"},
["down"] = {storage = storages.direction, new = 4, txt = "down"},
["left"] = {storage = storages.direction, new = 1, txt = "left"},
["right"] = {storage = storages.direction, new = 2, txt = "right"},
["speedup"] = {storage = storages.speed, new = status.speed-50, txt = "fast"},
["speeddown"] = {storage = storages.speed, new = status.speed+50, txt = "slow"},
["stop"] = {storage = storages.direction, new = -1, txt = "stop"}
}
if status.isMoving == 1 then
ctrl = controls[param]
if (ctrl ~= nil) then
setPlayerStorageValue(cid, ctrl.storage, ctrl.new)
doPlayerSay(cid, ctrl.txt, TALKTYPE_SAY)
else
doSendMagicEffect(getPlayerPosition(cid), 2)
doPlayerSendCancel(cid, "Invalid operation.")
end
else
doPlayerSendCancel(cid, "You are not in a car.")
end
end

Do talkactions.xml dodajemy:

<talkaction words="car" script="car.lua" />

I tu macie filmik:
http://pl.youtube.com/watch?v=cEZ-Dc4eyRA

Offline

 

#2 2008-05-08 12:40:02

rby

http://i37.tinypic.com/sb1sbd.jpg

Zarejestrowany: 2008-01-02
Posty: 195

Re: [8.1] Samochód w tibi !

WoW super 15/10 dla tego co to zrobił ! Przerobić trochę tibie i będzie Need For Speed OTS


Kliknij !!!!
Kliknij!!!
Kliknij !!
Trenuje pokemony
13.kwiecień 2008 r. godz. 12.24 - 100 post !!!!!

Offline

 

#3 2008-05-08 14:22:40

pat999

http://i35.tinypic.com/2q9yumu.gif

Zarejestrowany: 2008-01-19
Posty: 149
Nick: Patryk Tar
Profesja: Slupsk
Server: 14

Re: [8.1] Samochód w tibi !

Zrobilem all i nie dziala :(Pisze car i pojawia sie to
Inalid operation...

Ostatnio edytowany przez pat999 (2008-05-08 14:31:04)

Offline

 

#4 2008-05-08 14:28:07

Adachi

http://img252.imageshack.us/img252/9128/14sh3ih.png

Skąd: Karpacz
Zarejestrowany: 2008-03-06
Posty: 1094

Re: [8.1] Samochód w tibi !

Nie jeździ ;/

Offline

 

#5 2008-05-08 14:39:07

1DeVoP2

http://i33.tinypic.com/2v2gq5x.gif

status 1241421
4598593
Call me!
Skąd: Cementarz
Zarejestrowany: 2008-03-15
Posty: 283
Nick: Icy Gravler
Profesja: Neptera
Server: 1
WWW

Re: [8.1] Samochód w tibi !

No ciekawy skrypt przetestuje później

Offline

 

#6 2008-05-08 15:34:48

 Seeker

http://i49.tinypic.com/2whmhds.jpg

4133650
Skąd: Tu i Tam...
Zarejestrowany: 2008-02-29
Posty: 1243
Nick: Heannak
Profesja: Honera
Server: 39~
WWW

Re: [8.1] Samochód w tibi !

POmysł dobry ale wykonanie nie takie jak powinno i wyglad tego auta to krzesło juz bardziej...


http://pretoriaots.pl/signature.php?character=Seeker&image=4
http://s2.tibiafun.y0.pl/char.php?c=Naplecior
http://www.pokeplushies.com/images/adoptables/690903.gif

Offline

 

#7 2008-05-08 16:19:34

Xovadis

http://i37.tinypic.com/zmmamp.gif

Zarejestrowany: 2008-04-13
Posty: 34
Nick: GoD BlooD
Profesja: 81.15.214.65
Server: GoD Wienc Boss xD

Re: [8.1] Samochód w tibi !

elo  fajny zajebi,... samochód normalnie Porsche albo Formula 1 ;]


Jesli PoMogleM Daj Mi +
Jesli Nie Pomoglem Lub Obrazilem daj mi -

Offline

 

#8 2008-05-08 16:28:20

Renion

http://i37.tinypic.com/okwrx1.gif

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

Re: [8.1] Samochód w tibi !

Seeker napisał:

POmysł dobry ale wykonanie nie takie jak powinno i wyglad tego auta to krzesło juz bardziej...

No sorry w Tibi nie zrobili grafiki samochodów... A tylko oni mogą dodawać nowe grafiki :(

Offline

 

#9 2008-05-08 16:33:08

Grzes12

http://i35.tinypic.com/2usym0z.gif

Zarejestrowany: 2008-03-13
Posty: 114

Re: [8.1] Samochód w tibi !

Ale jak stworzyć go na ots?? Jakie id??


Proszę kliknąć Wspomożecie mojego rycerza ;]
http://s10.battleknight.onet.pl/index.p … f=Mjc2OTk5

Offline

 

#10 2008-05-08 16:59:32

Xovadis

http://i37.tinypic.com/zmmamp.gif

Zarejestrowany: 2008-04-13
Posty: 34
Nick: GoD BlooD
Profesja: 81.15.214.65
Server: GoD Wienc Boss xD

Re: [8.1] Samochód w tibi !

xd xd xd poprostu nie jeźdźi xd xd xd nie działa kolo ;/


Jesli PoMogleM Daj Mi +
Jesli Nie Pomoglem Lub Obrazilem daj mi -

Offline

 

#11 2008-05-08 17:06:29

Renion

http://i37.tinypic.com/okwrx1.gif

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

Re: [8.1] Samochód w tibi !

Xovadis jaki silnik ?

Offline

 

#12 2008-05-08 18:59:10

 Dantez

http://i37.tinypic.com/2rxttv8.gif

Skąd: Częstochowa
Zarejestrowany: 2008-03-17
Posty: 1946
Nick: Danreg
Profesja: Elite Knight
Server: Celesta
Level: 116

Re: [8.1] Samochód w tibi !

Nie dziala wszystko zrobilem ale nie rusza sie wogule


2009-02-23 - data mianowania na Redaktora
2010-08-26 - data rezygnacji
http://img268.imageshack.us/img268/9939/25985.png

Offline

 

#13 2008-05-09 08:52:44

 Seeker

http://i49.tinypic.com/2whmhds.jpg

4133650
Skąd: Tu i Tam...
Zarejestrowany: 2008-02-29
Posty: 1243
Nick: Heannak
Profesja: Honera
Server: 39~
WWW

Re: [8.1] Samochód w tibi !

lol kto powiedziałze nie można grafik w tibi robic.mozna ale jak sie przerabia tibie.spr noobku
a nie jeżdzi bo kół nie ma xD


http://pretoriaots.pl/signature.php?character=Seeker&image=4
http://s2.tibiafun.y0.pl/char.php?c=Naplecior
http://www.pokeplushies.com/images/adoptables/690903.gif

Offline

 

#14 2008-05-09 13:47:49

Renion

http://i37.tinypic.com/okwrx1.gif

Skąd: WrOcLoVe <3
Zarejestrowany: 2007-12-31
Posty: 394

Re: [8.1] Samochód w tibi !

Boze na Evo nie działa !
Pewnie zaraz będą takie teksty: To po co tu to umieszczałeś lub coś... Odrazu Minus Leci

Ostatnio edytowany przez Pirath (2008-05-09 13:48:28)

Offline

 

#15 2008-05-09 15:04:15

rakos40

http://i37.tinypic.com/sb1sbd.jpg

3920237
Zarejestrowany: 2007-12-05
Posty: 187

Re: [8.1] Samochód w tibi !

Pirath napisał:

Xovadis jaki silnik ?

2.0 Turbo Diesel.

P.S. Nie mogłem się powstrzymac xd

Offline

 

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
http://cultrockers24hat.eu Szamba betonowe Wojkowice