• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Use Lever..!

Maniucza

~Lua~ Noob
Joined
Aug 2, 2009
Messages
86
Reaction score
6
Location
Poland / Rzeszów
Hello I am then again: D This time I invented a script that after using our lever learn all spells usefulness
ne example of the OTS RPG small experance ..

Data/actions/scripts/allspells.lua

PHP:
function onUse(cid, item, frompos, item2, topos)
local spells = {'utevo lux', 'exura', 'exura gran'}   -- You enter inkatacje You enter inkatacje all spells, which is to give
if (getPlayerStorageValue(cid,5558) == -1) then
	for i=1, #spells do
		doPlayerLearnSpell(cid, spells[i])
	end
	doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_GREEN)
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have learnt all spells")
else
	doPlayerSendCancel(cid,"You have learnt all spells already")
end
end


At the top type inkatacje (what the spells: words = "inkatacja here) all spells.
 
Fixed

Lua:
local storage = 22113
function onUse(cid, item, fromPosition, itemEx, toPosition)
local spells = {'spell_name', 'spell_name'}
	if (getPlayerStorageValue(cid, storage) == -1) then
		for i=1, #spells do
			doPlayerLearnInstantSpell(cid, spells[i])
		end
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned some new spells.")
                setPlayerStorageValue(cid, storage, 1)
	else
		doPlayerSendCancel(cid, "You have already used this.")
	end
	return true
end
 
Back
Top