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

Some functions i made out of boredness

there was a missing ) in this line
Code:
doPlayerSendDefaultCancel(cid, math.max(1, math.min(63, tonumber(message)))[B])[/B]
 
not this :S

Lua:
[Error - Spell Interface] 
[31/10/2012 14:49:02] data/spells/scripts/edited/gran ico.lua:onCastSpell
[31/10/2012 14:49:02] Description: 
[31/10/2012 14:49:02] data/spells/scripts/edited/gran ico.lua:17: attempt to call global 'getPlayerReborns' (a nil value)
[31/10/2012 14:49:02] stack traceback:
[31/10/2012 14:49:02] 	data/spells/scripts/edited/gran ico.lua:17: in function <data/spells/scripts/edited/gran ico.lua:16>

Spell + reborn condition

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onGetFormulaValues(cid, level, skill, attack, factor)
	local skillTotal, levelTotal = skill + attack * 2, level / 5
	return -(skillTotal * 3.2 + levelTotal), -(skillTotal * 5 + levelTotal)
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

function onCastSpell(cid, var)
    if getPlayerReborns(cid) < 1 then --Replace by getPlayerStorageValue or the function that you made urself
        sendCancelMessage(cid, "You dont have enough reborns to use this spell!") --Check Below
        return false
    end
end
 
that was just the example function I gave you, you have to change for the function your system uses(which I don't guess!) -.-'
 
function isWalkable(cid,pos)
pos.stackpos = 253
if doTileQueryAdd(cid, pos) == 1 and getTilePzInfo(pos) == FALSE and isCreature(getThingFromPos(pos).uid) == FALSE then
return TRUE
end
return FALSE
end
This function already exist... and was made by nord 2 years ago, it looks the same
 
this was made in 2009 lol
if he made it 2 years ago, that would be 2010, I'm still first :p

I don't copy other people scripts, that's just wrong, everything I release, I made it myself
 
Last edited:
oh lol
well, I initially had a different version, but chojrak on the second post offered a better way to do it so I edited the first post, so if its copied, complain to him, not me, I had no idea it was copied!
 
Back
Top