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

Fixing a 2 scripts (addon bonus system and Teleport item)

gyahu

New Member
Joined
Nov 28, 2010
Messages
54
Reaction score
2
My "problem" is that there is an awesome system that makes the user of an outfit (with addons) (for example) 3 axe skills better. But, the thing is. i don't want a knight who has 2 more magic level because he's wearing an outfit ¬¬so i tried to fix it:

The original:
Lua:
local hunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hunter, CONDITION_PARAM_TICKS, -1)
setConditionParam(hunter, CONDITION_PARAM_SKILL_DISTANCE, 3)
 
local knight = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(knight, CONDITION_PARAM_TICKS, -1)
setConditionParam(knight, CONDITION_PARAM_SKILL_SWORD, 3)
 
local mage = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mage, CONDITION_PARAM_TICKS, -1)
setConditionParam(mage, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
 
local barbarian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(barbarian, CONDITION_PARAM_TICKS, -1)
setConditionParam(barbarian, CONDITION_PARAM_SKILL_AXE, 3)
 
local norse = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 2)
 
local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 3)
 
local speed1 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed1, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed1, CONDITION_PARAM_SPEED, 10)
 
local speed2 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed2, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed2, CONDITION_PARAM_SPEED, 20)
 
outfitBonusTable = { --- [] = {condition = , maxHealth = , maxMana = }
        [128] = {maxHealth = 50, condition = speed1, typ = CONDITION_HASTE}, [136] = {maxHealth = 50, condition = speed1, typ = CONDITION_HASTE}, --Citizen
        [129] = {condition = hunter}, [137] = {condition = hunter}, --Hunter
        [130] = {maxMana = 100}, [138] = {maxMana = 100}, --Mage
        [131] = {condition = knight}, [139] = {condition = knight}, --Knight
        [133] = {maxMana = 75}, [141] = {maxMana = 75}, --Summoner
        [134] = {condition = knight}, [142] = {condition = knight}, --Warrior
        [143] = {condition = barbarian}, [147] = {condition = barbarian}, --Barbarian
        [144] = {condition = mage}, [148] = {condition = mage}, --Druid
        [145] = {maxHealth = 75, maxMana = 75}, [149] = {maxHealth = 75, maxMana = 75}, --Wizard
        [146] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, [150] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, --Oriental
        [152] = {condition = speed2, typ = CONDITION_HASTE}, [156] = {condition = speed2, typ = CONDITION_HASTE}, --Assassin
        [154] = {condition = mage}, [158] = {condition = mage}, --Shaman
        [251] = {condition = norse, maxHealth = 100}, [252] = {condition = norse, maxHealth = 100}, --Norse
        [268] = {condition = nightmare, maxHealth = 75}, [269] = {condition = nightmare, maxHealth = 75}, --Nightmare
        [270] = {maxHealth = 75, maxMana = 75, condition = speed1, typ = CONDITION_HASTE}, [273] = {maxHealth = 75, maxMana = 75, condition = speed1, typ = CONDITION_HASTE}, --Jester
        [278] = {maxHealth = 100}, [279] = {maxHealth = 100}, --Brotherhood
        [288] = {maxHealth = 200, maxMana = 200, condition = speed2, typ = CONDITION_HASTE}, [289] = {maxHealth = 200, maxMana = 000, condition = speed2, typ = CONDITION_HASTE}, --Demonhunter
        [324] = {condition = mage, maxHealth = 100, maxMana = 100}, [325] = {condition = mage, maxHealth = 100, maxMana = 100} --Yalaharian
}
 
function onLogin(cid)
        registerCreatureEvent(cid, "Addons")
        local oldOutfit = getCreatureOutfit(cid)
 
        if (oldOutfit.lookAddons ~= 3) or (outfitBonusTable[oldOutfit.lookType] == nil) or ((outfitBonusTable[oldOutfit.lookType]).condition == nil) then
                return true
        end
        doAddCondition(cid, (outfitBonusTable[oldOutfit.lookType]).condition)
        return true
end
 
