Autor Wiadomość
son_of_sillve
PostWysłany: Wto 9:23, 15 Maj 2007    Temat postu: Skrypt na świnkę skarbonkę z losowo wypadającą kasą

Rozbij świnkę i zbierz kasę... może się przyda Smile

w pliku actions.xml zmieniamy :

Kod:
<action itemid="2933" script="trans_inc.lua" /> --pig bank--

na :
Kod:
<action itemid="2933" script="pig bank.lua" /> --pig bank--


w folderze scripts tworzymy pig bank.lua a w nim :

Kod:
function onUse(cid, item, frompos, item2, topos)
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2934,1)
rand = math.random(1,20)
if rand == 1 then
doPlayerAddItem(cid,2969,1)
elseif rand == 2 then
doPlayerAddItem(cid,2969,5)
elseif rand == 3 then
doPlayerAddItem(cid,2969,8)
elseif rand == 4 then
doPlayerAddItem(cid,2969,12)
elseif rand == 5 then
doPlayerAddItem(cid,2969,17)
elseif rand == 6 then
doPlayerAddItem(cid,2969,21)
elseif rand == 7 then
doPlayerAddItem(cid,2969,24)
elseif rand == 8 then
doPlayerAddItem(cid,2969,31)
elseif rand == 9 then
doPlayerAddItem(cid,2969,37)
elseif rand == 10 then
doPlayerAddItem(cid,2969,42)
elseif rand == 11 then
doPlayerAddItem(cid,2969,53)
elseif rand == 12 then
doPlayerAddItem(cid,2969,57)
elseif rand == 13 then
doPlayerAddItem(cid,2969,64)
elseif rand == 14 then
doPlayerAddItem(cid,2969,69)
elseif rand == 15 then
doPlayerAddItem(cid,2969,75)
elseif rand == 16 then
doPlayerAddItem(cid,2969,83)
elseif rand == 17 then
doPlayerAddItem(cid,2969,91)
elseif rand == 18 then
doPlayerAddItem(cid,2969,93)
elseif rand == 19 then
doPlayerAddItem(cid,2969,96)
elseif rand == 20 then
doPlayerAddItem(cid,2969,100)

end
return 1
end


id świnki to 2933
Życzę bogatych zbiorów ;P

Powered by phpBB © 2001,2002 phpBB Group