Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest truhe begin
- state start begin
- function truhe()
- return
- {
- --truhenvnum--ItemsInDerKiste------itemids-----------chance---------------anzahl
- {123, 5, 10,11,12,13,14, 20,20,20,20,20, 1,1,1,1,1,},
- {1234, 5, 10,11,12,13,14, 20,20,20,20,20, 1,1,1,1,1,}
- }
- end
- when item.get_vnum().use with item.get_type() == 18 begin
- local boni,luck,anz,per,cha,trh = 0,0,0,0,0,truhe.truhe()
- for i = 1, table.getn(trh)+1, 1 do
- if item.get_vnum() == trh[i][1] then
- boni = number(1,trh[i][2])
- ite = boni + 2
- per = boni + 2 + trh[i][2]
- anz = boni + 10
- luck = 0 + per
- cha = number(1,100)
- if cha < luck then
- pc.give_item2(trh[i][ite], trh[i][anz])
- item.remove()
- else
- syschat("Die Kiste war leer. Mehr glück beim nächsten mal!")
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement