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

Need help with this

Elaney

Member
Joined
Jan 1, 2009
Messages
1,561
Reaction score
12
Location
Sweden
I want to add

setCreatureMaxMana
setCreatureMaxHealth

At tfs 0.2

Anyone who can explain or push in the right direction?

Or a script that gives the mana ur supposed to have. Like when you use super promotion at my server you get 3 additonal hp and 2 additional mana. And if you buy it at lvl 21+ you dont got the mana ur supposed to have if you bought it at 20+. So what i need is a script that works for 0.2 or help to get it to work with compile etc.

If help i will rep and be at your service of helping at any time.

/Elaney
 
Last edited:
I want to add

setCreatureMaxMana
setCreatureMaxHealth

At tfs 0.2

Anyone who can explain or push in the right direction?

Or a script that gives the mana ur supposed to have. Like when you use super promotion at my server you get 3 additonal hp and 2 additional mana. And if you buy it at lvl 21+ you dont got the mana ur supposed to have if you bought it at 20+. So what i need is a script that works for 0.2 or help to get it to work with compile etc.

If help i will rep and be at your service of helping at any time.

/Elaney


setCreatureMaxHealth(cid, health) and setCreatureMaxMana(cid, mana) Should be used in conjunction with getCreatureHealth(cid) and getCreatureMaxMana(cid)

When you see the letters cid they are refering to the player, health and mana are just local variables with some kind of value to them

You could use the statement such as


PHP:
local extraHp = 3
local extraMana = 2
local money = 20000
local display = money / 1000
if getPlayerLevel(cid) <= 20 and getPlayerPromotionLevel(cid) `= 1 and doPlayerRemoveMoney(cid, money) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + extraHp)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + extraMana)
setPlayerPromotionLevel(cid, 1)
elseif getPlayerLevel(cid) > 20 and getPlayerPromotionLevel(cid) `= 1 and doPlayerRemoveMoney(cid, money) then
setPlayerPromotionLevel(cid, 1)
elseif doPlayerRemoveMoney(cid, money) == FALSE then
doPlayerSendCancel(cid, 'Sorry, But you need '..display..'k to buy a promo.')  
elseif getPlayerPromotionLevel(cid) == 1 then
doPlayerSendCancel(cid, 'Sorry, You have already been promoted.') 
end

This is a rough draft, hope it helps :)




Addin additional hp or mana to a player through a promotion is a configuration that is set in the vocations.xml file
 
setCreatureMaxHealth(cid, health) and setCreatureMaxMana(cid, mana) Should be used in conjunction with getCreatureHealth(cid) and getCreatureMaxMana(cid)

When you see the letters cid they are refering to the player, health and mana are just local variables with some kind of value to them

You could use the statement such as


PHP:
local extraHp = 3
local extraMana = 2
local money = 20000
local display = money / 1000
if getPlayerLevel(cid) <= 20 and getPlayerPromotionLevel(cid) `= 1 and doPlayerRemoveMoney(cid, money) then
setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + extraHp)
setCreatureMaxMana(cid, getCreatureMaxMana(cid) + extraMana)
setPlayerPromotionLevel(cid, 1)
elseif getPlayerLevel(cid) > 20 and getPlayerPromotionLevel(cid) `= 1 and doPlayerRemoveMoney(cid, money) then
setPlayerPromotionLevel(cid, 1)
elseif doPlayerRemoveMoney(cid, money) == FALSE then
doPlayerSendCancel(cid, 'Sorry, But you need '..display..'k to buy a promo.')  
elseif getPlayerPromotionLevel(cid) == 1 then
doPlayerSendCancel(cid, 'Sorry, You have already been promoted.') 
end

This is a rough draft, hope it helps :)




Addin additional hp or mana to a player through a promotion is a configuration that is set in the vocations.xml file


Well now my problems are that thoose

Getcreaturemaxmana/hp dont excist in tfs 0.2 ;(

so the script u sent me wont work.

But i will rep you for trying <3
 
Back
Top