• 0

# Quest problem

## Question

```quest tombola begin
state start begin
function tablica(vnum, pozycja, pozycja2)
local itemy = {
{
{71001, 1},
{71084, 25},
{71085, 25},
{25040, 3},
{27992, 2},
{27993, 2},
{27994, 2},
{27987, 5},
{72002, 1},
{71027, 5},
{71028, 5},
{71029, 5},
{71030, 5},
{71036, 1},
{50008, 15},
{70021, 3},
{71001, 1},
},
{
{25041, 1},
{71084, 25},
{71085, 25},
{25040, 3},
{27992, 2},
{27993, 2},
{27994, 2},
{27987, 5},
{72002, 1},
{71027, 5},
{71028, 5},
{71029, 5},
{71030, 5},
{71036, 1},
{50008, 15},
{70021, 3},
{25041, 1},
}
}
return itemy[vnum][pozycja][pozycja2]
end

cmdchat("tombola "..q.getcurrentquestindex())
end

when 9005.chat."Open Tombola" with pc.is_gm() begin
local losowo = number(1,2)
local str = " "
for i = 1,16 do
if i == 16 then
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2)
else
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2).."|"
end
end
cmdchat("OnPrepare"..str)
cmdchat("openTombola")
setskin(NOWINDOW)
end

when info or button begin
local losowo = number(1,2)
local str = " "
for i = 1,16 do
if i == 16 then
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2)
else
str = str..tombola.tablica(losowo, i, 1).."|"..tombola.tablica(losowo, i, 2).."|"
end
end
cmdchat("OnPrepare"..str)
if pc.get_empty_inventory_count() < 3 then
syschat("Nie mozesz losowac, gdyz masz za malo miejsca w ekwipunku.")
return
end
cmdchat("get_input_start")
local czynnosc = input(cmdchat("get_input_value"))
cmdchat("get_input_end")
if czynnosc == "tombola|begin" then
pc.setqf("slot", number(1, 16))
cmdchat("OnRun "..number(2,3)*16+pc.getqf("slot").."|5")
elseif czynnosc == "tombola|end" then
syschat("Gratulacje! Otrzymales "..tombola.tablica(losowo, pc.getqf("slot")+1, 2).."x "..item_name(tombola.tablica(losowo, pc.getqf("slot")+1, 1)).." jako nagroda w Tomboli!")
pc.give_item2(tombola.tablica(losowo, pc.getqf("slot")+1, 1), tombola.tablica(losowo, pc.getqf("slot")+1, 2))
end
end
end
end
```

quest fix ;() ? input cmd

• Created

• 0

Up---Ø

• 0

Up---Ø

• 0

Up---Ø

• 0

Up---Ø

• 0

Up---Ø

## Create an account

Register a new account

1. 0

2. 1

3. 2

4. 7

5. 73

6. 2

7. 2

8. 2

9. 2

• ### Recently Browsing

×

• Marketplace

• #### Tools

×
• Create New...