Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest zapisLokalizacji begin
- state start begin
- function updateClientInfo()
- cmdchat("SaveIntoConstInfo "..pc.getqf("idx_1").."|"..pc.getqf("local_x_1").."|"..pc.getqf("local_y_1").." "..pc.getqf("idx_2").."|"..pc.getqf("local_x_2").."|"..pc.getqf("local_y_2").." "..pc.getqf("idx_3").."|"..pc.getqf("local_x_3").."|"..pc.getqf("local_y_3").." "..pc.getqf("idx_4").."|"..pc.getqf("local_x_4").."|"..pc.getqf("local_y_4").." "..pc.getqf("idx_5").."|"..pc.getqf("local_x_5").."|"..pc.getqf("local_y_5"))
- end
- when login begin
- cmdchat("SaveQID "..q.getcurrentquestindex())
- zapisLokalizacji.updateClientInfo()
- end
- when info or button begin
- local dane = podzial_tekstu(q.get_input2(), "|")
- if tostring(dane[1]) == "read" or tostring(dane[1]) == "save" then
- if tonumber(dane[2]) <= 5 and tonumber(dane[2]) >= 1 then
- local index = pc.getqf("idx_"..tonumber(dane[2]))
- if tostring(dane[1]) == "read" then
- if index == 0 then
- syschat("<Teleportacja> Nic nie jest zapisane w tym miejcu!")
- return
- end
- pc.warp(pc.getqf("global_x_"..tonumber(dane[2]))*100, pc.getqf("global_y_"..tonumber(dane[2]))*100)
- else
- local idxForbidden = {220, 214, 213, 212, 211, 250, 71, 72, 73, 193, 5, 25, 45, 75, 76, 77, 78, 80, 6, 109}
- if table_is_in(idxForbidden, pc.get_map_index()) or pc.in_dungeon() or pc.get_channel_id() == 99 then
- syschat("<Teleportacja> Nie możesz utworzyć zapisu na tej mapie!")
- return
- end
- syschat("<Teleportacja> Pomyślnie utworzono zapis na tej pozycji!")
- pc.setqf("idx_"..tonumber(dane[2]), pc.get_map_index())
- pc.setqf("global_x_"..tonumber(dane[2]), pc.get_x())
- pc.setqf("global_y_"..tonumber(dane[2]), pc.get_y())
- pc.setqf("local_x_"..tonumber(dane[2]), pc.get_local_x())
- pc.setqf("local_y_"..tonumber(dane[2]), pc.get_local_y())
- zapisLokalizacji.updateClientInfo()
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment