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

Mana And Health Orb

3li Xiber

Active Member
Joined
Dec 29, 2014
Messages
395
Reaction score
31
Hello Otlanders,
i need an orb script for differnt vocation which give hp or Mp
i will use 1 item to the 4 vocations but when i use it with Elite Knight it will give 500+hp
--- Elders , Ms 500+MP ---- Royal 200hp+300mp+
Using Tfs 0.3.6
 
open file actions.xml then put this line and u can change itemid

Code:
 <action itemid="5944" event="script" value="orb.lua"/>

then go there actions\scripts , make new file named orb.lua then put this script then save


Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   if isInArray({1, 5 , 2, 6}, getPlayerVocation(cid)) then  -- Sorcerer and Druid
   doCreatureSay(cid, "You have recieved extra Mana !", TALKTYPE_ORANGE_1)
   setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+500))

     elseif isInArray({3, 7}, getPlayerVocation(cid)) then   -- Paladin
         setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+200))
       setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+300))
         doCreatureSay(cid, "You have recieved extra Health and Mana !", TALKTYPE_ORANGE_1)
   
     elseif isInArray({4, 8}, getPlayerVocation(cid)) then  -- Knight
         setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+500))
         doCreatureSay(cid, "You have recieved extra Health !", TALKTYPE_ORANGE_1)
   end
   doSendMagicEffect(getCreaturePosition(cid), 29)
   doRemoveItem(item.uid, 1)
   doPlayerSave(cid, true)
return true
end
 
Last edited:
it works well but can u edit the script i need the player use it only 1 time because i can use it many times in same char
 
Code:
local EMPTY_STORAGE = 5562
function onUse(cid, item, fromPosition, itemEx, toPosition)

if (getPlayerStorageValue(cid, EMPTY_STORAGE)>= 1) then
 return doPlayerSendTextMessage(cid,16,"You have already recieved extra points.")
end

  if isInArray({1, 5 , 2, 6}, getPlayerVocation(cid)) then  -- Sorcerer and Druid
  doCreatureSay(cid, "You have recieved extra Mana !", TALKTYPE_ORANGE_1)
  setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+500))

  elseif isInArray({3, 7}, getPlayerVocation(cid)) then  -- Paladin
  setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+200))
  setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+300))
  doCreatureSay(cid, "You have recieved extra Health and Mana !", TALKTYPE_ORANGE_1)
 
  elseif isInArray({4, 8}, getPlayerVocation(cid)) then  -- Knight
  setCreatureMaxHealth(cid, (getCreatureMaxHealth(cid)+500))
  doCreatureSay(cid, "You have recieved extra Health !", TALKTYPE_ORANGE_1)
 end
  doSendMagicEffect(getCreaturePosition(cid), 29)
  doRemoveItem(item.uid, 1)
  doCreatureSetStorage(cid, EMPTY_STORAGE, 1)
  doPlayerSave(cid, true)
return true
end
 
Back
Top