Moderator
Dołączył: 01 Paź 2008
Posty: 41
Przeczytał: 0 tematów
Pomógł: 1 raz Ostrzeżeń: 0/5 Skąd: Lublin
|
Wysłany: Pon 13:04, 20 Paź 2008 Temat postu: kasyno |
|
scrypt nie moj
Witam chcialbym dac skrypt ktory od dawna uzywalem moze wam sie przyda (kumpel dal mi go dawno a on nie wiem skad ma ale w kazdym razie nie jest moj)
W data/actions/scripts robimy plik kasyno.lua i wklejamy
function onUse(cid, item, frompos, item2, topos)
if ((item.actionid == 4334) and (item.itemid == 1945)) then
local kasapos = {x=frompos.x-1, y=frompos.y, z=frompos.z, stackpos=255}
local kasa = getThingfromPos(kasapos)
local wygrana = (kasa.type * 10)
local rand = math.random(1, 5)
if kasa.itemid == 2152 or kasa.itemid == 2148 or kasa.itemid == 2160 then
if kasa.type <= 10 then
if rand == 1 then
doRemoveItem(kasa.uid,kasa.type)
doCreateItem(kasa.itemid,wygrana,kasapos)
doSendMagicEffect(kasapos,31)
doPlayerSendTextMessage(cid,22,"Wygrales!!!")
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"Straciles tylko kase...")
doRemoveItem(kasa.uid,kasa.type)
doSendMagicEffect(kasapos,2)
doTransformItem(item.uid,item.itemid+1)
end
else
doPlayerSendCancel(cid,"Maksymalna kwota zakladu to 10!")
end
else
doPlayerSendCancel(cid,"Poloz obok pieniadze!")
end
elseif ((item.actionid == 4334) and (item.itemid == 1946)) then
local kasapos = {x=frompos.x-1, y=frompos.y, z=frompos.z, stackpos=255}
local kasa = getThingfromPos(kasapos)
local wygrana = (kasa.type * 10)
local rand = math.random(1, 5)
if kasa.itemid == 2152 or kasa.itemid == 2148 or kasa.itemid == 2160 then
if kasa.type <= 10 then
if rand == 1 then
doRemoveItem(kasa.uid,kasa.type)
doCreateItem(kasa.itemid,wygrana,kasapos)
doSendMagicEffect(kasapos,31)
doPlayerSendTextMessage(cid,22,"Wygrales!!!")
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Straciles tylko kase...")
doRemoveItem(kasa.uid,kasa.type)
doSendMagicEffect(kasapos,2)
doTransformItem(item.uid,item.itemid-1)
end
else
doPlayerSendCancel(cid,"Maksymalna kwota zakladu to 10!")
end
else
doPlayerSendCancel(cid,"Poloz obok pieniadze!")
end
else
return 0
end
return 1
end
Potem do data/actions/actions.xml wklejamy
<action itemid="4334" script="kasyno.lua" />
Nie oczekuje na +
PzDr
Post został pochwalony 0 razy
|
|