SRL Archive - SRL Archives

Some combat style selection functions.


Ruroken

2007-06-29 14:21:25

Well these are a few functions I wrote a while back for my pest control script. Enjoy.

{*******************************************************************************
Function HasStaff : Boolean;
By: Ruroken
Description: Checks to see if your character is holding a staff.
*******************************************************************************}

{*******************************************************************************
Function AutoPickSpell : Boolean;
By: Ruroken
Description: Will select the strongest possible spell
*******************************************************************************}

{*******************************************************************************
procedure SetCombat(ToTrain, TrainWhat : String; TrainDef : Boolean);
By: Ruroken
Description: Will set your combat styles. Also will select spells.

Valid args for TrainWhat

if ToTrain = 'melee' valid args are :
- atk
- str
- share
- def

if ToTrain = 'range' valid args are :
- accurate
- rapid
- long

if ToTrain = 'mage' valid args are :
- wind blast
- water blast
- earth blast
- fire blast
- wind bolt
- water bolt
- earth bolt
- fire bolt
- wind blast
- water blast
- earth blast
- fire blast
- wind wave
- water wave
- earth wave
- fire wave

// These only apply to mage \\

- Mages MUST have a staff!
- If you want to train def + mage set TrainDef to 'true'
- If you want the script to AutoPick the spell set TrainWhat to 'AutoPick'
and have the runes for the spell wanted in invin.

*******************************************************************************}

I don't even know if these have been written before :p oh well.

EDIT : Uploaded the fix. Thanks Bob.

Bobarkinator

2007-06-29 14:31:55

Good script, but did you forget to change this part to "ToTrain" and "TrainWhat"? like this
if ToTrain = 'melee' then
begin
if TrainWhat = 'atk' then SetFightMode(1);
if TrainWhat = 'str' then SetFightMode(2);
if TrainWhat = 'share' then SetFightMode(3);
if TrainWhat = 'def' then SetFightMode(4);
end;
You have it everywhere else just no their.

[HalfOffTopic]Did you finish your PC scripts?[/HalfOffTopic]

Ruroken

2007-06-29 14:43:20

Thanks for the heads up Bob :)

and i kinda finished my PC script…its still in Beta…

RudeBoiAlex

2007-06-29 18:03:18

thaks i like these i will use n credit

Ruroken

2007-06-29 22:37:52

thanks :)

EDIT: Comeon guys. 23 views 4 responses? I need feedback here :p

Cheesehunk

2007-06-30 00:00:20

Nice job, keep up the good work.:)

Ruroken

2007-06-30 00:04:41

Yay! Cheesehunk likes my stuff :)

RudeBoiAlex

2007-06-30 07:00:29

we all like ur stuff ^.^ used the staffiswieldied 1 and credited in my script

Ruroken

2007-06-30 11:19:58

:) Thanks for the great feedback guys

neG

2007-06-30 22:17:54

Good work!
These will come in handy for me in the near future :)

Ruroken

2007-06-30 22:30:03

Cool :)

Didn't know everyone would like it so much :)

the scar noob

2007-07-08 12:37:06

nice work, thx to share! ;)

Buckleyindahouse

2007-07-08 12:41:13

Nice bump of a Semi old topic.

Dan Cardin

2007-07-08 20:49:17

nice i really like the "AutoPickSpell" but will it work with ancients?

Ruroken

2007-07-08 23:51:58

no, not yet.

Might update it someday :rolleyes: