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

Lua Manarune & Manafluid script - Old YurOT 0.94d Engine

Savl

New Member
Joined
Jul 9, 2022
Messages
3
Reaction score
1
Hello,
I want to edit a little bit script for manarune and manafluid on old engine (like in title).
I tried to check other threads, other forums and websites. I tried to make it by myself but nothing works heh.

Manarune:
So I want to change few things on this (but I don't know it's possible to make all below points or not on this engine):

  • Different vocation has diffferent mp. gain. For example: Knight = 200-500, Paladin = 800-1400, MS/Ed = 900-2000.
  • Give random amount mana like as above.
  • Use only on character. Currently you can use manarune sqm next to character and it give you mana.

Lua:
function onUse(cid, item, frompos, item2, topos)
local exhausted_seconds = 0,7
local exhausted_storagevalue = 1259
mag = getPlayerMagLevel(cid)
if mag >= 0 then
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
doSendMagicEffect(topos,1)
doPlayerSay(cid,"Harder Better Faster Stronger",16)
doPlayerAddMana(cid,"1000")
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You can only use this rune on creatures.")
end
end
return 1
end

Manafluid:

1. I just need to add exhaust on manafluid because currently players can spam it.
2. After use delete vial.

Lua:
-- fluids by atolon --
-- fluids fixed by Shampo --

   function onUse(cid, item, frompos, item2, topos)

local stages = {
    stage1 = {
        addmp=105,
        addhp=105,

    },
    stage2 = {
        addmp=160,
          addhp=160,

    },
    stage3 = {
        addmp=175,
addhp=160,

    },
    stage4 = {
        addmp=250,
addhp=160,

    }, 
    stage5 = {
        addmp=250,
addhp=160,

    },   
}
local level = getPlayerLevel(cid)
 
if level < 26 then
    stage = 'stage1'
elseif level < 76 then
    stage = 'stage2'
elseif level < 161 then
    stage = 'stage3'
elseif level < 201 then
    stage = 'stage4'
elseif level > 250 then
    stage = 'stage5'
else 
    stage = 'stage5'
end

local addmp = math.random(stages[stage].addmp, stages[stage].addmp)
local addhp = math.random(stages[stage].addhp, stages[stage].addhp)

       -- itemid means that is a creature
if frompos.x == 65535 then
    if item2.itemid == 1 then
           if item.type == 0 then
               doPlayerSendCancel(cid,"It is empty.")
           else
               if item2.uid == cid then
                   doChangeTypeItem(item.uid,0)
                   if item.type == 2 then
                       doPlayerSay(cid,"it was blood....",16)
                   elseif item.type == 4 then
                       doPlayerSay(cid,"Yuk! slime!!",16)
                                           doSendMagicEffect(topos,8)
                   elseif item.type == 3 then
                       doPlayerSay(cid,"hit! hit! fresh beer!!",16)
                   elseif item.type == 5 then
                       doPlayerSay(cid,"it was fresh lemonade!!",16)
                   elseif item.type == 11 then
                       doPlayerSay(cid,"arrgh is oil!!",16)
                   elseif item.type == 15 then
                       doPlayerSay(cid,"hit! hit! is wine",16)
                   elseif item.type == 6 then
                       doPlayerSay(cid,"oh!, yummy milk!",16)
--lifefluid
                   elseif item.type == 10 then
                       doPlayerAddHealth(cid,addhp)
                                           doSendMagicEffect(topos,12)
                if level < 26 then
                doPlayerSay(cid,"Aahhhhh!",16)
                
                elseif level < 76 then
                doPlayerSay(cid,"Drink The Powah!",16)

                elseif level < 161 then
                    doPlayerSay(cid,"Feel The Kick!",16)
                    
                elseif level < 201 then
                    doPlayerSay(cid,"Mananation!",16)
                    
                elseif level > 249 then
                doPlayerSay(cid,"Power Overhelming!!",16)
                
                elseif level < 250 then
                doPlayerSay(cid,"ohh!",16)
                end
--lifefluid
                   elseif item.type == 13 then
                       doPlayerSay(cid,"Eww.. urine!",16)
--Manafluid
                   elseif item.type == 7 then
                doPlayerAddMana(cid,addmp)
                doSendMagicEffect(topos,12)

                if level < 26 then
                doPlayerSay(cid,"Aahhhhh!",16)
                
                elseif level < 76 then
                doPlayerSay(cid,"Drink The Powah!",16)

                elseif level < 161 then
                    doPlayerSay(cid,"Feel The Kick!",16)
                    
                elseif level < 201 then
                    doPlayerSay(cid,"Mananation!",16)
                    
                elseif level > 249 then
                doPlayerSay(cid,"Power Overhelming!",16)
                
                elseif level < 250 then
                doPlayerSay(cid,"Power Overhelming!",16)
                end
                
                --mud
                   elseif item.type == 19 then
                       doPlayerSay(cid,"Arrgh its mud!",16)
                   elseif item.type == 26 then
                       doPlayerSay(cid,"HOT!",16)
                                           doSendMagicEffect(topos,6)
                   elseif item.type == 28 then
                       doPlayerSay(cid,"Argh, swamp water!",16)
                                           doSendMagicEffect(topos,8)
                   else
                       doPlayerSay(cid,"Gulp.",1)
                   end
               else
                   splash = doCreateItem(2025,item.type,topos)
                   doChangeTypeItem(item.uid,0)
                   doDecayItem(splash)
               end
           end
   --water--
       elseif (item2.itemid >= 490 and item2.itemid <= 493) or
           (item2.itemid >= 618 and item2.itemid <= 629) then
           doChangeTypeItem(item.uid,1)

   --mud--
       elseif item2.itemid == 103 then
           doChangeTypeItem(item.uid,19)
   --lava--
       elseif (item2.itemid >= 598 and item2.itemid < 712) or item2.itemid == 1509 then
           doChangeTypeItem(item.uid,26)
   --mud--
       elseif (item2.itemid >= 351 and item2.itemid <= 355) then
           doChangeTypeItem(item.uid,19)

   --swamp--
       elseif (item2.itemid >= 602 and item2.itemid <= 605) then
           doChangeTypeItem(item.uid,28)
   --cask--
       elseif item2.itemid == 1771 then
           doChangeTypeItem(item.uid,1)  --water--
       elseif item2.itemid == 1772 then
           doChangeTypeItem(item.uid,3)  --beer--
       elseif item2.itemid == 1773 then
           doChangeTypeItem(item.uid,15) --wine--

   --end cask--

   -- Blood/swamp in decayto corpse --NO FINISH--

       elseif item2.itemid > 3922 and item2.itemid < 4327 then
           doChangeTypeItem(item.uid,2)

   -- End Blood/swamp in decayto corpse --NO FINISH--

       else
           if item.type == 0 then
               doPlayerSendCancel(cid,"It is empty.")
           else
               splash = doCreateItem(2025,item.type,topos)
               doChangeTypeItem(item.uid,0)
               doDecayItem(splash)
           end
       end
else
doPlayerSendCancel(cid, "Put it inside your inventory first.")
return 1
end

       return 1
end
 
Back
Top