What's new

Actions Piggy Bank 7.6 XML [TESTOWANY!]

Sepox

Active User
Joined
Mar 16, 2017
Messages
138
Reaction score
0
Witam przedstawiam wam KOD "--> nie m?j <--, tylko doda?em funkcje co wylosowa?a nam ?winka". Mo?e si? komu? przyda! Kod dzia?a w 100% pod Silnik 7.6 XML o to kod.

4d4e58cae21ac.jpg

Wchodzimy w Data/Actions
Otwieramy Plik Actions.xml
Szukamy i usuwamy t? lini?

<action itemid="2114" script="trans_inc.lua" /> --pig bank--
Po czym dodajemy Lini?
<action itemid="2114" script="swinka.lua" />
Jak to dodali?my teraz wchodzimy w Folder Actions tworzymy plik o nazwie "swinka.lua". Pami?taj ?e to s? moje ustawione Itemy kt?re losuje , mo?esz zawsze na swoje zmieni?, ?winka losuje 1 z 10item?w kt?re s? dodane.. a w tym kodzie mo?ecie zmieni? swoje ID itemu
doPlayerAddItem(cid,2437, 1)
O to KOD swinka.lua
function onUse(cid, item, frompos, item2, topos)
prize = math.random(1, 10)
if prize == 1 then
doPlayerAddItem(cid,2437, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Golden Bolt!")
elseif prize == 2 then
doPlayerAddItem(cid,2640, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Soft Boots!")
elseif prize == 3 then
doPlayerAddItem(cid,2157, 50)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales 50 Nuggets Coins!")
elseif prize == 4 then
doPlayerAddItem(cid,2424, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Silver Wand!")
elseif prize == 5 then
doPlayerAddItem(cid,2644, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Magiczne Kapcie Zapomnienia!")
elseif prize == 6 then
doPlayerAddItem(cid,2452, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Magic Mace!")
elseif prize == 7 then
doPlayerAddItem(cid,2124, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Exp Ringa!")
elseif prize == 8 then
doPlayerAddItem(cid,2501, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Magic Sapphire Helmet")
elseif prize == 9 then
doPlayerAddItem(cid,2503, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Sapphire Armor!")
elseif prize == 10 then
doPlayerAddItem(cid,2504, 1)
doSendMagicEffect(topos,12)
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,16,"Gratulacje Wylosowales Sapphire Legs!")
end
return 1
end
 
Top