Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer problem...
#1
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 Smile
Gothic-online.net

Back soon!
#2
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.
#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!
#4
The first problem sounds like Gothic Online bug. You must to wait for Bimbol.

About the second:
Squirrel Script
  1. setExperience(getExperience() + 100);


#5
Oh right...-.-
Thanks mate Smile.

@Bimbol please help Smile
Gothic-online.net

Back soon!
#6
You can also use onRender or onTick callback with getTickCount function.
#7
Ok ill try Smile

thanks
Gothic-online.net

Back soon!


Possibly Related Threads…
Thread Author Replies Views Last Post
  mysql module new problem in 0.1.0 Baster 2 3,631 12.07.2017, 10:58
Last Post: Baster

Forum Jump:


Users browsing this thread: