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

OnAdvance [Calculate New Bouns] TFS 0.3.6

Black Dove

Web-Developer
Joined
Apr 14, 2010
Messages
129
Reaction score
4
Location
Egypt
Iam Working For a New System ..

Everything Running Ok And It Give Bouns HP And MP
But
the problem is player in advance have to relog to get the new bouns after advancing
Lets say new player Hp&Mp is 1000/1000
And each level it gain 1000/1000
If player have the storage of the first player get the 30% bouns
1000/1000 >>after bouns>> 1300/1300
When player get an advance of 1 level
It became 2300/2300 (2000"basic" & 300"last bouns")
So I have to log to calculate the bouns on the new Hp/Mp
To Be 2600/2600

That's Is The Part I Want To Edit It To Make Player Have Not To Relog To Calculate New Bouns as I Explained

if isPlayer(cid) then
if not (getCreatureCondition(cid, CONDITION_ATTRIBUTES, 3)) then
doAddCondition(cid, rewards[a].cond)
local hp = getCreatureHealth(cid) * rewards[a].percent
local mp = getCreatureMana(cid) * rewards[a].percent
doCreatureAddHealth(cid, hp)
doCreatureAddMana(cid, mp)
end

@Limos

@Flatlander Would You Give a Look Here Bro ?
 
Last edited:
Code:
doCreatureAddHealth(cid, hp)
Is for healing, if you want to add a permanent extra health, use this:
Code:
hp = getCreatureMaxHealth9cid) * percent
setCreatureMaxHealth(cid, hp)
 
Code:
doCreatureAddHealth(cid, hp)
Is for healing, if you want to add a permanent extra health, use this:
Code:
hp = getCreatureMaxHealth9cid) * percent
setCreatureMaxHealth(cid, hp)
#Sorry I Have Edit The Code ... It's What Iam Working On Right Now
Dude, Anyway The Two Codes Are Working Fine ... The Problem Still As I Expalined Nothing Changed ... :/
Player Have To Relog To Calculate The New Bouns Of The New HP/MP Amount ...
 
Remove the condition and readd it on advance, otherwise you can also fix the bug in your sources.
 
For More Explanation As Many Friends Asked
Here We Are

Iam Working On a System Which First Reward To Top Wealthy Player 30% Bouns Hp&Mp
Top Wealthy player Refer to The Highest Player's Balance In bank

Here We Are
Iam New Player
Lvl :1
HP : 1000
MP : 1000
Attention :1000 Hp&Mp Gain per level
So My Balance In bank Is 485848 kk
So iam the Highest Rank in balance

So I Gonna gain 30% Bonus Hp&Mp
Level 1 : "(Local Hp =1000) + (Bonus Hp = 1000*30% = 300) = 1300 Thats Works

Now And Here Is The Problem As I Said player's hp gain per level is 1000

Ex. Level 2 : "(Local Hp = 2000) + (Bonus Hp = 2000*30% =600) = 2600
Thats What Should Happened

BUT in fact What Is Going On Is that
Level 2 : "(Local Hp = 2000) + (OLD Bonus Hp = 1000*30% =300) = 2300 :/
And Player Should Relog To Calculate It Correctly Like That 2600
And Sure Its a Trouble Player Have To Relog Each Advanced Level To Get The Correct Calculate
Level 1 = 1300 (correct)
Level 2 = 2300 (Wrong)
After Relog
Level 2 = 2600 ( Correct )

I Want To Edit It To avoid That Playet Should Relog Each Advance To calculate It Correctly

UP UP UP UP UP UP
 
Your script isn't readable for me.. Can you post it in [.php] [/php] (without ".") and explain again what the script is supposed to do?
 
@Limos
Would you give a look here, Here We Are On Boards :p As Rules :D

Another Long Explanation

-------------------------------
Everything Running Ok And It Give Bouns HP And MP
But
the problem is player in advance have to relog to get the new bouns after advancing
Lets say new player Hp&Mp is 1000/1000
And each level it gain 1000/1000
If player have the storage of the first player get the 30% bouns
1000/1000 >>after bouns>> 1300/1300
When player get an advance of 1 level
It became 2300/2300 (2000"basic" & 300"last bouns")
So I have to log to calculate the bouns on the new Hp/Mp
To Be 2600/2600

That's Is The Part I Want To Edit It To Make Player Have Not To Relog To Calculate New Bouns as I Explained

if isPlayer(cid) then
if not (getCreatureCondition(cid, CONDITION_ATTRIBUTES, 3)) then
doAddCondition(cid, rewards[a].cond)
local hp = getCreatureHealth(cid) * rewards[a].percent
local mp = getCreatureMana(cid) * rewards[a].percent
doCreatureAddHealth(cid, hp)
doCreatureAddMana(cid, mp)
end


I Have To Relog To Calculate The New Bonus
For. Example..
Lv 1 Player In Normal : 1000 HP
Lv 2 Player In Normal : 2000 HP
------------------------------------------
Lv 1 Player With 30% Bonus : 1300
When I Advance From Lv1 To Lv2
It Became 2300 And That's Wrong
Cause as 30% Bonus It Must Be 2600
So i Have To Relog To Make It 2600
---------------------------
The Issue IS So Boring That Player Should Relog After Each Level To Get The Right Bonus
I Want To Add a Code That Work On Advance
Thats All .. Hope You Understand Me This Time

Hope You Not Ignoring ... This Time
I Trust In You That You Can Solve Anything :D
 
Back
Top