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

my lua advances

Yeah so? That's how he had it before, I was just remaking his script....
It wasn't, check it... Anyways, it doesn't matter.
ok guys dont fight:$
new script
LUA:
local playerTown = getPlayerTown(cid)
          local playerPos = getCreaturePosition(cid)
             if(item.actionid == 2001 then
                 if playerTown == 1 then
                          doSendAnimatedText(playerPos, 'You may pass', TEXTCOLOR_ORANGE)
              elseif playerTown == 2 then
                     doSendAnimatedText(playerPos, 'You must be a residence to pass', TEXTCOLOR_ORANGE)
              end
end
i dont think it works though :/
Where's the function onUse or onStepIn or whatever? xD
 
ok.
_______________
new script
LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
    if skill == SKILL__LEVEL and newLevel == 50 then
        local bag = doPlayerAddItem(cid,2001,1)
        doAddContainerItem(bag,2160,10)
    end
    return true
end

fixed
 
LUA:
function onAdvance(cid, skill, oldLevel, newLevel)
    if skill == SKILL__LEVEL and newLevel == 50 then
        local bag = doPlayerAddItem(cid,2001,1)
        doAddContainerItem(bag,2160,10)
    end
    return true
end

fixed
i dont want it to add a bag then 10ccs;)

made a new spell
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

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

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

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Last edited by a moderator:

Similar threads

Back
Top