Jagex_Fagex
2007-06-28 22:21:26
Ok, im trying to use this in my script. I have a variable TreeType which is assigned a number depending on what tree it will be cutting.
I am trying to use Case to tell it what TreeName is
i know i have to change "xp" to something else. I have tried everything i can think of, Is it possible? how is it done? thanks :D I may think of it soon, im just having a mental block today.
EDIT:
Would that be it?
I am trying to use Case to tell it what TreeName is
procedure GetWoodCutXp;
begin
case TreeType of
1 : xp:= 'tree';// <--- Xp Per Normal Log !
2 : xp:= 37;// <--- Xp Per Oak Log !
3 : xp:= 67;// <--- Xp Per Willow Log ! (
4 : xp:= 100;// <--- Xp Per Maple Log ! ( Must Change THE 0 TO the xp given)
5 : xp:= 175;// <--- Xp Per Yew Log !
6 : xp:= 200;// <--- Xp Per Magic Log !
end;
end;i know i have to change "xp" to something else. I have tried everything i can think of, Is it possible? how is it done? thanks :D I may think of it soon, im just having a mental block today.
EDIT:
procedure GetWoodCutXp;
begin
case TreeType of
1 : Begin
GetTreeExp('tree');
end;
2 : Begin
GetTreeExp('oak');
end;
3 : Begin
GetTreeExp('willow');
end;
4 : Begin
GetTreeExp('maple');
end;
5 : Begin
GetTreeExp('mahogany');
end;
6 : Begin
GetTreeExp('yew');
end;
7 : Begin
GetTreeExp('magic');
end;
end;
end;Would that be it?