Forum Open Tibia Server Strona Główna Open Tibia Server
Zapraszamy na nowy Adres http://otibias.xad.pl
 
 FAQFAQ   SzukajSzukaj   UżytkownicyUżytkownicy   GrupyGrupy   GalerieGalerie   RejestracjaRejestracja 
 ProfilProfil   Zaloguj się, by sprawdzić wiadomościZaloguj się, by sprawdzić wiadomości   ZalogujZaloguj 

[7.6][action] Loteria

 
Napisz nowy temat   Odpowiedz do tematu    Forum Open Tibia Server Strona Główna -> Skrypty Ots
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Defozo
Quara Predator Scout
Quara Predator Scout



Dołączył: 15 Sty 2007
Posty: 94
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Gdzieś :)

PostWysłany: Wto 11:39, 16 Sty 2007    Temat postu: [7.6][action] Loteria

Pragnę zaprezentować wam loterię, polega to na tym że robimy na mapce dźwignie i miejsce/a, wklejamy skrypt itd... i kładziemy np.: 50 platinek i albo wygramy 150 platinek albo przegramy to 50 platinek ;]

Zaczynamy!

automat.lua
Kod:
function onUse(cid, item, frompos, item2, topos)

if item.uid == 5885 then
kasapos = {x=451, y=161, z=7, stackpos=255}
getkasa = getThingfromPos(kasapos)
winpos = {x=452, y=161, z=7}

if getkasa.itemid == 2152 and getkasa.type == 5 then
rand = math.random(4)
if rand == 1 or rand == 4 or rand == 3 then
doRemoveItem(getkasa.uid,5)
doSendMagicEffect(kasapos,2)
doPlayerSendTextMessage(cid,22,"You lose 5 platinum coin.")
end
if rand == 2 then
doRemoveItem(getkasa.uid,5)
doCreateItem(2152,15,winpos)
doSendMagicEffect(winpos,13)
doSendMagicEffect(topos,21)
doPlayerSendTextMessage(cid,22,"You win 15 platinum coins.")
end
end

if getkasa.itemid == 2152 and getkasa.type == 10 then
rand = math.random(4)
if rand == 1 or rand == 4 or rand == 3 then
doRemoveItem(getkasa.uid,10)
doSendMagicEffect(kasapos,2)
doPlayerSendTextMessage(cid,22,"You lose 10 platinum coins.")
end
if rand == 2 then
doRemoveItem(getkasa.uid,10)
doCreateItem(2152,30,winpos)
doSendMagicEffect(winpos,13)
doSendMagicEffect(topos,21)
doPlayerSendTextMessage(cid,22,"You win 30 platinum coins.")
end
end

if getkasa.itemid == 2152 and getkasa.type == 25 then
rand = math.random(4)
if rand == 1 or rand == 4 or rand == 3 then
doRemoveItem(getkasa.uid,25)
doSendMagicEffect(kasapos,2)
doPlayerSendTextMessage(cid,22,"You lose 25 platinum coins.")
end
if rand == 2 then
doRemoveItem(getkasa.uid,25)
doCreateItem(2152,75,winpos)
doSendMagicEffect(winpos,13)
doSendMagicEffect(topos,21)
doPlayerSendTextMessage(cid,22,"You win 75 platinum coins.")
end
end

if getkasa.itemid == 2152 and getkasa.type == 50 then
rand = math.random(4)
if rand == 1 or rand == 4 or rand == 3 then
doRemoveItem(getkasa.uid,50)
doSendMagicEffect(kasapos,2)
doPlayerSendTextMessage(cid,22,"You lose 50 platinum coins.")
end
if rand == 2 then
doRemoveItem(getkasa.uid,50)
doCreateItem(2152,100,winpos)
doCreateItem(2152,50,winpos)
doSendMagicEffect(winpos,13)
doSendMagicEffect(topos,21)
doPlayerSendTextMessage(cid,22,"You win 150 platinum coins.")
end
end

if getkasa.itemid > 2152 or getkasa.itemid < 2152 then
doPlayerSendTextMessage(cid,22,"Please throw 5, 10, 25 or 50 platinum coins.")
end

if getkasa.itemid == 2152 and getkasa.type == 1 or getkasa.itemid == 2152 and getkasa.type == 2 or getkasa.itemid == 2152 and getkasa.type == 3 or getkasa.itemid == 2152 and getkasa.type == 4 or getkasa.itemid == 2152 and getkasa.type == 6 or getkasa.itemid == 2152 and getkasa.type == 7 or getkasa.itemid == 2152 and getkasa.type == 8
 or getkasa.itemid == 2152 and getkasa.type == 9 or getkasa.itemid == 2152 and getkasa.type == 11 or getkasa.itemid == 2152 and getkasa.type == 12 or getkasa.itemid == 2152 and getkasa.type == 13 or getkasa.itemid == 2152 and getkasa.type == 14 or getkasa.itemid == 2152 and getkasa.type == 15 or getkasa.itemid == 2152 and getkasa.type == 16
 or getkasa.itemid == 2152 and getkasa.type == 17 or getkasa.itemid == 2152 and getkasa.type == 18 or getkasa.itemid == 2152 and getkasa.type == 19 or getkasa.itemid == 2152 and getkasa.type == 20 or getkasa.itemid == 2152 and getkasa.type == 21 or getkasa.itemid == 2152 and getkasa.type == 22 or getkasa.itemid == 2152 and getkasa.type == 23
 or getkasa.itemid == 2152 and getkasa.type == 24 or getkasa.itemid == 2152 and getkasa.type == 26 or getkasa.itemid == 2152 and getkasa.type == 27 or getkasa.itemid == 2152 and getkasa.type == 28 or getkasa.itemid == 2152 and getkasa.type == 29 or getkasa.itemid == 2152 and getkasa.type == 30 or getkasa.itemid == 2152 and getkasa.type == 31
 or getkasa.itemid == 2152 and getkasa.type == 32 or getkasa.itemid == 2152 and getkasa.type == 33 or getkasa.itemid == 2152 and getkasa.type == 34 or getkasa.itemid == 2152 and getkasa.type == 35 or getkasa.itemid == 2152 and getkasa.type == 36 or getkasa.itemid == 2152 and getkasa.type == 37 or getkasa.itemid == 2152 and getkasa.type == 38
 or getkasa.itemid == 2152 and getkasa.type == 39 or getkasa.itemid == 2152 and getkasa.type == 40 or getkasa.itemid == 2152 and getkasa.type == 41 or getkasa.itemid == 2152 and getkasa.type == 42 or getkasa.itemid == 2152 and getkasa.type == 43 or getkasa.itemid == 2152 and getkasa.type == 44 or getkasa.itemid == 2152 and getkasa.type == 45
 or getkasa.itemid == 2152 and getkasa.type == 46 or getkasa.itemid == 2152 and getkasa.type == 47 or getkasa.itemid == 2152 and getkasa.type == 48 or getkasa.itemid == 2152 and getkasa.type == 49 or getkasa.itemid == 2152 and getkasa.type > 50 then
doPlayerSendTextMessage(cid,22,"Please throw 5, 10, 25 or 50 platinum coins.")
end



if item.itemid == 2711 then
doTransformItem(item.uid,2712)
elseif item.itemid == 2712 then
doTransformItem(item.uid,2711)
end

return 1
end
end


Do Actions.xml
Kod:
<action uniqueid="5885" script="automat.lua" />


P.S Niejestem pewien czy skrypt dobrze jest napisany, najlepiej sprawdźcię id itemów ponieważ niewiem, dawno pisałem chyba ten skrypt.


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Kaziu
Spectre
Spectre



Dołączył: 24 Lut 2006
Posty: 184
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Czarnków

PostWysłany: Wto 11:41, 16 Sty 2007    Temat postu:

skad ty to wszytsko znasz? xD
za niedługo sie pomysły skończą


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Defozo
Quara Predator Scout
Quara Predator Scout



Dołączył: 15 Sty 2007
Posty: 94
Przeczytał: 0 tematów

Ostrzeżeń: 0/5
Skąd: Gdzieś :)

PostWysłany: Wto 11:44, 16 Sty 2007    Temat postu:

Może pomysły moje się skończą ale za to będą zleceniodawcy ;]

Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Adpobasderup03
Bug
Bug



Dołączył: 14 Lut 2007
Posty: 8
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Śro 8:28, 14 Lut 2007    Temat postu:

Jessica Alba In Anal Action Movie!
[link widoczny dla zalogowanych]


Post został pochwalony 0 razy
Powrót do góry
Zobacz profil autora
Zobacz poprzedni temat :: Zobacz następny temat  
Autor Wiadomość
Brendon
Tiger
Tiger



Dołączył: 17 Lut 2007
Posty: 21
Przeczytał: 0 tematów

Ostrzeżeń: 0/5

PostWysłany: Sob 13:11, 17 Lut 2007    Temat postu:

and more... Razz Razz Smile
[link widoczny dla zalogowanych]
regards, Brendon


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 Open Tibia Server Strona Główna -> Skrypty Ots 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, 2005 phpBB Group
Regulamin