SRL Archive - MSI Suggestions

Players[X].Integers, Strings etc


marpis

2009-12-12 16:44:08

How should we use them? My suggestion:

const
P_Activities = 0;
P_CurrentActivity = 0;
P_SkillItems = 1;
P_CurrentItem = 1;
P_SkillObjects = 2;
P_CurrentObject = 2;


Activities
Players[0].Arrays[P_Activities] := [Act_Varrock_WoodCutting_East, Act_Varrock_Mining_East];
Players[0].Integers[P_CurrentActivity] := Act_WoodCuttingEast;
We'll make it possible to change the skill during runtime.

Skill specific items
Players[0].Arrays[P_SkillItems] := [Hatchet_Rune, Logs];
Players[0].Integers[P_CurrentItem] := Hatchet_Rune;

SkillObjects
Players[0].Arrays[P_SkillObjects] := [Obj_Yew, Obj_Oak];
Players[0].Integers[P_CurrentObject] := Obj_Yew;

And then have a DeterminePlayerInfo function

Procedure DeterminePlayerInfo;
Begin
Case Players[CurrentPlayer].Integers[P_CurrentActivity] Of
Act_Varrock_WoodCutting_East:
Begin
Case GetLevel(Skill_WoodCutting, False) Of
1..14: Players[0].Arrays[P_SkillObjects] := [Obj_Tree];
15..99: Players[0].Arrays[P_SkillObjects] := [Obj_Tree, Obj_Oak];
End;
Players[0].Arrays[P_SkillItems] := [Logs];
End;
End;


* to be continue, g2g *

Coh3n

2009-12-12 20:31:20

Looks good to me. Maybe instead of using P_CurrentItem, use P_CurrentTool. Just because since you're talking about the item the character is weilding. It just makes it more specific.

Sir R. M8gic1an

2009-12-12 20:35:44

Pretty much the idea yup. If IRC, both me and coh3n have been doing this in our own scripts already.

~RM

Coh3n

2009-12-12 20:37:14

From: Rasta Magician
Pretty much the idea yup. If IRC, both me and coh3n have been doing this in our own scripts already.

~RM

Just you, I think. ;)

EDIT: I don't remember, did anyone bring up a discussion about using SRL's PlayerForm? Because I think that would be the best idea. Someone could even make an awesome MSI background. :)