SRL Archive - First Scripts

Humidifier - My First script :D


Ixilisi

2012-11-28 03:56:05

I haven't been able to test yet, as it says
 [Error] C:\Simba\Scripts\IHumidifyXilisi.simba(22:16): Unknown identifier '' at line 21 

Which I think is a bit odd, any how tell me what you think.
One thing that I think is cool, but may need fixing is the coords to abilityslot finder function, if its good enough I might send a pull request if someone teaches me how ;P

Also only sell at +5-10% above Med please!
Ixilisi

Added some super simple anti-leech

Le Jingle

2012-11-28 04:22:15

For your error, I'd suggest loading DTM's and freeing DTM's in two different procedures (one for setting and one for freeing). I'll stop to that extent as I only feel I should cover the error as to which you pointed out in the main post (I'd feel intruding posting anything more).

Hence, not too bad for a first script, keep up the learning and work!

Cheers,
Lj

Ixilisi

2012-11-28 04:31:27

From: Le Jingle
For your error, I'd suggest loading DTM's and freeing DTM's in two different procedures (one for setting and one for freeing). I'll stop to that extent as I only feel I should cover the error as to which you pointed out in the main post (I'd feel intruding posting anything more).

Hence, not too bad for a first script, keep up the learning and work!

Cheers,
Lj


Feel Free to criticize my probably horrible coding style. I tried doing as you suggested but it still isn't working…


var
EmptyVialDTM, ClayDTM, HumidifyDTM, AstralDTM:Integer;

Procedure LoadDTMs;

begin
EmptyVialDTM = DTMFromString('mwQAAAHic42RgYBBgZGDgA2IhIJYCYg4oXwSKxYH4HFDdYSi+DMXXofgYEJ8F4ri4JIbp0+cxVFbWMxgbmzLEAvkgMQ8PbwYTEzMwlgCq4yeAGYnAcAAANaYRzg==');
ClayDTM = DTMFromString('mrAAAAHic42BgYMhjYmBIBuIMIM4G4nwgLgLiciAuBuImRgaGNiDuBOIuKLsViBuBuAGIHc1VGLpKfBhmNYYCTWNkqExzBtMgXJ7ixCAEZOHDjAQwDAAAPqoN5w==');
HumidifyDTM = DTMFromString('mAAEAAHic42FgYOAFYk4gFgJibiDmYoAAFiAWBGJpKBYHYmEkeREg5gNiVqh+EM0IxBxAzAPEAkDMBjInazuDd001A2PJYTB+//4Dw90HzxgCOyaB6W0btzKIt25nkGiYx6C94TnYTlIwI4kYGQAA6nAWvg==');
AstralDTM = DTMFromString('m6wAAAHic42ZgYMhlYmAoBuJMIE4E4jQgLgTiSiCuAOJ4qByIb8XIwGAHxI5AbAHEHlDsAMSmUNocKnd6/WkUrKyoyJAYG8uwZO5chl2bNjKoqagwlBYUMGxes5pBEOgOYjEjCRgJAADebxqn');
end;
Procedure UnloadDTMs;
Begin
FreeDTMs(EmptyVialDTM, ClayDTM, HumidifyDTM, AstralDTM);
end;

{...}
begin
PrefC := PreferenceClay;
magicxp := 0;
bags := 0;
ClearDebug;
SetupSRL;
DeclarePlayers;//Calls the procedure.
LoginPlayer;//Logs your player into the game.
LoadDTMs;
Repeat {...}

But this time it says
[Error] C:\Simba\Scripts\IHumidifyXilisi.simba(44:160): Internal error (20) at line 43

Ixilisi

2012-11-28 10:10:27

Yay it complies now, I added super simple anti-leech too.

Frosted

2012-12-10 20:34:18

Love this script!