×
×
• Create New...
• 0

# [Problem] Tombola Quest

## Question

Hi !. I've added to the server quest tombola. I don't know how to write a function that will unlock button to re-draw after the function returns "return".

```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 możesz losować, gdyż masz za mało miejsca w ekwipunku.")
return
end
if pc.count_item(200038) < 1 then
syschat("Nie posiadasz kuponu losu, nie możesz więc losować nagrody!")
cmdchat("reset_tombola_button")
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! Otrzymałeś "..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))
pc.remove_item(200038, 1)
end
end
end
end```

game.py

``` "reset_tombola_button"                : self.__ResetTombola,
[..]
def    __ResetTombola(self):
AND WHAT ?```

Edited by AndrewSkc
• Created

## Recommended Posts

There have been no answers to this question yet

## Create an account

Register a new account

1. 11

2. 1

3. 0

4. 1

5. 0

6. 1

7. 12

8. 29

9. 29