You need to work on your standards, check out a great guide here: http://villavu.com/forum/showthread.php?t=60288
This:
Simba Code:
Var
stun, x, y, StartTime: Integer;
You shouldn't use global variables. You should use local variables as much as you possibly can. Local variables are variables that are used only in a procedure/function.
Like you have here:
Simba Code:
procedure DeclarePlayers;
Var i:integer;
Begin
NumberOfPlayers(1);
CurrentPlayer := 0;
For I := 0 to (1-1) Do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Strings[0] :='stun'; //Name of spellto cast.(See list of spells above)
End; //Set to 'Range' if ranging!
End;
That is a local variable, the "i" and "var" before the begin .. end nest.
This:
Simba Code:
procedure Findspell;
begin
stun := DTMFromString('mWAAAAHicY2FgYGBkgAA2KJsViLmhfBBIyylg6OyqZ/j9+zeDDK8KAxdQDBkzomEQAAAisQZh');
SetAngle(true)
GameTab(tab_Magic)
If FindDTM(stun, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
mouse( x, y, 3, 3, true);
FreeDTM(stun);
end;
end;
You free the DTM only if you actually find it. This is a memory leak and will cause an intensive haul on your computer. So you should have the "FreeDTM(stun)" after the finding method.
Other than those things, it's a very good first script. Great job!
You should check out Coh3n's guide next: http://villavu.com/forum/showthread.php?t=49089