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

Spell which needs item for Casting

SeoxTard

New Member
Joined
Nov 14, 2008
Messages
17
Reaction score
0
hey guys..
i found this spell here on otland

Code:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

function onCastSpell(cid, var) 
    local config = { 
        promotion_lvl = 1, --standart promotion 
        outfit = {lookType=145, lookHead=124, lookAddons=1, lookLegs=45, lookBody=11, lookFeet=87} 
    } 
    doPlayerSetPromotionLevel(cid, config.promotion_lvl) 
    doCreatureChangeOutfit(cid, config.outfit) 
    doCombat(cid,combat,var) 
    return true 
end


Code:
 <instant name="Promotion/Outfit" words="exana hur" lvl="20" mana="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="sip.lua">
		<vocation id="1"/>
	</instant>
how do i change it that it needs 2 Shields/swords or whatever to cast?
 
Try this:
Code:
local combat = createCombatObject() 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLOOD) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) 

function onCastSpell(cid, var) 
    local config = { 
        promotion_lvl = 1, --standart promotion 
        outfit = {lookType=23, lookHead=124, lookAddons=1, lookLegs=45, lookBody=11, lookFeet=87} 
    } 
    if getPlayerItemCount(cid, xxxx) >= 2 then 
    	    doPlayerRemoveItem(cid, xxxx, 2)    
    	    doPlayerSetPromotionLevel(cid, config.promotion_lvl) 
            doCreatureChangeOutfit(cid, config.outfit) 
            doCombat(cid,combat,var)
    else
            doPlayerSendCancel(cid, "You need 2 items to cast this spell.")
    end
    return true 
end
 
Back
Top