Kenor
Senior User
- Joined
- May 23, 2009
- Messages
- 967
- Reaction score
- 21
Witam! Przedstawiam 2 dzia?aj?ce skrypty z mojego serwera RPG na wind? dwupi?trow? / platform? suwan? w g?r? i w d??.
Winda Pe?na:
- 2 kondygnacje max! [UWAGA!] ODST?P OD G?RNEJ CZ??CI DO DOLNEJ POD?OGI NAST?PNEGO PRZYSTANKU MUSI WYNOSI? PIETRO ODSTEPU, CZYLI 1[poz.z] MUSI ZOSTA? WOLNE, ANALOGICZNIE JAK NA FILMIKU!
- Skrypt dla Zaawansowanych
- Du?o Zabawy w ustalaniu ID i pozycji xyz
- Nieliczny b??d, wyst?puj?cy z uwagi na potr?jn? i wi?cej zamiany pod?ogi, kt?ry zupe?nie nie przeszkadza w dzia?anu skryptu.
1. Kleimy tak? oto skrzynk?: [w?asne sprity zast?pi nam wygl?d normalnych id z Tibia 8.54 wiadomo]
2. Ustawiamy d?wigni? doln?! Takie Ustawienie id d?wigni ma znaczenie! Tak?e pozycja!
3. Oraz g?ra i te? d?wignie! POD?OGA o ID [nothing special] ma by? te? dodatkowo wstawiona na tym poziomie oraz jedno pi?tro do g?ry [poziom dachu windy]! KONIECZNIE!
4. Oto i kod:
[LUA]function onUse(cid, item, frompos, item2, topos)
dach1 = {x=1360, y=502, z=4}
getdach1 = getThingfromPos(dach1)
dach2 = {x=1361, y=502, z=4}
getdach2 = getThingfromPos(dach2)
dach3 = {x=1362, y=502, z=4}
getdach3 = getThingfromPos(dach3)
dach4 = {x=1360, y=503, z=4}
getdach4 = getThingfromPos(dach4)
dach5 = {x=1361, y=503, z=4}
getdach5 = getThingfromPos(dach5)
dach6 = {x=1362, y=503, z=4}
getdach6 = getThingfromPos(dach6)
dach7 = {x=1360, y=504, z=4}
getdach7 = getThingfromPos(dach7)
dach8 = {x=1361, y=504, z=4}
getdach8 = getThingfromPos(dach8)
dach9 = {x=1362, y=504, z=4}
getdach9 = getThingfromPos(dach9)
dach10 = {x=1360, y=505, z=4}
getdach10 = getThingfromPos(dach10)
dach11 = {x=1361, y=505, z=4}
getdach11 = getThingfromPos(dach11)
dach12 = {x=1362, y=505, z=4}
getdach12 = getThingfromPos(dach12)
ndach1 = {x=1360, y=502, z=1}
ngetdach1 = getThingfromPos(ndach1)
ndach2 = {x=1361, y=502, z=1}
ngetdach2 = getThingfromPos(ndach2)
ndach3 = {x=1362, y=502, z=1}
ngetdach3 = getThingfromPos(ndach3)
ndach4 = {x=1360, y=503, z=1}
ngetdach4 = getThingfromPos(ndach4)
ndach5 = {x=1361, y=503, z=1}
ngetdach5 = getThingfromPos(ndach5)
ndach6 = {x=1362, y=503, z=1}
ngetdach6 = getThingfromPos(ndach6)
ndach7 = {x=1360, y=504, z=1}
ngetdach7 = getThingfromPos(ndach7)
ndach8 = {x=1361, y=504, z=1}
ngetdach8 = getThingfromPos(ndach8)
ndach9 = {x=1362, y=504, z=1}
ngetdach9 = getThingfromPos(ndach9)
ndach10 = {x=1360, y=505, z=1}
ngetdach10 = getThingfromPos(ndach10)
ndach11 = {x=1361, y=505, z=1}
ngetdach11 = getThingfromPos(ndach11)
ndach12 = {x=1362, y=505, z=1}
ngetdach12 = getThingfromPos(ndach12)
oddo1 = {x=1359, y=501, z=5}
oddo2 = {x=1360, y=501, z=5}
oddo3 = {x=1361, y=501, z=5}
oddo4 = {x=1362, y=501, z=5}
oddo5 = {x=1359, y=502, z=5}
oddo6 = {x=1359, y=505, z=5}
todo1 = {x=1359, y=501, z=2}
todo2 = {x=1360, y=501, z=2}
todo3 = {x=1361, y=501, z=2}
todo4 = {x=1362, y=501, z=2}
todo5 = {x=1359, y=502, z=2}
todo6 = {x=1359, y=505, z=2}
podloga1 = {x=1360, y=502, z=5}
getpodloga1 = getThingfromPos(podloga1)
podloga2 = {x=1361, y=502, z=5}
getpodloga2 = getThingfromPos(podloga2)
podloga3 = {x=1362, y=502, z=5}
getpodloga3 = getThingfromPos(podloga3)
podloga4 = {x=1360, y=503, z=5}
getpodloga4 = getThingfromPos(podloga4)
podloga5 = {x=1361, y=503, z=5}
getpodloga5 = getThingfromPos(podloga5)
podloga6 = {x=1362, y=503, z=5}
getpodloga6 = getThingfromPos(podloga6)
podloga7 = {x=1360, y=504, z=5}
getpodloga7 = getThingfromPos(podloga7)
podloga8 = {x=1361, y=504, z=5}
getpodloga8 = getThingfromPos(podloga8)
podloga9 = {x=1362, y=504, z=5}
getpodloga9 = getThingfromPos(podloga9)
podloga10 = {x=1360, y=505, z=5}
getpodloga10 = getThingfromPos(podloga10)
podloga11 = {x=1361, y=505, z=5}
getpodloga11 = getThingfromPos(podloga11)
podloga12 = {x=1362, y=505, z=5}
getpodloga12 = getThingfromPos(podloga12)
sciana1 = {x=1359, y=501, z=5, stackpos=1}
getsciana1 = getThingfromPos(sciana1)
sciana2 = {x=1360, y=501, z=5, stackpos=1}
getsciana2 = getThingfromPos(sciana2)
sciana3 = {x=1361, y=501, z=5, stackpos=1}
getsciana3 = getThingfromPos(sciana3)
sciana4 = {x=1362, y=501, z=5, stackpos=1}
getsciana4 = getThingfromPos(sciana4)
sciana5 = {x=1359, y=502, z=5, stackpos=1}
getsciana5 = getThingfromPos(sciana5)
sciana6 = {x=1362, y=502, z=5, stackpos=1}
getsciana6 = getThingfromPos(sciana6)
sciana7 = {x=1359, y=505, z=5, stackpos=1}
getsciana7 = getThingfromPos(sciana7)
sciana8 = {x=1360, y=505, z=5, stackpos=1}
getsciana8 = getThingfromPos(sciana8)
sciana9 = {x=1361, y=505, z=5, stackpos=1}
getsciana9 = getThingfromPos(sciana9)
sciana10 = {x=1362, y=505, z=5, stackpos=1}
getsciana10 = getThingfromPos(sciana10)
npodloga1 = {x=1360, y=502, z=2}
ngetpodloga1 = getThingfromPos(npodloga1)
npodloga2 = {x=1361, y=502, z=2}
ngetpodloga2 = getThingfromPos(npodloga2)
npodloga3 = {x=1362, y=502, z=2}
ngetpodloga3 = getThingfromPos(npodloga3)
npodloga4 = {x=1360, y=503, z=2}
ngetpodloga4 = getThingfromPos(npodloga4)
npodloga5 = {x=1361, y=503, z=2}
ngetpodloga5 = getThingfromPos(npodloga5)
npodloga6 = {x=1362, y=503, z=2}
ngetpodloga6 = getThingfromPos(npodloga6)
npodloga7 = {x=1360, y=504, z=2}
ngetpodloga7 = getThingfromPos(npodloga7)
npodloga8 = {x=1361, y=504, z=2}
ngetpodloga8 = getThingfromPos(npodloga8)
npodloga9 = {x=1362, y=504, z=2}
ngetpodloga9 = getThingfromPos(npodloga9)
npodloga10 = {x=1360, y=505, z=2}
ngetpodloga10 = getThingfromPos(npodloga10)
npodloga11 = {x=1361, y=505, z=2}
ngetpodloga11 = getThingfromPos(npodloga11)
npodloga12 = {x=1362, y=505, z=2}
ngetpodloga12 = getThingfromPos(npodloga12)
nsciana1 = {x=1359, y=501, z=2, stackpos=1}
ngetsciana1 = getThingfromPos(nsciana1)
nsciana2 = {x=1360, y=501, z=2, stackpos=1}
ngetsciana2 = getThingfromPos(nsciana2)
nsciana3 = {x=1361, y=501, z=2, stackpos=1}
ngetsciana3 = getThingfromPos(nsciana3)
nsciana4 = {x=1362, y=501, z=2, stackpos=1}
ngetsciana4 = getThingfromPos(nsciana4)
nsciana5 = {x=1359, y=502, z=2, stackpos=1}
ngetsciana5 = getThingfromPos(nsciana5)
nsciana6 = {x=1362, y=502, z=2, stackpos=1}
ngetsciana6 = getThingfromPos(nsciana6)
nsciana7 = {x=1359, y=505, z=2, stackpos=1}
ngetsciana7 = getThingfromPos(nsciana7)
nsciana8 = {x=1360, y=505, z=2, stackpos=1}
ngetsciana8 = getThingfromPos(nsciana8)
nsciana9 = {x=1361, y=505, z=2, stackpos=1}
ngetsciana9 = getThingfromPos(nsciana9)
nsciana10 = {x=1362, y=505, z=2, stackpos=1}
ngetsciana10 = getThingfromPos(nsciana10)
if item.uid == 46696 and item.itemid == 1945 then
doRemoveItem(getpodloga1.uid,1)
doCreateItem(997,1,npodloga1)
doCreateItem(460,1,podloga1)
doRemoveItem(getpodloga2.uid,1)
doCreateItem(997,1,npodloga2)
doCreateItem(460,1,podloga2)
doRemoveItem(getpodloga3.uid,1)
doCreateItem(997,1,npodloga3)
doCreateItem(460,1,podloga3)
doRemoveItem(getpodloga4.uid,1)
doCreateItem(997,1,npodloga4)
doCreateItem(460,1,podloga4)
doRemoveItem(getpodloga5.uid,1)
doCreateItem(997,1,npodloga5)
doCreateItem(460,1,podloga5)
doRemoveItem(getpodloga6.uid,1)
doCreateItem(997,1,npodloga6)
doCreateItem(460,1,podloga6)
doRemoveItem(getpodloga7.uid,1)
doCreateItem(997,1,npodloga7)
doCreateItem(460,1,podloga7)
doRemoveItem(getpodloga8.uid,1)
doCreateItem(997,1,npodloga8)
doCreateItem(460,1,podloga8)
doRemoveItem(getpodloga9.uid,1)
doCreateItem(997,1,npodloga9)
doCreateItem(460,1,podloga9)
doRemoveItem(getpodloga10.uid,1)
doCreateItem(997,1,npodloga10)
doCreateItem(460,1,podloga10)
doRemoveItem(getpodloga11.uid,1)
doCreateItem(997,1,npodloga11)
doCreateItem(460,1,podloga11)
doRemoveItem(getpodloga12.uid,1)
doCreateItem(997,1,npodloga12)
doCreateItem(460,1,podloga12)
doRemoveItem(getdach1.uid,1)
doCreateItem(416,1,ndach1)
doCreateItem(460,1,dach1)
doRemoveItem(getdach2.uid,1)
doCreateItem(416,1,ndach2)
doCreateItem(460,1,dach2)
doRemoveItem(getdach3.uid,1)
doCreateItem(416,1,ndach3)
doCreateItem(460,1,dach3)
doRemoveItem(getdach4.uid,1)
doCreateItem(416,1,ndach4)
doCreateItem(460,1,dach4)
doRemoveItem(getdach5.uid,1)
doCreateItem(416,1,ndach5)
doCreateItem(460,1,dach5)
doRemoveItem(getdach6.uid,1)
doCreateItem(416,1,ndach6)
doCreateItem(460,1,dach6)
doRemoveItem(getdach7.uid,1)
doCreateItem(416,1,ndach7)
doCreateItem(460,1,dach7)
doRemoveItem(getdach8.uid,1)
doCreateItem(416,1,ndach8)
doCreateItem(460,1,dach8)
doRemoveItem(getdach9.uid,1)
doCreateItem(416,1,ndach9)
doCreateItem(460,1,dach9)
doRemoveItem(getdach10.uid,1)
doCreateItem(416,1,ndach10)
doCreateItem(460,1,dach10)
doRemoveItem(getdach11.uid,1)
doCreateItem(416,1,ndach11)
doCreateItem(460,1,dach11)
doRemoveItem(getdach12.uid,1)
doCreateItem(416,1,ndach12)
doCreateItem(460,1,dach12)
doRemoveItem(oddo1.uid,1)
doCreateItem(460,1,todo1)
doCreateItem(460,1,oddo1)
doRemoveItem(oddo2.uid,1)
doCreateItem(460,1,todo2)
doCreateItem(460,1,oddo2)
doRemoveItem(oddo3.uid,1)
doCreateItem(460,1,todo3)
doCreateItem(460,1,oddo3)
doRemoveItem(oddo4.uid,1)
doCreateItem(460,1,todo4)
doCreateItem(460,1,oddo4)
doRemoveItem(oddo5.uid,1)
doCreateItem(460,1,todo5)
doCreateItem(460,1,oddo5)
doRemoveItem(oddo6.uid,1)
doCreateItem(460,1,todo6)
doCreateItem(460,1,oddo6)
doRemoveItem(getsciana1.uid,1)
doCreateItem(1038,1,nsciana1)
doRemoveItem(ngetsciana1.uid,1)
doRemoveItem(getsciana2.uid,1)
doCreateItem(5152,1,nsciana2)
doRemoveItem(ngetsciana2.uid,1)
doRemoveItem(getsciana3.uid,1)
doCreateItem(5152,1,nsciana3)
doRemoveItem(ngetsciana3.uid,1)
doRemoveItem(getsciana4.uid,1)
doCreateItem(5152,1,nsciana4)
doRemoveItem(ngetsciana4.uid,1)
doRemoveItem(getsciana5.uid,1)
doCreateItem(5154,1,nsciana5)
doRemoveItem(ngetsciana5.uid,1)
doRemoveItem(getsciana6.uid,1)
doCreateItem(1036,1,nsciana6)
doRemoveItem(ngetsciana6.uid,1)
doRemoveItem(getsciana7.uid,1)
doCreateItem(5154,1,nsciana7)
doRemoveItem(ngetsciana7.uid,1)
doRemoveItem(getsciana8.uid,1)
doCreateItem(5152,1,nsciana8)
doRemoveItem(ngetsciana8.uid,1)
doRemoveItem(getsciana9.uid,1)
doCreateItem(5152,1,nsciana9)
doRemoveItem(ngetsciana9.uid,1)
doRemoveItem(getsciana10.uid,1)
doCreateItem(1042,1,nsciana10)
doRemoveItem(ngetsciana10.uid,1)
doTeleportThing(cid,npodloga1)
doTeleportThing(cid,npodloga2)
doTeleportThing(cid,npodloga4)
doTeleportThing(cid,npodloga5)
doTeleportThing(cid,npodloga7)
doTeleportThing(cid,npodloga8)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 46696 and item.itemid == 1946 then
doRemoveItem(ngetpodloga1.uid,1)
doCreateItem(997,1,podloga1)
doCreateItem(460,1,npodloga1)
doRemoveItem(ngetpodloga2.uid,1)
doCreateItem(997,1,podloga2)
doCreateItem(460,1,npodloga2)
doRemoveItem(ngetpodloga3.uid,1)
doCreateItem(997,1,podloga3)
doCreateItem(460,1,npodloga3)
doRemoveItem(ngetpodloga4.uid,1)
doCreateItem(997,1,podloga4)
doCreateItem(460,1,npodloga4)
doRemoveItem(ngetpodloga5.uid,1)
doCreateItem(997,1,podloga5)
doCreateItem(460,1,npodloga5)
doRemoveItem(ngetpodloga6.uid,1)
doCreateItem(997,1,podloga6)
doCreateItem(460,1,npodloga6)
doRemoveItem(ngetpodloga7.uid,1)
doCreateItem(997,1,podloga7)
doCreateItem(460,1,npodloga7)
doRemoveItem(ngetpodloga8.uid,1)
doCreateItem(997,1,podloga8)
doCreateItem(460,1,npodloga8)
doRemoveItem(ngetpodloga9.uid,1)
doCreateItem(997,1,podloga9)
doCreateItem(460,1,npodloga9)
doRemoveItem(ngetpodloga10.uid,1)
doCreateItem(997,1,podloga10)
doCreateItem(460,1,npodloga10)
doRemoveItem(ngetpodloga11.uid,1)
doCreateItem(997,1,podloga11)
doCreateItem(460,1,npodloga11)
doRemoveItem(ngetpodloga12.uid,1)
doCreateItem(997,1,podloga12)
doCreateItem(460,1,npodloga12)
doRemoveItem(ngetdach1.uid,1)
doCreateItem(416,1,dach1)
doCreateItem(460,1,ndach1)
doRemoveItem(ngetdach2.uid,1)
doCreateItem(416,1,dach2)
doCreateItem(460,1,ndach2)
doRemoveItem(ngetdach3.uid,1)
doCreateItem(416,1,dach3)
doCreateItem(460,1,ndach3)
doRemoveItem(ngetdach4.uid,1)
doCreateItem(416,1,dach4)
doCreateItem(460,1,ndach4)
doRemoveItem(ngetdach5.uid,1)
doCreateItem(416,1,dach5)
doCreateItem(460,1,ndach5)
doRemoveItem(ngetdach6.uid,1)
doCreateItem(416,1,dach6)
doCreateItem(460,1,ndach6)
doRemoveItem(ngetdach7.uid,1)
doCreateItem(416,1,dach7)
doCreateItem(460,1,ndach7)
doRemoveItem(ngetdach8.uid,1)
doCreateItem(416,1,dach8)
doCreateItem(460,1,ndach8)
doRemoveItem(ngetdach9.uid,1)
doCreateItem(416,1,dach9)
doCreateItem(460,1,ndach9)
doRemoveItem(ngetdach10.uid,1)
doCreateItem(416,1,dach10)
doCreateItem(460,1,ndach10)
doRemoveItem(ngetdach11.uid,1)
doCreateItem(416,1,dach11)
doCreateItem(460,1,ndach11)
doRemoveItem(ngetdach12.uid,1)
doCreateItem(416,1,dach12)
doCreateItem(460,1,ndach12)
doRemoveItem(todo1.uid,1)
doCreateItem(460,1,oddo1)
doCreateItem(460,1,todo1)
doRemoveItem(todo2.uid,1)
doCreateItem(460,1,oddo2)
doCreateItem(460,1,todo2)
doRemoveItem(todo3.uid,1)
doCreateItem(460,1,oddo3)
doCreateItem(460,1,todo3)
doRemoveItem(todo4.uid,1)
doCreateItem(460,1,oddo4)
doCreateItem(460,1,todo4)
doRemoveItem(todo5.uid,1)
doCreateItem(460,1,oddo5)
doCreateItem(460,1,todo5)
doRemoveItem(todo6.uid,1)
doCreateItem(460,1,oddo6)
doCreateItem(460,1,todo6)
doRemoveItem(ngetsciana1.uid,1)
doCreateItem(1038,1,sciana1)
doRemoveItem(getsciana1.uid,1)
doRemoveItem(ngetsciana2.uid,1)
doCreateItem(5152,1,sciana2)
doRemoveItem(getsciana2.uid,1)
doRemoveItem(ngetsciana3.uid,1)
doCreateItem(5152,1,sciana3)
doRemoveItem(getsciana3.uid,1)
doRemoveItem(ngetsciana4.uid,1)
doCreateItem(5152,1,sciana4)
doRemoveItem(getsciana4.uid,1)
doRemoveItem(ngetsciana5.uid,1)
doCreateItem(5154,1,sciana5)
doRemoveItem(getsciana5.uid,1)
doRemoveItem(ngetsciana6.uid,1)
doCreateItem(1036,1,sciana6)
doRemoveItem(getsciana6.uid,1)
doRemoveItem(ngetsciana7.uid,1)
doCreateItem(5154,1,sciana7)
doRemoveItem(getsciana7.uid,1)
doRemoveItem(ngetsciana8.uid,1)
doCreateItem(5152,1,sciana8)
doRemoveItem(getsciana8.uid,1)
doRemoveItem(ngetsciana9.uid,1)
doCreateItem(5152,1,sciana9)
doRemoveItem(getsciana9.uid,1)
doRemoveItem(ngetsciana10.uid,1)
doCreateItem(1042,1,sciana10)
doRemoveItem(getsciana10.uid,1)
doTeleportThing(cid,podloga1)
doTeleportThing(cid,podloga2)
doTeleportThing(cid,podloga4)
doTeleportThing(cid,podloga5)
doTeleportThing(cid,podloga7)
doTeleportThing(cid,podloga8)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end[/LUA]
[II] Platforma P?ytka:
1) Analogicznie j/w tylko ?e bez ?cian no?nych:
[LUA]function onUse(cid, item, frompos, item2, topos)
podloga1 = {x=1200, y=627, z=5}
getpodloga1 = getThingfromPos(podloga1)
podloga2 = {x=1201, y=627, z=5}
getpodloga2 = getThingfromPos(podloga2)
podloga3 = {x=1200, y=628, z=5}
getpodloga3 = getThingfromPos(podloga3)
podloga4 = {x=1201, y=628, z=5}
getpodloga4 = getThingfromPos(podloga4)
npodloga1 = {x=1200, y=627, z=2}
ngetpodloga1 = getThingfromPos(npodloga1)
npodloga2 = {x=1201, y=627, z=2}
ngetpodloga2 = getThingfromPos(npodloga2)
npodloga3 = {x=1200, y=628, z=2}
ngetpodloga3 = getThingfromPos(npodloga3)
npodloga4 = {x=1201, y=628, z=2}
ngetpodloga4 = getThingfromPos(npodloga4)
if item.actionid == 19111 and item.itemid == 9844 then
doRemoveItem(getpodloga1.uid,1)
doCreateItem(1012,1,npodloga1)
doCreateItem(460,1,podloga1)
doRemoveItem(getpodloga2.uid,1)
doCreateItem(1012,1,npodloga2)
doCreateItem(460,1,podloga2)
doRemoveItem(getpodloga3.uid,1)
doCreateItem(1012,1,npodloga3)
doCreateItem(460,1,podloga3)
doRemoveItem(getpodloga4.uid,1)
doCreateItem(1012,1,npodloga4)
doCreateItem(460,1,podloga4)
doTeleportThing(cid,npodloga1)
doTeleportThing(cid,npodloga2)
doTeleportThing(cid,npodloga3)
doTeleportThing(cid,npodloga4)
doTransformItem(item.uid,item.itemid+1)
elseif item.actionid == 19111 and item.itemid == 9845 then
doRemoveItem(ngetpodloga1.uid,1)
doCreateItem(1012,1,podloga1)
doCreateItem(460,1,npodloga1)
doRemoveItem(ngetpodloga2.uid,1)
doCreateItem(1012,1,podloga2)
doCreateItem(460,1,npodloga2)
doRemoveItem(ngetpodloga3.uid,1)
doCreateItem(1012,1,podloga3)
doCreateItem(460,1,npodloga3)
doRemoveItem(ngetpodloga4.uid,1)
doCreateItem(1012,1,podloga4)
doCreateItem(460,1,npodloga4)
doTeleportThing(cid,podloga1)
doTeleportThing(cid,podloga2)
doTeleportThing(cid,podloga3)
doTeleportThing(cid,podloga4)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end[/LUA]
[III] Gdzie wklejamy skrypty? I jak uruchamiamy?
1) Data/Actions/Scripts/winda.lua
2) Przyk?adowy kod uruchomienia: [XML]<action uniqueid="46696" event="script" value="windapelna.lua"/>[/XML]
Lub [XML]<action actionid="19111" event="script" value="windaplatforma.lua"/>[/XML]
[IV] Instrukta? wizualny / Kontakt
GG: 38431013
//Pies - U2D DEVELOPER & MAKER; PDX Founder
Winda Pe?na:
- 2 kondygnacje max! [UWAGA!] ODST?P OD G?RNEJ CZ??CI DO DOLNEJ POD?OGI NAST?PNEGO PRZYSTANKU MUSI WYNOSI? PIETRO ODSTEPU, CZYLI 1[poz.z] MUSI ZOSTA? WOLNE, ANALOGICZNIE JAK NA FILMIKU!
- Skrypt dla Zaawansowanych
- Du?o Zabawy w ustalaniu ID i pozycji xyz
- Nieliczny b??d, wyst?puj?cy z uwagi na potr?jn? i wi?cej zamiany pod?ogi, kt?ry zupe?nie nie przeszkadza w dzia?anu skryptu.
1. Kleimy tak? oto skrzynk?: [w?asne sprity zast?pi nam wygl?d normalnych id z Tibia 8.54 wiadomo]


2. Ustawiamy d?wigni? doln?! Takie Ustawienie id d?wigni ma znaczenie! Tak?e pozycja!

3. Oraz g?ra i te? d?wignie! POD?OGA o ID [nothing special] ma by? te? dodatkowo wstawiona na tym poziomie oraz jedno pi?tro do g?ry [poziom dachu windy]! KONIECZNIE!


4. Oto i kod:
[LUA]function onUse(cid, item, frompos, item2, topos)
dach1 = {x=1360, y=502, z=4}
getdach1 = getThingfromPos(dach1)
dach2 = {x=1361, y=502, z=4}
getdach2 = getThingfromPos(dach2)
dach3 = {x=1362, y=502, z=4}
getdach3 = getThingfromPos(dach3)
dach4 = {x=1360, y=503, z=4}
getdach4 = getThingfromPos(dach4)
dach5 = {x=1361, y=503, z=4}
getdach5 = getThingfromPos(dach5)
dach6 = {x=1362, y=503, z=4}
getdach6 = getThingfromPos(dach6)
dach7 = {x=1360, y=504, z=4}
getdach7 = getThingfromPos(dach7)
dach8 = {x=1361, y=504, z=4}
getdach8 = getThingfromPos(dach8)
dach9 = {x=1362, y=504, z=4}
getdach9 = getThingfromPos(dach9)
dach10 = {x=1360, y=505, z=4}
getdach10 = getThingfromPos(dach10)
dach11 = {x=1361, y=505, z=4}
getdach11 = getThingfromPos(dach11)
dach12 = {x=1362, y=505, z=4}
getdach12 = getThingfromPos(dach12)
ndach1 = {x=1360, y=502, z=1}
ngetdach1 = getThingfromPos(ndach1)
ndach2 = {x=1361, y=502, z=1}
ngetdach2 = getThingfromPos(ndach2)
ndach3 = {x=1362, y=502, z=1}
ngetdach3 = getThingfromPos(ndach3)
ndach4 = {x=1360, y=503, z=1}
ngetdach4 = getThingfromPos(ndach4)
ndach5 = {x=1361, y=503, z=1}
ngetdach5 = getThingfromPos(ndach5)
ndach6 = {x=1362, y=503, z=1}
ngetdach6 = getThingfromPos(ndach6)
ndach7 = {x=1360, y=504, z=1}
ngetdach7 = getThingfromPos(ndach7)
ndach8 = {x=1361, y=504, z=1}
ngetdach8 = getThingfromPos(ndach8)
ndach9 = {x=1362, y=504, z=1}
ngetdach9 = getThingfromPos(ndach9)
ndach10 = {x=1360, y=505, z=1}
ngetdach10 = getThingfromPos(ndach10)
ndach11 = {x=1361, y=505, z=1}
ngetdach11 = getThingfromPos(ndach11)
ndach12 = {x=1362, y=505, z=1}
ngetdach12 = getThingfromPos(ndach12)
oddo1 = {x=1359, y=501, z=5}
oddo2 = {x=1360, y=501, z=5}
oddo3 = {x=1361, y=501, z=5}
oddo4 = {x=1362, y=501, z=5}
oddo5 = {x=1359, y=502, z=5}
oddo6 = {x=1359, y=505, z=5}
todo1 = {x=1359, y=501, z=2}
todo2 = {x=1360, y=501, z=2}
todo3 = {x=1361, y=501, z=2}
todo4 = {x=1362, y=501, z=2}
todo5 = {x=1359, y=502, z=2}
todo6 = {x=1359, y=505, z=2}
podloga1 = {x=1360, y=502, z=5}
getpodloga1 = getThingfromPos(podloga1)
podloga2 = {x=1361, y=502, z=5}
getpodloga2 = getThingfromPos(podloga2)
podloga3 = {x=1362, y=502, z=5}
getpodloga3 = getThingfromPos(podloga3)
podloga4 = {x=1360, y=503, z=5}
getpodloga4 = getThingfromPos(podloga4)
podloga5 = {x=1361, y=503, z=5}
getpodloga5 = getThingfromPos(podloga5)
podloga6 = {x=1362, y=503, z=5}
getpodloga6 = getThingfromPos(podloga6)
podloga7 = {x=1360, y=504, z=5}
getpodloga7 = getThingfromPos(podloga7)
podloga8 = {x=1361, y=504, z=5}
getpodloga8 = getThingfromPos(podloga8)
podloga9 = {x=1362, y=504, z=5}
getpodloga9 = getThingfromPos(podloga9)
podloga10 = {x=1360, y=505, z=5}
getpodloga10 = getThingfromPos(podloga10)
podloga11 = {x=1361, y=505, z=5}
getpodloga11 = getThingfromPos(podloga11)
podloga12 = {x=1362, y=505, z=5}
getpodloga12 = getThingfromPos(podloga12)
sciana1 = {x=1359, y=501, z=5, stackpos=1}
getsciana1 = getThingfromPos(sciana1)
sciana2 = {x=1360, y=501, z=5, stackpos=1}
getsciana2 = getThingfromPos(sciana2)
sciana3 = {x=1361, y=501, z=5, stackpos=1}
getsciana3 = getThingfromPos(sciana3)
sciana4 = {x=1362, y=501, z=5, stackpos=1}
getsciana4 = getThingfromPos(sciana4)
sciana5 = {x=1359, y=502, z=5, stackpos=1}
getsciana5 = getThingfromPos(sciana5)
sciana6 = {x=1362, y=502, z=5, stackpos=1}
getsciana6 = getThingfromPos(sciana6)
sciana7 = {x=1359, y=505, z=5, stackpos=1}
getsciana7 = getThingfromPos(sciana7)
sciana8 = {x=1360, y=505, z=5, stackpos=1}
getsciana8 = getThingfromPos(sciana8)
sciana9 = {x=1361, y=505, z=5, stackpos=1}
getsciana9 = getThingfromPos(sciana9)
sciana10 = {x=1362, y=505, z=5, stackpos=1}
getsciana10 = getThingfromPos(sciana10)
npodloga1 = {x=1360, y=502, z=2}
ngetpodloga1 = getThingfromPos(npodloga1)
npodloga2 = {x=1361, y=502, z=2}
ngetpodloga2 = getThingfromPos(npodloga2)
npodloga3 = {x=1362, y=502, z=2}
ngetpodloga3 = getThingfromPos(npodloga3)
npodloga4 = {x=1360, y=503, z=2}
ngetpodloga4 = getThingfromPos(npodloga4)
npodloga5 = {x=1361, y=503, z=2}
ngetpodloga5 = getThingfromPos(npodloga5)
npodloga6 = {x=1362, y=503, z=2}
ngetpodloga6 = getThingfromPos(npodloga6)
npodloga7 = {x=1360, y=504, z=2}
ngetpodloga7 = getThingfromPos(npodloga7)
npodloga8 = {x=1361, y=504, z=2}
ngetpodloga8 = getThingfromPos(npodloga8)
npodloga9 = {x=1362, y=504, z=2}
ngetpodloga9 = getThingfromPos(npodloga9)
npodloga10 = {x=1360, y=505, z=2}
ngetpodloga10 = getThingfromPos(npodloga10)
npodloga11 = {x=1361, y=505, z=2}
ngetpodloga11 = getThingfromPos(npodloga11)
npodloga12 = {x=1362, y=505, z=2}
ngetpodloga12 = getThingfromPos(npodloga12)
nsciana1 = {x=1359, y=501, z=2, stackpos=1}
ngetsciana1 = getThingfromPos(nsciana1)
nsciana2 = {x=1360, y=501, z=2, stackpos=1}
ngetsciana2 = getThingfromPos(nsciana2)
nsciana3 = {x=1361, y=501, z=2, stackpos=1}
ngetsciana3 = getThingfromPos(nsciana3)
nsciana4 = {x=1362, y=501, z=2, stackpos=1}
ngetsciana4 = getThingfromPos(nsciana4)
nsciana5 = {x=1359, y=502, z=2, stackpos=1}
ngetsciana5 = getThingfromPos(nsciana5)
nsciana6 = {x=1362, y=502, z=2, stackpos=1}
ngetsciana6 = getThingfromPos(nsciana6)
nsciana7 = {x=1359, y=505, z=2, stackpos=1}
ngetsciana7 = getThingfromPos(nsciana7)
nsciana8 = {x=1360, y=505, z=2, stackpos=1}
ngetsciana8 = getThingfromPos(nsciana8)
nsciana9 = {x=1361, y=505, z=2, stackpos=1}
ngetsciana9 = getThingfromPos(nsciana9)
nsciana10 = {x=1362, y=505, z=2, stackpos=1}
ngetsciana10 = getThingfromPos(nsciana10)
if item.uid == 46696 and item.itemid == 1945 then
doRemoveItem(getpodloga1.uid,1)
doCreateItem(997,1,npodloga1)
doCreateItem(460,1,podloga1)
doRemoveItem(getpodloga2.uid,1)
doCreateItem(997,1,npodloga2)
doCreateItem(460,1,podloga2)
doRemoveItem(getpodloga3.uid,1)
doCreateItem(997,1,npodloga3)
doCreateItem(460,1,podloga3)
doRemoveItem(getpodloga4.uid,1)
doCreateItem(997,1,npodloga4)
doCreateItem(460,1,podloga4)
doRemoveItem(getpodloga5.uid,1)
doCreateItem(997,1,npodloga5)
doCreateItem(460,1,podloga5)
doRemoveItem(getpodloga6.uid,1)
doCreateItem(997,1,npodloga6)
doCreateItem(460,1,podloga6)
doRemoveItem(getpodloga7.uid,1)
doCreateItem(997,1,npodloga7)
doCreateItem(460,1,podloga7)
doRemoveItem(getpodloga8.uid,1)
doCreateItem(997,1,npodloga8)
doCreateItem(460,1,podloga8)
doRemoveItem(getpodloga9.uid,1)
doCreateItem(997,1,npodloga9)
doCreateItem(460,1,podloga9)
doRemoveItem(getpodloga10.uid,1)
doCreateItem(997,1,npodloga10)
doCreateItem(460,1,podloga10)
doRemoveItem(getpodloga11.uid,1)
doCreateItem(997,1,npodloga11)
doCreateItem(460,1,podloga11)
doRemoveItem(getpodloga12.uid,1)
doCreateItem(997,1,npodloga12)
doCreateItem(460,1,podloga12)
doRemoveItem(getdach1.uid,1)
doCreateItem(416,1,ndach1)
doCreateItem(460,1,dach1)
doRemoveItem(getdach2.uid,1)
doCreateItem(416,1,ndach2)
doCreateItem(460,1,dach2)
doRemoveItem(getdach3.uid,1)
doCreateItem(416,1,ndach3)
doCreateItem(460,1,dach3)
doRemoveItem(getdach4.uid,1)
doCreateItem(416,1,ndach4)
doCreateItem(460,1,dach4)
doRemoveItem(getdach5.uid,1)
doCreateItem(416,1,ndach5)
doCreateItem(460,1,dach5)
doRemoveItem(getdach6.uid,1)
doCreateItem(416,1,ndach6)
doCreateItem(460,1,dach6)
doRemoveItem(getdach7.uid,1)
doCreateItem(416,1,ndach7)
doCreateItem(460,1,dach7)
doRemoveItem(getdach8.uid,1)
doCreateItem(416,1,ndach8)
doCreateItem(460,1,dach8)
doRemoveItem(getdach9.uid,1)
doCreateItem(416,1,ndach9)
doCreateItem(460,1,dach9)
doRemoveItem(getdach10.uid,1)
doCreateItem(416,1,ndach10)
doCreateItem(460,1,dach10)
doRemoveItem(getdach11.uid,1)
doCreateItem(416,1,ndach11)
doCreateItem(460,1,dach11)
doRemoveItem(getdach12.uid,1)
doCreateItem(416,1,ndach12)
doCreateItem(460,1,dach12)
doRemoveItem(oddo1.uid,1)
doCreateItem(460,1,todo1)
doCreateItem(460,1,oddo1)
doRemoveItem(oddo2.uid,1)
doCreateItem(460,1,todo2)
doCreateItem(460,1,oddo2)
doRemoveItem(oddo3.uid,1)
doCreateItem(460,1,todo3)
doCreateItem(460,1,oddo3)
doRemoveItem(oddo4.uid,1)
doCreateItem(460,1,todo4)
doCreateItem(460,1,oddo4)
doRemoveItem(oddo5.uid,1)
doCreateItem(460,1,todo5)
doCreateItem(460,1,oddo5)
doRemoveItem(oddo6.uid,1)
doCreateItem(460,1,todo6)
doCreateItem(460,1,oddo6)
doRemoveItem(getsciana1.uid,1)
doCreateItem(1038,1,nsciana1)
doRemoveItem(ngetsciana1.uid,1)
doRemoveItem(getsciana2.uid,1)
doCreateItem(5152,1,nsciana2)
doRemoveItem(ngetsciana2.uid,1)
doRemoveItem(getsciana3.uid,1)
doCreateItem(5152,1,nsciana3)
doRemoveItem(ngetsciana3.uid,1)
doRemoveItem(getsciana4.uid,1)
doCreateItem(5152,1,nsciana4)
doRemoveItem(ngetsciana4.uid,1)
doRemoveItem(getsciana5.uid,1)
doCreateItem(5154,1,nsciana5)
doRemoveItem(ngetsciana5.uid,1)
doRemoveItem(getsciana6.uid,1)
doCreateItem(1036,1,nsciana6)
doRemoveItem(ngetsciana6.uid,1)
doRemoveItem(getsciana7.uid,1)
doCreateItem(5154,1,nsciana7)
doRemoveItem(ngetsciana7.uid,1)
doRemoveItem(getsciana8.uid,1)
doCreateItem(5152,1,nsciana8)
doRemoveItem(ngetsciana8.uid,1)
doRemoveItem(getsciana9.uid,1)
doCreateItem(5152,1,nsciana9)
doRemoveItem(ngetsciana9.uid,1)
doRemoveItem(getsciana10.uid,1)
doCreateItem(1042,1,nsciana10)
doRemoveItem(ngetsciana10.uid,1)
doTeleportThing(cid,npodloga1)
doTeleportThing(cid,npodloga2)
doTeleportThing(cid,npodloga4)
doTeleportThing(cid,npodloga5)
doTeleportThing(cid,npodloga7)
doTeleportThing(cid,npodloga8)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 46696 and item.itemid == 1946 then
doRemoveItem(ngetpodloga1.uid,1)
doCreateItem(997,1,podloga1)
doCreateItem(460,1,npodloga1)
doRemoveItem(ngetpodloga2.uid,1)
doCreateItem(997,1,podloga2)
doCreateItem(460,1,npodloga2)
doRemoveItem(ngetpodloga3.uid,1)
doCreateItem(997,1,podloga3)
doCreateItem(460,1,npodloga3)
doRemoveItem(ngetpodloga4.uid,1)
doCreateItem(997,1,podloga4)
doCreateItem(460,1,npodloga4)
doRemoveItem(ngetpodloga5.uid,1)
doCreateItem(997,1,podloga5)
doCreateItem(460,1,npodloga5)
doRemoveItem(ngetpodloga6.uid,1)
doCreateItem(997,1,podloga6)
doCreateItem(460,1,npodloga6)
doRemoveItem(ngetpodloga7.uid,1)
doCreateItem(997,1,podloga7)
doCreateItem(460,1,npodloga7)
doRemoveItem(ngetpodloga8.uid,1)
doCreateItem(997,1,podloga8)
doCreateItem(460,1,npodloga8)
doRemoveItem(ngetpodloga9.uid,1)
doCreateItem(997,1,podloga9)
doCreateItem(460,1,npodloga9)
doRemoveItem(ngetpodloga10.uid,1)
doCreateItem(997,1,podloga10)
doCreateItem(460,1,npodloga10)
doRemoveItem(ngetpodloga11.uid,1)
doCreateItem(997,1,podloga11)
doCreateItem(460,1,npodloga11)
doRemoveItem(ngetpodloga12.uid,1)
doCreateItem(997,1,podloga12)
doCreateItem(460,1,npodloga12)
doRemoveItem(ngetdach1.uid,1)
doCreateItem(416,1,dach1)
doCreateItem(460,1,ndach1)
doRemoveItem(ngetdach2.uid,1)
doCreateItem(416,1,dach2)
doCreateItem(460,1,ndach2)
doRemoveItem(ngetdach3.uid,1)
doCreateItem(416,1,dach3)
doCreateItem(460,1,ndach3)
doRemoveItem(ngetdach4.uid,1)
doCreateItem(416,1,dach4)
doCreateItem(460,1,ndach4)
doRemoveItem(ngetdach5.uid,1)
doCreateItem(416,1,dach5)
doCreateItem(460,1,ndach5)
doRemoveItem(ngetdach6.uid,1)
doCreateItem(416,1,dach6)
doCreateItem(460,1,ndach6)
doRemoveItem(ngetdach7.uid,1)
doCreateItem(416,1,dach7)
doCreateItem(460,1,ndach7)
doRemoveItem(ngetdach8.uid,1)
doCreateItem(416,1,dach8)
doCreateItem(460,1,ndach8)
doRemoveItem(ngetdach9.uid,1)
doCreateItem(416,1,dach9)
doCreateItem(460,1,ndach9)
doRemoveItem(ngetdach10.uid,1)
doCreateItem(416,1,dach10)
doCreateItem(460,1,ndach10)
doRemoveItem(ngetdach11.uid,1)
doCreateItem(416,1,dach11)
doCreateItem(460,1,ndach11)
doRemoveItem(ngetdach12.uid,1)
doCreateItem(416,1,dach12)
doCreateItem(460,1,ndach12)
doRemoveItem(todo1.uid,1)
doCreateItem(460,1,oddo1)
doCreateItem(460,1,todo1)
doRemoveItem(todo2.uid,1)
doCreateItem(460,1,oddo2)
doCreateItem(460,1,todo2)
doRemoveItem(todo3.uid,1)
doCreateItem(460,1,oddo3)
doCreateItem(460,1,todo3)
doRemoveItem(todo4.uid,1)
doCreateItem(460,1,oddo4)
doCreateItem(460,1,todo4)
doRemoveItem(todo5.uid,1)
doCreateItem(460,1,oddo5)
doCreateItem(460,1,todo5)
doRemoveItem(todo6.uid,1)
doCreateItem(460,1,oddo6)
doCreateItem(460,1,todo6)
doRemoveItem(ngetsciana1.uid,1)
doCreateItem(1038,1,sciana1)
doRemoveItem(getsciana1.uid,1)
doRemoveItem(ngetsciana2.uid,1)
doCreateItem(5152,1,sciana2)
doRemoveItem(getsciana2.uid,1)
doRemoveItem(ngetsciana3.uid,1)
doCreateItem(5152,1,sciana3)
doRemoveItem(getsciana3.uid,1)
doRemoveItem(ngetsciana4.uid,1)
doCreateItem(5152,1,sciana4)
doRemoveItem(getsciana4.uid,1)
doRemoveItem(ngetsciana5.uid,1)
doCreateItem(5154,1,sciana5)
doRemoveItem(getsciana5.uid,1)
doRemoveItem(ngetsciana6.uid,1)
doCreateItem(1036,1,sciana6)
doRemoveItem(getsciana6.uid,1)
doRemoveItem(ngetsciana7.uid,1)
doCreateItem(5154,1,sciana7)
doRemoveItem(getsciana7.uid,1)
doRemoveItem(ngetsciana8.uid,1)
doCreateItem(5152,1,sciana8)
doRemoveItem(getsciana8.uid,1)
doRemoveItem(ngetsciana9.uid,1)
doCreateItem(5152,1,sciana9)
doRemoveItem(getsciana9.uid,1)
doRemoveItem(ngetsciana10.uid,1)
doCreateItem(1042,1,sciana10)
doRemoveItem(getsciana10.uid,1)
doTeleportThing(cid,podloga1)
doTeleportThing(cid,podloga2)
doTeleportThing(cid,podloga4)
doTeleportThing(cid,podloga5)
doTeleportThing(cid,podloga7)
doTeleportThing(cid,podloga8)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end[/LUA]
[II] Platforma P?ytka:
1) Analogicznie j/w tylko ?e bez ?cian no?nych:
[LUA]function onUse(cid, item, frompos, item2, topos)
podloga1 = {x=1200, y=627, z=5}
getpodloga1 = getThingfromPos(podloga1)
podloga2 = {x=1201, y=627, z=5}
getpodloga2 = getThingfromPos(podloga2)
podloga3 = {x=1200, y=628, z=5}
getpodloga3 = getThingfromPos(podloga3)
podloga4 = {x=1201, y=628, z=5}
getpodloga4 = getThingfromPos(podloga4)
npodloga1 = {x=1200, y=627, z=2}
ngetpodloga1 = getThingfromPos(npodloga1)
npodloga2 = {x=1201, y=627, z=2}
ngetpodloga2 = getThingfromPos(npodloga2)
npodloga3 = {x=1200, y=628, z=2}
ngetpodloga3 = getThingfromPos(npodloga3)
npodloga4 = {x=1201, y=628, z=2}
ngetpodloga4 = getThingfromPos(npodloga4)
if item.actionid == 19111 and item.itemid == 9844 then
doRemoveItem(getpodloga1.uid,1)
doCreateItem(1012,1,npodloga1)
doCreateItem(460,1,podloga1)
doRemoveItem(getpodloga2.uid,1)
doCreateItem(1012,1,npodloga2)
doCreateItem(460,1,podloga2)
doRemoveItem(getpodloga3.uid,1)
doCreateItem(1012,1,npodloga3)
doCreateItem(460,1,podloga3)
doRemoveItem(getpodloga4.uid,1)
doCreateItem(1012,1,npodloga4)
doCreateItem(460,1,podloga4)
doTeleportThing(cid,npodloga1)
doTeleportThing(cid,npodloga2)
doTeleportThing(cid,npodloga3)
doTeleportThing(cid,npodloga4)
doTransformItem(item.uid,item.itemid+1)
elseif item.actionid == 19111 and item.itemid == 9845 then
doRemoveItem(ngetpodloga1.uid,1)
doCreateItem(1012,1,podloga1)
doCreateItem(460,1,npodloga1)
doRemoveItem(ngetpodloga2.uid,1)
doCreateItem(1012,1,podloga2)
doCreateItem(460,1,npodloga2)
doRemoveItem(ngetpodloga3.uid,1)
doCreateItem(1012,1,podloga3)
doCreateItem(460,1,npodloga3)
doRemoveItem(ngetpodloga4.uid,1)
doCreateItem(1012,1,podloga4)
doCreateItem(460,1,npodloga4)
doTeleportThing(cid,podloga1)
doTeleportThing(cid,podloga2)
doTeleportThing(cid,podloga3)
doTeleportThing(cid,podloga4)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end[/LUA]
[III] Gdzie wklejamy skrypty? I jak uruchamiamy?
1) Data/Actions/Scripts/winda.lua
2) Przyk?adowy kod uruchomienia: [XML]<action uniqueid="46696" event="script" value="windapelna.lua"/>[/XML]
Lub [XML]<action actionid="19111" event="script" value="windaplatforma.lua"/>[/XML]
[IV] Instrukta? wizualny / Kontakt
GG: 38431013
//Pies - U2D DEVELOPER & MAKER; PDX Founder