function onOutfit(cid, old, current)
        if old.lookAddons == 3 and outfitBonusTable[old.lookType] then --Bonus off
                if (outfitBonusTable[old.lookType]).maxHealth ~= nil then
                        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) -(outfitBonusTable[old.lookType]).maxHealth)
                        doCreatureAddHealth(cid, -(outfitBonusTable[old.lookType]).maxHealth)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                end
                if (outfitBonusTable[old.lookType]).maxMana ~= nil then
                        setCreatureMaxMana(cid, getCreatureMaxMana(cid) -(outfitBonusTable[old.lookType]).maxMana)
                        doCreatureAddMana(cid, -(outfitBonusTable[old.lookType]).maxMana)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                end
                if (outfitBonusTable[old.lookType]).condition ~= nil then
                                        (outfitBonusTable[old.lookType]).typ = ( (outfitBonusTable[old.lookType]).typ == nil) and CONDITION_ATTRIBUTES or (outfitBonusTable[old.lookType]).typ
                                        doRemoveCondition(cid, (outfitBonusTable[old.lookType]).typ)
                end
        end
        if current.lookAddons == 3 and outfitBonusTable[current.lookType] then --Bonus on
                if (outfitBonusTable[current.lookType]).maxHealth ~= nil then
                        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) +(outfitBonusTable[current.lookType]).maxHealth)
                        doCreatureAddHealth(cid, (outfitBonusTable[current.lookType]).maxHealth)
                end
                if (outfitBonusTable[current.lookType]).maxMana ~= nil then
                        setCreatureMaxMana(cid, getCreatureMaxMana(cid) +(outfitBonusTable[current.lookType]).maxMana)
                        doCreatureAddMana(cid, (outfitBonusTable[current.lookType]).maxMana)
                end
                if (outfitBonusTable[current.lookType]).condition ~= nil then
                        doAddCondition(cid, (outfitBonusTable[current.lookType]).condition)
                end
        end
        return true
end

