-LUA & XML Slot System - Otsmateria

Status
Zamknięty.

R A H

Senior User
Zarejestrowany
Dołączył
Maj 24, 2014
Posty
1342
Liczba reakcji
47
Witam poszukuj? Slot Systemu z Otsmaterii
(Gdyby kto? by?by taki mi?y i by all wyci?? i napisa?, co, gdzie i jak)

Kiedy? znalaz?em ten system tutaj na TNP jednak teraz nie widz? :/


Jest to system ulepsze? kt?ry ulepsza: HP/MP/CAS itd..
 
Ostatnia edycja:
Odp: Slot System - Otsmateria

sciung date materi i sobie wytnij co ci potrzeba?
pls
 
Odp: Slot System - Otsmateria

Nie pami?tam dok?adnie w jakich katalogach to by?o.. i co by?o z zapytaniem.

Wiem, ?e kiedy? dok?adnie ten sam skrypt by? na otsmaterii
 
Odp: Slot System - Otsmateria

W dacie materii jest ten sam kod, kt?ry poda? $wirus.
 
Odp: Slot System - Otsmateria

Inny

---------- Tre?? dodana o 20:26 ----------

W Otsmaterii w actions wygl?da to tak :x
Poszukuj? tylko reszty tego skryptu (actions mam)



HTML:
local conf = {
	maxSlotCount = 2,
	perecent = {min = 1, max = 5}, -- od ile % do ilu % ma dawac bonusu
	ignoredIds = {}
}

function choose(...) --- Function by mock.
	local arg = {...}
	return arg[math.random(1,#arg)]
end

function isArmor(uid) -- Function by Mock the bear.
    if getItemInfo(uid.itemid).armor ~= 0 and getItemWeaponType(uid.uid) == 0 then
		return true
	end
	return false
end

function getSlotCount(nam)
	local c = 0
	for _ in nam:gmatch('%[(.-)%]') do
		c = c + 1
	end
	return c
end

function onUse(cid, item, fromPosition, itemEx, toPosition) -- Script by mock the bear (MTB)
	if not checkExhausted(cid, 429, 1) then
		return true
	elseif item.uid == 0 or item.itemid == 0 then
		return false
	elseif isInArray(conf.ignoredIds, itemEx.itemid) or (not getItemWeaponType(itemEx.uid) or getItemWeaponType(itemEx.uid) > 5)
		or (getItemWeaponType(itemEx.uid) == 0 and not isArmor(itemEx))
		or itemEx.itemid == 0 or itemEx.type > 1 or isItemStackable(itemEx.uid) then
		doPlayerSendTextMessage(cid, 24, "You can\'t open a slot on this item.")
		return true
	elseif isCreature(itemEx.uid) then
		return false
	end
	
	local nam = getItemName(itemEx.uid)	
	if getSlotCount(nam) < conf.maxSlotCount then
		local l = choose('hp', 'mp')
		local p = math.random(conf.perecent.min, conf.perecent.max)
 
		doSendMagicEffect(toPosition, 30)
		nam = nam..' ['..l..'.+'..p..'%]'
		doSendAnimatedText(toPosition, l..' '..p..'%', 120)
		doItemSetAttribute(itemEx.uid, 'name', nam)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendTextMessage(cid, 24, "You cant open a slot on this item.")
	end
	return true
end
 
Odp: Slot System - Otsmateria

f 5
 
Status
Zamknięty.
Back
Do góry