SRL Archive - MSI Archives

more magic :D


nickrules

2010-10-31 13:09:10

Alrighty, I'm back and im bored as balls.

Anywho, with the new script setup, We can just add a new setupline? as in, Fishing has Fishspots, mining has Rocks, etc. How would we add our own (I assume we would just add another line to the TScript record, but I haven't taken the time to check? )

I need to commit the runes too.

Testing.

Coh3n

2010-10-31 13:18:05

No, you wouldn't add anything to TScript. You would add to TScriptSetup.

nickrules

2010-10-31 13:30:39

Hrm? and where would this be located. I just need to add a few quick things:
CastItem
CastObject
Staff
Spell
(if you care, hahaha :p)

Coh3n

2010-10-31 13:36:09

From: nickrules
Hrm? and where would this be located. I just need to add a few quick things:
CastItem
CastObject
Staff
Spell
(if you care, hahaha :p)

Globals.simba, with the rest of the types. ;)

We should be able to detect the staff automatically in MSI_SetupMagic, and the rest should be arrays.

CastItems: TIntegerArray;
CastObjects: TIntegerArray;
Spells: TIntegerArray;

nickrules

2010-10-31 21:55:26

This could lead to getting a bad choice of staff, whether it be the wrong staff for that personal user (eg, they have TON of one type of rune or another), or just a poor choice in general. Personally, I think it should be set manually. Its not like its a lot of work, or hard to remember…

Coh3n

2010-11-01 17:47:22

From: nickrules
This could lead to getting a bad choice of staff, whether it be the wrong staff for that personal user (eg, they have TON of one type of rune or another), or just a poor choice in general. Personally, I think it should be set manually. Its not like its a lot of work, or hard to remember…

That's understandable. Sounds good to me. :)

NCDS

2010-11-01 17:55:30

From: nickrules
This could lead to getting a bad choice of staff, whether it be the wrong staff for that personal user (eg, they have TON of one type of rune or another), or just a poor choice in general. Personally, I think it should be set manually. Its not like its a lot of work, or hard to remember…


I agree that the user should equip the staff they want to use before hand, but I think MSI should be able to detect what staff it is instead of the user having to fill it out.

Coh3n

2010-11-01 18:01:16

From: NCDS
I agree that the user should equip the staff they want to use before hand, but I think MSI should be able to detect what staff it is instead of the user having to fill it out.

Yeah that's what I thought too, but he does make a good point about using up runes. When I played, I sometimes used fire runes when high alching simply because I had so many.

However, doing so is kind of foolish when one can just use the staff, and sell the runes. I do like having less things for the user to fill out and in this case, defining the staff is kind of unnecessary. I'd like to see what other people think?

nickrules

2010-11-02 18:47:07

Here's what we can do:

The user can set the staff to one of the 4 elemental types (air, water, earth, fire), or to something STAFF_AUTODETECT. If it is set to one of the 4 default types, it just gets/uses that staff.

If it is autodetect, then we check if the user has one equipped. If not, then do some math and figure out which staff is best for the spell. Then it checks for this staff in the inventory. If its there, equip it. if not, get it [from the bank], and equip.

Complicated (sorta) but effective.

Coh3n

2010-11-02 18:52:34

From: nickrules
Here's what we can do:

The user can set the staff to one of the 4 elemental types (air, water, earth, fire), or to something STAFF_AUTODETECT. If it is set to one of the 4 default types, it just gets/uses that staff.

If it is autodetect, then we check if the user has one equipped. If not, then do some math and figure out which staff is best for the spell. Then it checks for this staff in the inventory. If its there, equip it. if not, get it [from the bank], and equip.

Complicated (sorta) but effective.

Wouldn't need them to fill out AUTODETECT. Just have it do that by default. It can work similar to Trees/Rocks/etc. If the user doesn't fill it out, it does its default routines.

NCDS

2010-11-02 18:54:08

From: Coh3n
Wouldn't need them to fill out AUTODETECT. Just have it do that by default. It can work similar to Trees/Rocks/etc. If the user doesn't fill it out, it does its default routines.


Yeah, there really is no need for any user input about the staffs.

nickrules

2010-11-02 21:34:08

So that would be set as a script default? or would it still be in the array, and only optionally filled out? orrr would it be forced this way? Trying to decide whats best, before I commit a bunch of magic stuff.

Coh3n

2010-11-02 21:54:41

From: nickrules
So that would be set as a script default? or would it still be in the array, and only optionally filled out? orrr would it be forced this way? Trying to decide whats best, before I commit a bunch of magic stuff.

Here's what I think we should do: Have an array in DeclarePlayers that can be left blank if the user wishes (just like Trees/FishSpots/Rocks).

with Scripts[0] do
begin
Name := SCRIPT_MAGE_ALCHER;
Spells := [];
CastItems := [];
CastObjects := [];
Staffs := [];
Where there would be defaults in the TScript record depending on what exactly the script does. By default, it would check for the best staff for the spell. Know what I mean? :)