Posts: 12
Threads: 3
Joined: Oct 2015
Reputation:
3
Code:
function Verbluten()
{
local health = getHealth();
if (health < 31)
{
setHealth(health - 5);
addMessage(255, 0, 0, "Du verblutest langsam!");
addMessage(255, 0, 0, "Besorg dir besser etwas zum Regenerieren!");
}
else
{
if (health > 30)
killTimer(Verbluten);
}
}
// The Problem is, when he goes from 29-32 HP he become the -5 HP :/
function ANTIAFK()
{
local health = getHealth();
if (health > 89)
setExperience(getExperience + 100);
{
else
}
if (health < 90)
addMessage(255, 0, 0, "Du hast wenig Leben und bekommst deshalb keine Erfahrung!");
}
// here is the problem, that we wont accept "+".
I hope anyone can help
Gothic-online.net
Back soon!
Posts: 601
Threads: 29
Joined: Oct 2015
Reputation:
341
What's the problem in first function? Cause I don't understand, everything looks good.
The second problem - getExperience is a function, so you must to add brackets after that.
Posts: 12
Threads: 3
Joined: Oct 2015
Reputation:
3
The problem at the first ist, when im under 30 HP, ill lost 5 HP. Thats right. But when i eat some, and go over 31, i still lost -5 HP.
At the second . Its like this?
I dont understand.
Code:
setExperience(getExperience) + 100);
Gothic-online.net
Back soon!
Posts: 12
Threads: 3
Joined: Oct 2015
Reputation:
3
Oh right...-.-
Thanks mate

.
@Bimbol please help
Gothic-online.net
Back soon!
Posts: 430
Threads: 37
Joined: Sep 2015
Reputation:
328
You can also use onRender or onTick callback with getTickCount function.
Posts: 12
Threads: 3
Joined: Oct 2015
Reputation:
3
Ok ill try
thanks
Gothic-online.net
Back soon!