• 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 Change Gold.

Oskar1121

Excellent OT User
Joined
Jul 15, 2009
Messages
634
Reaction score
537
Location
Poland
You lost 110% gold coins and 110 mana on one platinum coin and 110% platinum coins and 220 mana for crystal coin.
Good for RPG servers:
PHP:
local items = {2148,2152,2160}

function onCastSpell(cid, var)
local ile = {}
for k, v in pairs(items) do
    table.insert(ile, getPlayerItemCount(cid, v))
end
for i = 1, #items do
    count = getPlayerItemCount(cid, items[i])
    if count == math.max(unpack(ile)) and count ~= 0 then
        rep = true
        item, item_1 = items[i], items[i+1]
    end
end
if item == 2148 then
    mana = 1
elseif item == 2152 then
    mana = 2
end
    if rep == true then
        local minCount = 1
        if getCreatureMana(cid) >= minCount * 110 * mana then
            if math.max(unpack(ile)) >= minCount * 110 then
                local count_1 = getPlayerItemCount(cid, item_1)
                doPlayerRemoveItem(cid, item, minCount * 110)
                doPlayerRemoveItem(cid, item_1, count_1)
                doPlayerAddItem(cid, item_1, minCount + count_1)
                doPlayerAddSpentMana(cid, minCount * 110 * mana)
                doCreatureAddMana(cid, -minCount * 110 * mana, false)
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
                return true
            else
                doPlayerSendCancel(cid, "You need more than 110 "..getItemNameById(item).."s.")
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
                return false
            end
        else
            doPlayerSendCancel(cid, "You don't have enough mana.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
            return false
        end
    else
        doPlayerSendCancel(cid, "You need more than 110 gold/platinum coins.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        return false
    end
return true
end
PHP:
<instant name="Change Money" words="chenge" lvl="25" mana="0" selftarget="1" exhaustion="2000" event="script" value="test.lua"/>
 
You lose 110 gold coin and 110 mana points on one platinum coin or/and 110 platinum coin with 220 mana points on crystal coin. Good on RPG servers.
 
It will be better than change 100cc to 1 gn by click on item, but if the spells will make the same thing like normal change money. But however someone like 1st method and someone else will get spell change gold.
My theory:
Make a spells called something like a " give me plate coins " , " give me crystal coins " or even ( exevo plate plate or exevo crystal crystal ) and more depends of how many money currency you will have on youtr server.
Obviously get charge of that spells. I think it can take of you 200 mp and it will be alrite for evry1, but always you can change amount.

Maybe sum1 will get my idea and make something like that.
 
Back
Top