The one with my changes:
local hunter = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(hunter, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isPaladin(pid) then
setConditionParam(hunter, CONDITION_PARAM_SKILL_DISTANCE, 3)
 
local knight = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(knight, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isKnight(pid) then
setConditionParam(knight, CONDITION_PARAM_SKILL_SWORD, 3)
 
local mage = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(mage, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isDruid(pid) then
		elseif isSorcerer(pid) then
setConditionParam(mage, CONDITION_PARAM_STAT_MAGICLEVEL, 1)
 
local barbarian = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(barbarian, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isKnight(pid) then
setConditionParam(barbarian, CONDITION_PARAM_SKILL_AXE, 3)
 
local norse = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isKnight(pid) then
		elseif isPaladin(pid) then
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 2)
 
local nightmare = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(norse, CONDITION_PARAM_TICKS, -1)
	getPlayerVocation
		elseif isKnight(pid) then
setConditionParam(norse, CONDITION_PARAM_SKILL_SHIELD, 3)
 
local speed1 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed1, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed1, CONDITION_PARAM_SPEED, 10)
 
local speed2 = createConditionObject(CONDITION_HASTE)
setConditionParam(speed2, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed2, CONDITION_PARAM_SPEED, 20)
 
outfitBonusTable = { --- [] = {condition = , maxHealth = , maxMana = }
        [128] = {maxHealth = 50, condition = speed1, typ = CONDITION_HASTE}, [136] = {maxHealth = 50, condition = speed1, typ = CONDITION_HASTE}, --Citizen
        [129] = {condition = hunter}, [137] = {condition = hunter}, --Hunter
        [130] = {maxMana = 100}, [138] = {maxMana = 100}, --Mage
        [131] = {condition = knight}, [139] = {condition = knight}, --Knight
        [133] = {maxMana = 75}, [141] = {maxMana = 75}, --Summoner
        [134] = {condition = knight}, [142] = {condition = knight}, --Warrior
        [143] = {condition = barbarian}, [147] = {condition = barbarian}, --Barbarian
        [144] = {condition = mage}, [148] = {condition = mage}, --Druid
        [145] = {maxHealth = 75, maxMana = 75}, [149] = {maxHealth = 75, maxMana = 75}, --Wizard
        [146] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, [150] = {maxHealth = 100, maxMana = 100, condition = speed1, typ = CONDITION_HASTE}, --Oriental
        [152] = {condition = speed2, typ = CONDITION_HASTE}, [156] = {condition = speed2, typ = CONDITION_HASTE}, --Assassin
        [154] = {condition = mage}, [158] = {condition = mage}, --Shaman
        [251] = {condition = norse, maxHealth = 100}, [252] = {condition = norse, maxHealth = 100}, --Norse
        [268] = {condition = nightmare, maxHealth = 75}, [269] = {condition = nightmare, maxHealth = 75}, --Nightmare
        [270] = {maxHealth = 75, maxMana = 75, condition = speed1, typ = CONDITION_HASTE}, [273] = {maxHealth = 75, maxMana = 75, condition = speed1, typ = CONDITION_HASTE}, --Jester
        [278] = {maxHealth = 100}, [279] = {maxHealth = 100}, --Brotherhood
        [288] = {maxHealth = 200, maxMana = 200, condition = speed2, typ = CONDITION_HASTE}, [289] = {maxHealth = 200, maxMana = 000, condition = speed2, typ = CONDITION_HASTE}, --Demonhunter
        [324] = {condition = mage, maxHealth = 100, maxMana = 100}, [325] = {condition = mage, maxHealth = 100, maxMana = 100} --Yalaharian
}
 
function onLogin(cid)
        registerCreatureEvent(cid, "Addons")
        local oldOutfit = getCreatureOutfit(cid)
 
        if (oldOutfit.lookAddons ~= 3) or (outfitBonusTable[oldOutfit.lookType] == nil) or ((outfitBonusTable[oldOutfit.lookType]).condition == nil) then
                return true
        end
        doAddCondition(cid, (outfitBonusTable[oldOutfit.lookType]).condition)
        return true
end
 
function onOutfit(cid, old, current)
        if old.lookAddons == 3 and outfitBonusTable[old.lookType] then --Bonus off
                if (outfitBonusTable[old.lookType]).maxHealth ~= nil then
                        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) -(outfitBonusTable[old.lookType]).maxHealth)
                        doCreatureAddHealth(cid, -(outfitBonusTable[old.lookType]).maxHealth)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                end
                if (outfitBonusTable[old.lookType]).maxMana ~= nil then
                        setCreatureMaxMana(cid, getCreatureMaxMana(cid) -(outfitBonusTable[old.lookType]).maxMana)
                        doCreatureAddMana(cid, -(outfitBonusTable[old.lookType]).maxMana)
                                                doRemoveCondition(cid, CONDITION_INFIGHT)
                end
                if (outfitBonusTable[old.lookType]).condition ~= nil then
                                        (outfitBonusTable[old.lookType]).typ = ( (outfitBonusTable[old.lookType]).typ == nil) and CONDITION_ATTRIBUTES or (outfitBonusTable[old.lookType]).typ
                                        doRemoveCondition(cid, (outfitBonusTable[old.lookType]).typ)
                end
        end
        if current.lookAddons == 3 and outfitBonusTable[current.lookType] then --Bonus on
                if (outfitBonusTable[current.lookType]).maxHealth ~= nil then
                        setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) +(outfitBonusTable[current.lookType]).maxHealth)
                        doCreatureAddHealth(cid, (outfitBonusTable[current.lookType]).maxHealth)
                end
                if (outfitBonusTable[current.lookType]).maxMana ~= nil then
                        setCreatureMaxMana(cid, getCreatureMaxMana(cid) +(outfitBonusTable[current.lookType]).maxMana)
                        doCreatureAddMana(cid, (outfitBonusTable[current.lookType]).maxMana)
                end
                if (outfitBonusTable[current.lookType]).condition ~= nil then
                        doAddCondition(cid, (outfitBonusTable[current.lookType]).condition)
                end
        end
        return true
end
But with my configurations it doesn't work. Could someone help me with that?? Please

My other problem:
I found this teleport item (nothing special) but, even when you're fighting, if you use it it teleports you. I want one that if you use it in battle (fighting or skull) it won't work.

