Cytat:
local a = getPlayerSlotItem(cid, 1)
local b = getPlayerSlotItem(cid, 2)
local c = getPlayerSlotItem(cid, 3)
local d = getPlayerSlotItem(cid, 4)
local e = getPlayerSlotItem(cid, 5)
local f = getPlayerSlotItem(cid, 6)
local g = getPlayerSlotItem(cid, 7)
local h = getPlayerSlotItem(cid, 8)
local i = getPlayerSlotItem(cid, 9)
local j = getPlayerSlotItem(cid, 10)
local k = math.random(a, b, c, d, e, f, g, h, i, j)
local l = getItemArmor(uid)
local function isArmor(uid)
if (getItemArmor(uid) and getItemArmor(uid) ~= 0 and not getItemInfo(uid.itemid,'attack') and not getItemInfo(uid.itemid,'defense') and getItemWeaponType(uid.uid) == 0) then
return true
end
return false
end
function onUse
if isArmor(uid)
setItemArmor(uid, (l+1))
end
end
1. Losowanie jednego ze slotów.
2. Dodawanie wylosowanemu slotowi armora - pod warunkiem, że nie jest to broń albo tarcza.
Problemem moim jest to, że za chiny nie mogę wymyślić w jaki sposób "k" zkalkulować z "l" (skrypt). "local k" losuje jeden ze slotów ale w funkcji jest local (L+1) to oznacza, że sprawdza gracza zbroje i dodaje 1 ale nadal nie losuje.
Pewnie po dodaniu postu będzie więcej błędów, ale wole o nich wiedzieć ...







