Forum .Zapraszamy na nasze forum.
...::: Info na temat OTSow i nietylko ;D :::...
 
 FAQFAQ   SzukajSzukaj   UżytkownicyUżytkownicy   GrupyGrupy  GalerieGalerie   RejestracjaRejestracja 
 ProfilProfil   Zaloguj się, by sprawdzić wiadomościZaloguj się, by sprawdzić wiadomości   ZalogujZaloguj 

Key system!

 
Napisz nowy temat   Odpowiedz do tematu    Forum .Zapraszamy na nasze forum. Strona Główna -> SKRYPTY!!!
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Goku
MeGa ByWaLeC



Dołączył: 30 Kwi 2006
Posty: 22
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: 54606 MajŚroda2006032006    Temat postu: Key system!

System kluczy
W actions.xml
Kod:
<!-- START: Doors and keys -->
<action itemid="1209" script="doors_keys/door_locked.lua" />
<action itemid="1210" script="doors_keys/door_closed.lua" />
<action itemid="1211" script="doors_keys/door_open_vertical.lua" />
<action itemid="1212" script="doors_keys/door_locked.lua" />
<action itemid="1213" script="doors_keys/door_closed.lua" />
<action itemid="1214" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1219" script="doors_keys/door_closed.lua" />
<action itemid="1220" script="doors_keys/door_open_vertical.lua" />
<action itemid="1221" script="doors_keys/door_closed.lua" />
<action itemid="1222" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1231" script="doors_keys/door_locked.lua" />
<action itemid="1232" script="doors_keys/door_closed.lua" />
<action itemid="1233" script="doors_keys/door_open_vertical.lua" />
<action itemid="1234" script="doors_keys/door_locked.lua" />
<action itemid="1235" script="doors_keys/door_closed.lua" />
<action itemid="1236" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1237" script="doors_keys/door_closed.lua" />
<action itemid="1238" script="doors_keys/door_open_vertical.lua" />
<action itemid="1239" script="doors_keys/door_closed.lua" />
<action itemid="1240" script="doors_keys/door_open_horizontal.lua" />
<action itemid="1249" script="doors_keys/door_locked.lua" />
<action itemid="1250" script="doors_keys/door_closed.lua" />
<action itemid="1251" script="doors_keys/door_open_vertical.lua" />
<action itemid="1252" script="doors_keys/door_locked.lua" />
<action itemid="1253" script="doors_keys/door_closed.lua" />
<action itemid="1254" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3535" script="doors_keys/door_locked.lua" />
<action itemid="3536" script="doors_keys/door_closed.lua" />
<action itemid="3537" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3538" script="doors_keys/door_closed.lua" />
<action itemid="3539" script="doors_keys/door_open_horizontal.lua" />
<action itemid="3547" script="doors_keys/door_closed.lua" />
<action itemid="3548" script="doors_keys/door_open_vertical.lua" />
<action itemid="3544" script="doors_keys/door_locked.lua" />
<action itemid="3545" script="doors_keys/door_closed.lua" />
<action itemid="3546" script="doors_keys/door_open_vertical.lua" />
<action itemid="4913" script="doors_keys/door_locked.lua" />
<action itemid="4914" script="doors_keys/door_closed.lua" />
<action itemid="4915" script="doors_keys/door_open_vertical.lua" />
<action itemid="4916" script="doors_keys/door_locked.lua" />
<action itemid="4917" script="doors_keys/door_closed.lua" />
<action itemid="4918" script="doors_keys/door_open_horizontal.lua" />
<action itemid="5082" script="doors_keys/door_closed.lua" />
<action itemid="5083" script="doors_keys/door_open_horizontal.lua" />
<action itemid="5084" script="doors_keys/door_closed.lua" />
<action itemid="5085" script="doors_keys/door_open_vertical.lua" />

<action itemid="2086" script="doors_keys/key.lua" />
<action itemid="2087" script="doors_keys/key.lua" />
<action itemid="2088" script="doors_keys/key.lua" />
<action itemid="2089" script="doors_keys/key.lua" />
<action itemid="2090" script="doors_keys/key.lua" />
<action itemid="2091" script="doors_keys/key.lua" />
<action itemid="2092" script="doors_keys/key.lua" />
<!-- END: Doors and keys -->

W data/actions/scripts: Door_closed.lua
Kod:
-- Door_closed.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doTransformItem(item.uid,item.itemid+1)
return 1
end

W data/actions/scripts: Door_locked.lua
Kod:
-- Door_open_vertical.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doorpos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}
getplayer = getThingfromPos(doorpos)
if getplayer.itemid > 0 then
npos = {x=frompos.x+1, y=frompos.y, z=frompos.z}
doTeleportThing(getplayer.uid,npos)
end
doTransformItem(item.uid,item.itemid-1)
return 1
end

W data/actions/scripts: Door_open_horizontal.lua
Kod:
-- Door_open_horizontal.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
doorpos = {x=frompos.x, y=frompos.y, z=frompos.z, stackpos=253}
getplayer = getThingfromPos(doorpos)
if getplayer.itemid > 0 then
npos = {x=frompos.x, y=frompos.y+1, z=frompos.z}
doTeleportThing(getplayer.uid,npos)
end
doTransformItem(item.uid,item.itemid-1)
return 1
end

W data/actions/scripts: key.lua
Kod:
-- Key.lua
-- Created by GriZzm0.
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 10000 then
if item2.itemid == 1209
or item2.itemid == 1212
or item2.itemid == 1231
or item2.itemid == 1234
or item2.itemid == 1249
or item2.itemid == 1252
or item2.itemid == 3535
or item2.itemid == 3544
or item2.itemid == 4913
or item2.itemid == 4916 then
doTransformItem(item2.uid,item2.itemid+2)
elseif item2.itemid == 1210
or item2.itemid == 1213
or item2.itemid == 1232
or item2.itemid == 1235
or item2.itemid == 1250
or item2.itemid == 1253
or item2.itemid == 3536
or item2.itemid == 3545
or item2.itemid == 4914
or item2.itemid == 4917 then
doTransformItem(item2.uid,item2.itemid-1)
elseif item2.itemid == 1211
or item2.itemid == 1214
or item2.itemid == 1233
or item2.itemid == 1236
or item2.itemid == 1251
or item2.itemid == 1254
or item2.itemid == 3537
or item2.itemid == 3546
or item2.itemid == 4915
or item2.itemid == 4918 then
doTransformItem(item2.uid,item2.itemid-2)
end
else
if item.actionid == item2.actionid then
if item2.itemid == 1209
or item2.itemid == 1212
or item2.itemid == 1231
or item2.itemid == 1234
or item2.itemid == 1249
or item2.itemid == 1252
or item2.itemid == 3535
or item2.itemid == 3544
or item2.itemid == 4913
or item2.itemid == 4916 then
doTransformItem(item2.uid,item2.itemid+2)
elseif item2.itemid == 1210
or item2.itemid == 1213
or item2.itemid == 1232
or item2.itemid == 1235
or item2.itemid == 1250
or item2.itemid == 1253
or item2.itemid == 3536
or item2.itemid == 3545
or item2.itemid == 4914
or item2.itemid == 4917 then
doTransformItem(item2.uid,item2.itemid-1)
elseif item2.itemid == 1211
or item2.itemid == 1214
or item2.itemid == 1233
or item2.itemid == 1236
or item2.itemid == 1251
or item2.itemid == 1254
or item2.itemid == 3537
or item2.itemid == 3546
or item2.itemid == 4915
or item2.itemid == 4918 then
doTransformItem(item2.uid,item2.itemid-2)
end
elseif item2.itemid >= 1209 and item2.itemid <= 1214 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 1231 and item2.itemid <= 1236 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 1249 and item2.itemid <= 1254 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 3535 and item2.itemid <= 3537 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 3544 and item2.itemid <= 3546 then
doPlayerSendCancel(cid,"The key does not match.")
elseif item2.itemid >= 4913 and item2.itemid <= 4918 then
doPlayerSendCancel(cid,"The key does not match.")
else
return 0
end
end
return 1
end

Moim zdaniem najlepszy Key System by GriZzm0.
@edit By Goku.


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Wyświetl posty z ostatnich:   
Napisz nowy temat   Odpowiedz do tematu    Forum .Zapraszamy na nasze forum. Strona Główna -> SKRYPTY!!! Wszystkie czasy w strefie CET (Europa)
Strona 1 z 1

 
Skocz do:  
Możesz pisać nowe tematy
Możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach


fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2002 phpBB Group
Regulamin