use uo;
use os;
program hulka(who);
var hp;
var dmg;
var none;
var malohp;
hp := getvital(who,"life");
dmg := RandomFloat(20);
none := (hp-1);
if (none>=dmg);
ApplyRawDamage(who,dmg);
elseif (none<dmg);
malohp := (hp-none);
ApplyRawDamage(who,malohp);
else
(hp=1);
continue
endif
endprogram
but ecompiler cant compile that becouse:
C:\pol\scripts>ecompile hulka.src
EScript Compiler v1.08
Copyright (C) 1994-2007 Eric N. Swanson
Compiling: C:\pol\scripts\hulka.src
Token '(' cannot follow token 'getvital'
Function getvital() is not defined.
Error compiling statement at C:\pol\scripts\hulka.src, Line 8
Error detected in program body.
Error occurred at C:\pol\scripts\hulka.src, Line 8
Execution aborted due to: Error compiling file
What iam doing wrong? Can anyone help me?
Last edited by Yerome on Sun Sep 09, 2007 12:23 pm, edited 1 time in total.
use uo;
use vitals;
program wand(who)
var dmg := Randomint(20);
var Hp:=Cint(GetVital(who, "Life")/ 100);
if(Hp-dmg<=0)
dmg := Hp -1;
endif
ApplyRawDamage(who,dmg);
endprogram
use uo;
use vitals;
program wand(who)
var dmg := Randomint(20);
var Hp:=Cint(GetVital(who, "Life")/ 100);
if(Hp-dmg<=0)
dmg := Hp -1;
endif
ApplyRawDamage(who,dmg);
endprogram