• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Runy

Zacky

New Member
Joined
Jan 7, 2011
Messages
55
Reaction score
0
Location
Zielona Góra
Związku z runami na 8.6 chciałbym się dowiedzieć czy istnieje taka możliwość aby się one kończyły oraz były sprzedawane u npc w stackach po 100 użyć.
Ostatnio założyłem podobny temat i uzyskałem odpowiedź , że w 8.6 jest automatyczny system łączenia run , tylko że on jest zawodny...
Często jest tak , że runa po rozdzieleniu uzyskuje 100 kawałków po 1 użytek. Chciałbym odnaleźć rozwiązanie do tego problemu jakieś konkretne wyjście z sytuacji.
Może to także oznaczać usunęcię tego systemu tylko w jaki sposób to zrobić?
Proszę o szybką odpowiedź.
Zacky
 
Jak masz takie błędy to masz coś źle w skryptach lub w source, u mnie jakoś all git śmiga, nie rozumiem więc jak to jest u ciebie z tym błędem.
I wgl, po co sprzedawać na trade w grupkach po 100 jak gracz może sobie wybrać ile tam chce sobie kupić?
Możesz ewentualnie zrobić by pisało się np. hi buy 100 uh yes lub dźwignie na kupowanie run czy coś.
 
Może to coś właśnie z
"050-function.lua" (fragment)?
function doPlayerGiveItem(cid, itemid, amount, subType)
local item = 0
if(isItemStackable(itemid)) then
item = doCreateItemEx(itemid, amount)
if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
return false
end
else
for i = 1, amount do
item = doCreateItemEx(itemid, subType)
if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
return false
end
end
end

return true
end

function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType)
for i = 1, amount do
local container = doCreateItemEx(containerid, 1)
for x = 1, getContainerCapById(containerid) do
doAddContainerItem(container, itemid, subType)
end

if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then
return false
end
end

return true
end
 
Nie wiem, ja mam tak w functionsach libsach:
Code:
function doPlayerGiveItem(cid, itemid, amount, subType)
	local item = 0
	if(isItemStackable(itemid)) then
		item = doCreateItemEx(itemid, amount)
		if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
			return false
		end
	else
		for i = 1, amount do
			item = doCreateItemEx(itemid, subType)
			if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
				return false
			end
		end
	end

	return true
end



function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType)
	for i = 1, amount do
		local container = doCreateItemEx(containerid, 1)
		for x = 1, getContainerCapById(containerid) do
			doAddContainerItem(container, itemid, subType)
		end

		if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then
			return false
		end
	end

	return true
end


Oraz to\:

Code:
function doPlayerBuyItem(cid, itemid, count, cost, charges)
	return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItem(cid, itemid, count, charges)
end

function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
	return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItemContainer(cid, containerid, itemid, count, charges)
end

function doPlayerSellItem(cid, itemid, count, cost)
	if(not doPlayerTakeItem(cid, itemid, count)) then
		return false
	end

	if(not doPlayerAddMoney(cid, cost)) then
		error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).')
	end

	return true
end
 
Back
Top