• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[MR] Zmiana v. z 8.1 na 8.54

Status
Not open for further replies.

Reins

Member
Joined
Apr 9, 2009
Messages
586
Reaction score
8
Pomógł by ktoś zmienić scrypt aby działał on na wersji 8.54? ( tfs 3784 o ile się nie mylę)

LUA:
function onUse(cid, item, frompos, item2, topos)
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	-- Exhausted Settings --
	local exhausted_seconds = 5 -- How many seconds manarune will be unavailible to use. --
	local exhausted_storagevalue = 9000 -- Storage Value to store exhaust. It MUST be unused! --
	-- Exhausted Settings END --
	-- Mana Formula Settings --
	-- You can use "level" and "mlevel" --
	local mana_minimum = (level * 1) + (mlevel * 2) - 100
	local mana_maximum = (level * 1) + (mlevel * 2)
	-- Mana Formula Settings END --
	local mana_add = math.random(500, 1000)
		-- We check the charges. --
		if(item.type > 1) then
			-- Exhausted check. --
			if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
				-- Entity is player? --
				if(isPlayer(item2.uid) == 1) then
					doSendMagicEffect(frompos, CONST_ME_MAGIC_RED)
					doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
					doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
					doPlayerAddMana(item2.uid, mana_add)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					doChangeTypeItem(item.uid, item.type - 1)
				else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You can use this rune only on players.")
				end
			else
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			end
		else
			if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			else
				if(isPlayer(item2.uid) == 1) then
					doSendMagicEffect(frompos, CONST_ME_MAGIC_RED)
					doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
					doSendAnimatedText(topos, mana_add, TEXTCOLOR_LIGHTBLUE)
					doPlayerAddMana(item2.uid, mana_add)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					doRemoveItem(item.uid, 1)
				else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You can use this rune only on players.")
				end
			end
		end
	return 1
end

XML:
<rune name="Mana Rune" id="2270" charges="100" maglv="0" exhaustion="10" enabled="1" allowfaruse="1" event="script" value="healing/manarune.lua"/>

Błąd który wychodzi z silnika:

Code:
.
[15:28:08.468] [Warning - Event::loadScript] Event onCastSpell not found (data/spells/scripts/healing/manarune.lua)
 
Poważnie nie rozumiesz tego błedu ?
 
Status
Not open for further replies.
Back
Top