The script:
Lua:
function onUse(cid, item, frompos, item2, topos)
local RemoveOnUse = "yes"
local teleport = {x=1028, y=1020, z=7}
local level = getPlayerLevel(cid)
if(isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then  -- vocation id
if level >= 100 then
doTeleportThing(cid,teleport)
doSendMagicEffect(topos,12)
doPlayerSendTextMessage(cid,22,"VIP Zone.")
if (RemoveOnUse == "no") then  
doRemoveItem(item.uid, 1) 
end 
else
doPlayerSendCancel(cid,"You need level 100.")
end
else
doPlayerSendCancel(cid,"Only Vip Promotion can use this amulet.")
end
return TRUE
end
Please help me with the scripts :D
Thanks



PS: Yes, I will give +rep.
 
Last edited by a moderator:
use tags :/
last one
Lua:
local RemoveOnUse = 'yes'
local teleport = {x=1028, y=1020, z=7}
local vocation = {9,10,11,12}
local level = 100

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(vocation, getPlayerVocation(cid))) then  -- vocation id
		return doPlayerSendCancel(cid, 'Only VIP promoted vocation players can use this amulet.')
	end
	
	if getPlayerLevel(cid) < level then
		return doPlayerSendCancel(cid, 'You need to be from level '..level..' onwards in order to use this amulet.')
	end
	
	doTeleportThing(cid, teleport)
	doSendMagicEffect(teleport, CONST_ME_MAGIC_BLUE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'VIP Zone.')
	if getBooleanFromString(RemoveOnUse) then  
		doRemoveItem(item.uid, 1) 
	end 
	return true
end
 
Last edited:
It didn't work :S
Could you help me also qith the other one :/
Thanks. :D

What do you mean with tags??
i know very little about scripting :/
 
Last edited:
Added the line where you cannot use the amulet when you're PZ locked. Not sure if it'll work because I was unsure of how to place it in.

