• 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!

Solved by Andy my brother :D ty bro <333!! Close theard or remove!

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,782
Solutions
31
Reaction score
2,287
Location
Sweden?
Solved by Andy my brother :D ty bro <333
 
Last edited:
Solved by Andy my brother :D ty bro <333
 
Last edited:
fogott to say, it good to ots so none can just sit there and botting ml up they need to take lvl to get more ml
 
Last edited:
Lua:
local name = {"" .. name .. ""}
local amount = {}
local levels = {
[8] = {15},
[9] = {25}
}

function onAdvance(cid, skill, oldLevel, newLevel)
	for k,v in ipairs(levels) do
	if getPlayerLevel(cid) == k[newLevel] and getPlayerMagLevel(cid)[skill] >= v and getInstantSpellInfo(cid, name) then
		doPlayerAddSpentMana(cid, 0)
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot gain more magic experience in your current level.")
	else
		doPlayerAddSpentMana(cid, amount)
	end
	end
end
 
Last edited:
sorry but it doesnt work i can i have more than 15 ml when i lvl 8 :/
 
i wonder is this right on creaturescript.xml
Code:
<event type="advance" name="AdvanceML" event="script" value="ml.lua"/>
 
Try this last one, if it doesn't work I'm going out for now and I might help ya later if ya haven't received the help you need. But it's a bit harder than it should be because there's no actual function for what it is your requesting, the closest I could get was doPlayerAddSpentMana(cid, amount).
 
Addmanaspent what do you mean about that, dont tell me that if i lvl 8 and i have the max ml 15 i dont have any mana left or what?, the only thing if you get lvl 8 and magic 15 you cant gain anymore ml exprience until you reach level 9 then you can get up to 25magic max then it stops until a other level.
 
i get this error:
[04/12/2011 18:12:14] [Error - CreatureScript Interface]
[04/12/2011 18:12:14] data/creaturescripts/scripts/ml.lua
[04/12/2011 18:12:14] Description:
[04/12/2011 18:12:14] data/creaturescripts/scripts/ml.lua:1: attempt to concatenate global 'name' (a nil value)
[04/12/2011 18:12:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/ml.lua)
 
Back
Top