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

Transform amuelt?? Rep+ for help :)

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
Hello Otlanders! I wounder if someone can help me to fix a "transform amulet"

When you wear the amulet id: [xxxx], you will transform to a demon, get some faster speed and it will give you 50% protection for fire. And when you put the amulet away, you will get back your old oufit. Rep++ for helping.

Thanks!
 
something?
Code:
local x = {
  outfit = 35 -- Outfit
  stat = 83645 -- Storage Value
  inmunity = fire -- Inmunity
}

local change = createConditionObject(CONDITION_OUTFIT)
addOutfitCondition(change, {lookType = x.outfit, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
setConditionParam(change, CONDITION_PARAM_TICKS, -1)

function onEquip(cid, item, slot)
if getPlayerStorageValue(cid, x.stat) ~= 1 then
  doAddCondition(cid, change)
  addEvent(doSetItemProtection(uid, x.inmunity))
  setPlayerStorageValue(cid, x.stat, 1)
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
end
return true
end

function onDeEquip(cid, item, slot)
  doRemoveCondition(cid, CONDITION_OUTFIT)
  doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)   
  stopEvent(doSetItemProtection(uid, x.inmunity))
  setPlayerStorageValue(cid, x.stat, -1)   
return
end
 
Back
Top