Lua:
local RemoveOnUse = 'yes'
local teleport = {x=1028, y=1020, z=7}
local vocation = {9,10,11,12}
local level = 100
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(vocation, getPlayerVocation(cid))) then -- vocation id
		return doPlayerSendCancel(cid, 'Only VIP promoted vocation players can use this amulet.')
	end
        if (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
         return doPlayerSendCancel(cid, 'You can\'t use this amulet while in a fight.')
 
	if getPlayerLevel(cid) < level then
		return doPlayerSendCancel(cid, 'You need to be from level '..level..' onwards in order to use this amulet.')
	end
 
	doTeleportThing(cid, teleport)
	doSendMagicEffect(teleport, CONST_ME_MAGIC_BLUE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'VIP Zone.')
	if getBooleanFromString(RemoveOnUse) then  
		doRemoveItem(item.uid, 1) 
	end 
	return true
end




Gyahu, put this into your outfits.xml it'll do the same bonuses up there and is a lot easier to configure.
XML:
<?xml version="1.0"?>
<outfits>
    <outfit id="1">
        <list gender="0" lookType="136" name="Citizen">
        <attribute speed="5"/>
        <stats maxHealth="100"/>
            </list>
        <list gender="1" lookType="128" name="Citizen">
        <attribute speed="5"/>
        <stats maxHealth="100"/>
            </list>
    </outfit>
 
    <outfit id="2">
        <list gender="0" lookType="137" name="Hunter">
        <skills dist="3"/>
        </list>
        <list gender="1" lookType="129" name="Hunter">
        <skills dist="3"/>
        </list>
    </outfit>
 
    <outfit id="3">
        <list gender="0" lookType="138" name="Mage">
        <stats magLevel="2"/>
        <stats maxMana="200"/>
        </list>
        <list gender="1" lookType="130" name="Mage">
        <stats magLevel="2"/>
        <stats maxMana="200"/>
        </list>
    </outfit>
 
    <outfit id="4">
        <list gender="0" lookType="139" name="Knight">
        <skills sword="3"/>
        </list>
        <list gender="1" lookType="131" name="Knight">
        <skills sword="3"/>
        </list>
    </outfit>
 
    <outfit id="5" premium="yes">
        <list gender="0" lookType="140" name="Noblewoman">
        <skills club="3"/>
        </list>
        <list gender="1" lookType="132" name="Nobleman">
        <skills club="3"/>
        </list>
    </outfit>
 
    <outfit id="6" premium="yes">
        <list gender="0" lookType="141" name="Summoner">
        <stats magLevel="2"/>
        <stats maxMana="100"/>
        </list>
        <list gender="1" lookType="133" name="Summoner">
        <stats magLevel="2"/>
        <stats maxMana="100"/>
        </list>
    </outfit>
 
    <outfit id="7" premium="yes">
        <list gender="0" lookType="142" name="Warrior">
        <skills sword="3"/>
        </list>
        <list gender="1" lookType="134" name="Warrior">
        <skills sword="3"/>
        </list>
    </outfit>
 
    <outfit id="8" premium="yes">
        <list gender="0" lookType="147" name="Barbarian">
        <skills axe="3"/>
        </list>
        <list gender="1" lookType="143" name="Barbarian">
        <skills axe="3"/>
        </list>
    </outfit>
 
    <outfit id="9" premium="yes">
        <list gender="0" lookType="148" name="Druid">
        <stats magLevel="2"/>
        </list>
        <list gender="1" lookType="144" name="Druid">
        <stats magLevel="2"/>
        </list>
    </outfit>
 
    <outfit id="10" premium="yes">
        <list gender="0" lookType="149" name="Wizard">
        <stats magLevel="1"/>
        <stats maxMana="100"/>
        </list>
        <list gender="1" lookType="145" name="Wizard">
        <stats magLevel="1"/>
        <stats maxMana="100"/>
        </list>
    </outfit>
 
    <outfit id="11" premium="yes">
        <list gender="0" lookType="150" name="Oriental">
        <attribute speed="5"/>
        <stats maxHealth="200"/>
        <stats maxMana="200"/>
            </list>
        <list gender="1" lookType="146" name="Oriental">
        <attribute speed="5"/>
        <stats maxHealth="200"/>
        <stats maxMana="200"/>
            </list>
    </outfit>
 
    <outfit id="12" premium="yes">
        <list gender="0" lookType="155" name="Pirate">
        <stats maxHealth="100"/>
        <skills club="3"/>
        </list>
        <list gender="1" lookType="151" name="Pirate">
        <stats maxHealth="100"/>
        <skills club="3"/>
        </list>
    </outfit>
 
    <outfit id="13" premium="yes" >
        <list gender="0" lookType="156" name="Assassin">
        <attribute speed="5"/>
        <skills dist="2"/>
            </list>
        <list gender="1" lookType="152" name="Assassin">
        <attribute speed="5"/>
        <skills dist="2"/>
            </list>
    </outfit>
 
    <outfit id="14" premium="yes" >
        <list gender="0" lookType="157" name="Beggar">
        <stats maxHealth="200"/>
        </list>
        <list gender="1" lookType="153" name="Beggar">
        <stats maxHealth="200"/>
        </list>
    </outfit>
 
    <outfit id="15" premium="yes" >
        <list gender="0" lookType="158" name="Shaman">
        <stats magLevel="2"/>
        </list>
        <list gender="1" lookType="154" name="Shaman">
        <stats magLevel="2"/>
        </list>
    </outfit>
 
    <outfit id="16" premium="yes" >
        <list gender="0" lookType="252" name="Norsewoman">
        <skills shielding="2"/>
        <stats maxHealth="200"/>
        </list>
        <list gender="1" lookType="251" name="Norseman">
        <skills shielding="2"/>
        <stats maxHealth="200"/>
        </list>
    </outfit>
 
    <outfit id="17" premium="yes" >
        <list gender="0" lookType="269" name="Nightmare">
        <skills shielding="3"/>
        </list>
        <list gender="1" lookType="268" name="Nightmare">
        <skills shielding="3"/>
        </list>
    </outfit>
 
    <outfit id="18" premium="yes">
        <list gender="0" lookType="270" name="Jester">
        <stats maxMana="100"/>
        <attribute speed="5"/>
        <stats maxHealth="100"/>
        </list>
        <list gender="1" lookType="273" name="Jester">
        <stats maxMana="100"/>
        <attribute speed="5"/>
        <stats maxHealth="100"/>
        </list>
    </outfit>
 
    <outfit id="19" premium="yes">
        <list gender="0" lookType="279" name="Brotherhood">
        <stats magLevel="2"/>
        <stats maxHealth="100"/>
        </list>
        <list gender="1" lookType="278" name="Brotherhood">
        <stats magLevel="2"/>
        <stats maxHealth="100"/>
        </list>
    </outfit>
 
    <outfit id="20" premium="yes" >
        <list gender="0" lookType="288" name="Demonhunter">
        <attribute speed="10"/>
        <stats maxHealth="200"/>
        </list>
        <list gender="1" lookType="289" name="Demonhunter">
        <attribute speed="10"/>
        <stats maxHealth="200"/>
        </list>
    </outfit>
 
    <outfit id="21" premium="yes" >
        <list gender="0" lookType="324" name="Yalaharian">
        <attribute speed="5"/>
        <stats magLevel="2"/>
        </list>
        <list gender="1" lookType="325" name="Yalaharian">
        <attribute speed="5"/>
        <stats magLevel="2"/>
        </list>
    </outfit>
 
    <outfit id="22" premium="yes">
        <list gender="0" lookType="336" name="Warmaster">
        <stats maxMana="100"/>
        <attribute speed="15"/>
        <stats maxHealth="100"/>
        <stats magLevel="2"/>
        </list>
        <list gender="1" lookType="335" name="Warmaster">
        <stats maxMana="100"/>
        <attribute speed="15"/>
        <stats maxHealth="100"/>
        <stats magLevel="2"/>
        </list>
    </outfit>
 
    <outfit id="25" access="5" premium="yes">
        <list gender="0-3" lookType="12" name="Archdemon"/>
    </outfit>
 
    <outfit id="26" access="5" premium="yes">
        <list gender="0-3" lookType="159" name="Elf"/>
    </outfit>
 
    <outfit id="27" access="5" premium="yes">
        <list gender="0-3" lookType="160" name="Dwarf"/>
    </outfit>
 
    <outfit id="28" access="5" premium="yes">
        <list gender="0-3" lookType="226" name="Frog"/>
    </outfit>
 
    <outfit id="29" access="5" premium="yes">
        <list gender="0-3" lookType="194" name="Cult"/>
    </outfit>
 
    <outfit id="30" access="5" premium="yes">
        <list gender="0-3" lookType="253" name="Headsplitter"/>
    </outfit>
 
    <outfit id="31" access="5" premium="yes">
        <list gender="0-3" lookType="254" name="Skullhunter"/>
    </outfit>
 
    <outfit id="32" access="5" premium="yes">
        <list gender="0-3" lookType="255" name="Bloodwalker"/>
    </outfit>
 
    <outfit id="33" access="5" premium="yes">
        <list gender="0-3" lookType="264" name="Brutetamer"/>
    </outfit>
 
    <outfit id="34" access="3" premium="yes">
        <list gender="0-3" lookType="75" name="Gamemaster"/>
    </outfit>
 
    <outfit id="35" access="4" premium="yes">
        <list gender="0-3" lookType="266" name="Community Manager"/>
    </outfit>
 
    <outfit id="36" access="5" premium="yes">
        <list gender="0-3" lookType="302" name="God"/>
    </outfit>
</outfits>

You can use these to also edit it.
examlple:
XML:
    <outfit id="21" premium="yes" >
        <list gender="0" lookType="324" name="Yalaharian">
        <attribute speed="5"/> -- speed +5, which is barely anything in my opinion.
        <stats magLevel="2"/> -- magic level +2
        </list>
        <list gender="1" lookType="325" name="Yalaharian">
        <reflect chanceAll="10"\> -- this will give it protection to everything +10%
        </list>
Just basically replace what you want.
Code:
manaShield
invisible
healthGain/healthTicks
manaGain/manaTicks
speed
--------------
reflect percentAll
reflect percentElements
reflect percentMagic
reflect percentEnergy
reflect percentFire
reflect percentPoison
reflect percentIce
reflect percentHoly
reflect percentDeath
reflect percentLifeDrain
reflect percentManaDrain
reflect percentDrown
reflect percentPhysical
reflect percentHealing
reflect percentUndefined
reflect chanceAll
reflect chanceElements
reflect chanceMagic
reflect chanceEnergy
reflect chancetFire
reflect chancePoison
reflect chanceIce
reflect chanceHoly
reflect chanceDeath
reflect chanceLifeDrain
reflect chanceManaDrain
reflect chanceDrown
reflect chancePhysical
reflect chanceHealing
reflect chanceUndefined
--------------
absorb percentAll
absorb percentElements
absorb percentMagic
absorb percentEnergy
absorb percentFire
absorb percentPoison
absorb percentIce
absorb percentHoly
absorb percentDeath
absorb percentLifeDrain
absorb percentManaDrain
absorb percentDrown
absorb percentPhysical
absorb percentHealing
absorb percentUndefined
--------------
skills fist
skills club
skills axe
skills sword
skills distance
skills shielding
skills fishing
skills melee (fist, club, sword y axe)
skills weapon (club, sword, axe, dist)
skills fistPercent
skills clubPercent
skills axePercent
skills swordPercent
skills distancePercent
skills shieldingPercent
skills fishingPercent
skills meleePercent (fist, club, sword y axe)
skills weaponPercent (club, sword, axe, dist)
--------------
stats maxHealth
stats maxMana
stats soul
stats level
stats magLevel
stats maxHealthPercent
stats maxManaPercent
stats soulPercent
stats levelPercent
stats magLevelPercent
--------------
supress poison
supress fire
supress energy
supress physical
supress haste
supress paralyze
supress invisible
supress light
supress manaShield
supress drunk
supress drown
supress muted
 
Last edited:
Added the line where you cannot use the amulet when you're PZ locked. Not sure if it'll work because I was unsure of how to place it in.

Lua:
local RemoveOnUse = 'yes'
local teleport = {x=1028, y=1020, z=7}
local vocation = {9,10,11,12}
local level = 100
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(vocation, getPlayerVocation(cid))) then -- vocation id
		return doPlayerSendCancel(cid, 'Only VIP promoted vocation players can use this amulet.')
	end
        if (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
         return doPlayerSendCancel(cid, 'You can\'t use this amulet while in a fight.')
 
	if getPlayerLevel(cid) < level then
		return doPlayerSendCancel(cid, 'You need to be from level '..level..' onwards in order to use this amulet.')
	end
 
	doTeleportThing(cid, teleport)
	doSendMagicEffect(teleport, CONST_ME_MAGIC_BLUE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'VIP Zone.')
	if getBooleanFromString(RemoveOnUse) then  
		doRemoveItem(item.uid, 1) 
	end 
	return true
end
This will not work, use this:

Lua:
local RemoveOnUse = 'yes'
local teleport = {x=1028, y=1020, z=7}
local vocation = {9,10,11,12}
local level = 100
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(vocation, getPlayerVocation(cid))) then -- vocation id
		return doPlayerSendCancel(cid, 'Only VIP promoted vocation players can use this amulet.')
	end
        if getCreatureCondition(cid, CONDITION_INFIGHT) then
                return doPlayerSendCancel(cid, 'You can\'t use this amulet while in a fight.')
        end
 
	if getPlayerLevel(cid) < level then
		return doPlayerSendCancel(cid, 'You need to be from level '..level..' onwards in order to use this amulet.')
	end
 
	doTeleportThing(cid, teleport)
	doSendMagicEffect(teleport, CONST_ME_MAGIC_BLUE)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'VIP Zone.')
	if getBooleanFromString(RemoveOnUse) then  
		doRemoveItem(item.uid, 1) 
	end 
	return true
end
 
Thanks a lot guys, really. But i need a script where you get conditions because of the outfit, but you also have to have a certain vocation :/
 
Last edited:
Back
Top