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

Outfit bonusses

How come you are running a "successful" server with no knowledge? I found around 10 scripts in 1 second searching. Try to search for all your problems :o
 
This is just a small example ( made from 0.3.6 i don't really know if it works with 0.4 but you can try )
LUA:
local outfits = {
	[21]  = {addSpeed = 15, maxHp = 25, maxMp = 25}, -- Rat
	[302] = {addSpeed = 250, maxHp = 50, maxMp = 50} -- God
-- speed is relative and will add exact amount of speed
-- the Hp and Mp (health - mana) will add Percent! ( % )
}

function onOutfit(cid,old,current)
	doChangeSpeed(cid, (getCreatureSpeed(cid) + outfits[current].addSpeed))
	setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid) + (getCreatureMaxHealth(cid)/100 * outfits[current].maxHp)))
	setCreatureMaxMana(cid, (getCreatureMaxMana(cid) + (getCreatureMaxMana(cid)/100 * outfits[current].maxMp)))
	return true
end

(This is a CreatureScript ofc if you didn't already know..)
Set the [21] to whatever you want and ofc you can add how many you want! ( the outfit ID )

You must register it in login.lua Example:
LUA:
registerCreatureEvent(cid, "OutfitBonus")

And it must have the same name as in creaturescripts.xml:

Code:
<event type="outfit" name="OutfitBonus" event="script" value="outfitbonus.lua"/>

[[Example is made with script name OutfitBonus and the lua file being named outfitbonus.lua -- Better explane it..]]
 
Back
Top