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

Linux How to make :O

Lbtg

Intermediate OT User
Joined
Nov 22, 2008
Messages
2,297
Reaction score
127
Hey guys , is it possible to make that spell takes HEALTH not mana for casting it ? :) is it possible if so how ? :)
 
Well, I mean you could just set the mana to 0 then in the script onCast remove the amount of health you want to remove, there's your hint
 
gimme hints please been working and researcing for hours nothing i can rely on
easier to learn if you dont ask for things every 20 minutes
if you learn you make things yourself
people dont want to make your whole server for you
just saying
 
i cant learn if no one even hint me , aswell been sitting on otland past 7 years its not going good for me with scripting... what can ido ? kill myself...
im working not for myself only i working on something realy great in my eyes and in 5-10 years you will see. anywya thanks for this motivation... realy motivating
 
Your hint.
Code:
function onCast(cid, target)
   if getHealth(cid) > x then
       return false
   end
   removeHealth(cid)
   -- do stuff
   return true
end
 
Code:
local health_needed = 100
function onCast(cid, variant)
      if getPlayerhealth(cid) < health_needed then
             doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
             return doPlayerSendCancelMessage(cid, "You need more health to cast this spell!")
      end
      doPlayerRemoveHealth(cid, health_needed)
return doCombatExecute(cid, variant)
end

Even bigger hint.
 
I recommend to return false instead of true(doPlayerSendCancelMessage will return true i think) when the player don't have the needed hp. Returning false is good because maybe tfs will add cooldowns to player or something else if return true(success in casting the spell).
 
Code:
local health_needed = 100
function onCast(cid, variant)
      if getPlayerhealth(cid) < health_needed then
             doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
             return doPlayerSendCancelMessage(cid, "You need more health to cast this spell!")
      end
      doPlayerRemoveHealth(cid, health_needed)
return doCombatExecute(cid, variant)
end

Even bigger hint.
Code:
local health_needed = 100
function onCast(cid, variant)
    if doPlayerRemoveHealth(cid, health_needed) then
        return doCombatExecute(cid, variant)
    end
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return doPlayerSendCancelMessage(cid, "You need more health to cast this spell!")
end
 
local health_needed = 100 function onCast(cid, variant) if doPlayerRemoveHealth(cid, health_needed) then return doCombatExecute(cid, variant) end doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return doPlayerSendCancelMessage(cid, "You need more health to cast this spell!") end

Code:
function onCast(cid, variant)
   if doPlayerRemoveHealth(cid, 100) then return doCombatExecute(cid, variant) end
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return doPlayerSendCancelMessage(cid, "You need more health to cast this spell!")
end

See I can make useless changes too :>

Plus, your code will kill the player mine wont.
 
so much attention thanks :) will try them , well i need that spell cost 5 health to cast, if player has 4health hes unable to cast spell.and gets message of low health to cast spell'.
 
i cant learn if no one even hint me , aswell been sitting on otland past 7 years its not going good for me with scripting... what can ido ? kill myself...
im working not for myself only i working on something realy great in my eyes and in 5-10 years you will see. anywya thanks for this motivation... realy motivating
Man you're amazing at coming up with excuses, I'll give you that. 7 years... honestly I believe that you're simply too lazy.
If I, just as many others on this forum can start from knowing nothing to becoming employed programmers/scripters just by learning through making ot projects (without any guidance) then sorry, I can't sympathize with your BS. Stop leeching, start learning & contribute something back to the community after you've been given so much for FREE. No more excuses seriously, stop thinking about only yourself and your project.
 
Man you're amazing at coming up with excuses, I'll give you that. 7 years... honestly I believe that you're simply too lazy.
If I, just as many others on this forum can start from knowing nothing to becoming employed programmers/scripters just by learning through making ot projects (without any guidance) then sorry, I can't sympathize with your BS. Stop leeching, start learning & contribute something back to the community after you've been given so much for FREE. No more excuses seriously, stop thinking about only yourself and your project.
https://vvvulcan.s-ul.eu/Q4cq9xnW
10 pages worth of threads with "hints"
itll be 8 years for him in 1 month :^)
 
you guys are pathetic you see people from your perspective. thats pathetic im sorry for you guys. go fight with your moms...
 
you guys are pathetic you see people from your perspective. thats pathetic im sorry for you guys. go fight with your moms...
not from perspective but from all your posts begging from help
how do you have 10 pages worth of threads in support/requests and dont know a lick of lua
you ask for this community to make everything for you, and we're pathetic?
 
Back
Top