SRL Archive - MSI Suggestions

Option to not drop items


NCDS

2010-09-20 19:55:28

Has been tested and committed.

This will support any Item supported by MSI which currently includes:

(**
* All the different items used throughout the MSI scripts
*)
const
PICKAXE_LOW = 10;
PICKAXE_BRONZE = 10;
PICKAXE_IRON = 11;
PICKAXE_STEEL = 12;
PICKAXE_MITHRIL = 13;
PICKAXE_ADAMANT = 14;
PICKAXE_RUNE = 15;
PICKAXE_HIGH = 15;

HATCHET_LOW = 20;
HATCHET_BRONZE = 20;
HATCHET_IRON = 21;
HATCHET_STEEL = 22;
HATCHET_MITHRIL = 23;
HATCHET_ADAMANT = 24;
HATCHET_RUNE = 25;
HATCHET_HIGH = 25;

LOGS_LOW = 30;
LOGS_NORMAL = 30;
LOGS_OAK = 31;
LOGS_WILLOW = 32;
LOGS_MAPLE = 33;
LOGS_YEW = 34;
LOGS_MAGIC = 35;
LOGS_HIGH = 35;

ORE_LOW = 40;
ORE_CLAY = 40;
ORE_COPPER = 41;
ORE_TIN = 42;
ORE_IRON = 43;
ORE_SILVER = 44;
ORE_COAL = 45;
ORE_GOLD = 46;
ORE_MITHRIL = 47;
ORE_ADAMANTITE = 48;
ORE_RUNITE = 49;
ORE_HIGH = 49;

FISH_LOW = 60;
FISH_SMALLNET = 60;
FISH_CRAYPOT = 61;
FISH_ROD = 62;
FISH_BAIT = 63;
FISH_FLY = 64;
FISH_FEATHER = 65;
FISH_HARPOON = 66;
FISH_CAGE = 67;
FISH_HIGH = 67;

FOOD_LOW = 70;
FISH_RAW_LOW = 70;
FISH_RAW_SHRIMP = 70;
FISH_RAW_CRAYFISH = 71;
FISH_RAW_SARDINE = 72;
FISH_RAW_HERRING = 73;
FISH_RAW_ANCHOVIE = 74;
FISH_RAW_TROUT = 75;
FISH_RAW_PIKE = 76;
FISH_RAW_SALMON = 77;
FISH_RAW_TUNA = 78;
FISH_RAW_LOBSTER = 79;
FISH_RAW_SWORDFISH = 80;
FISH_RAW_HIGH = 80;

FISH_COOKED_LOW = 100;
FISH_COOKED_SHRIMP = 100;
FISH_COOKED_CRAYFISH = 101;
FISH_COOKED_SARDINE = 102;
FISH_COOKED_HERRING = 103;
FISH_COOKED_ANCHOVIE = 104;
FISH_COOKED_TROUT = 105;
FISH_COOKED_PIKE = 106;
FISH_COOKED_SALMON = 107;
FISH_COOKED_TUNA = 108;
FISH_COOKED_LOBSTER = 109;
FISH_COOKED_SWORDFISH = 110;
FISH_COOKED_HIGH = 110;

MEAT_RAW_LOW = 130;
MEAT_RAW_MEAT = 130;
MEAT_RAW_CHICKEN = 131;
MEAT_RAW_HIGH = 131;

MEAT_COOKED_LOW = 150;
MEAT_COOKED_MEAT = 150;
MEAT_COOKED_CHICKEN = 151;
MEAT_COOKED_HIGH = 151;

DOUGH_LOW = 170;
DOUGH_BREAD = 170;
DOUGH_PIE = 171;
DOUGH_HIGH = 171;

PIE_RAW_LOW = 180;
PIE_RAW_REDBERRY = 180;
PIE_RAW_MEAT = 181;
PIE_RAW_APPLE = 182;
PIE_RAW_HIGH = 182;

PIE_COOKED_LOW = 190;
PIE_COOKED_REDBERRY = 190;
PIE_COOKED_MEAT = 191;
PIE_COOKED_APPLE = 192;
PIE_COOKED_HIGH = 192;

CAKE_RAW_LOW = 200;
CAKE_RAW_NORMAL = 200;
CAKE_RAW_CHOCOLATE = 201;
CAKE_RAW_HIGH = 201;

CAKE_COOKED_LOW = 210;
CAKE_COOKED_NORMAL = 210;
CAKE_COOKED_CHOCOLATE = 211;
CAKE_COOKED_HIGH = 211;

STEW_RAW_LOW = 220;
STEW_RAW_NORMAL = 220;
STEW_RAW_HIGH = 220;

STEW_COOKED_LOW = 230;
STEW_COOKED_NORMAL = 230;
STEW_COOKED_HIGH = 230;

PIZZA_RAW_LOW = 240;
PIZZA_RAW_PLAIN = 240;
PIZZA_RAW_MEAT = 241;
PIZZA_RAW_ANCHOVY = 242;
PIZZA_RAW_HIGH = 242;

PIZZA_COOKED_LOW = 250;
PIZZA_COOKED_PLAIN = 250;
PIZZA_COOKED_MEAT = 251;
PIZZA_COOKED_ANCHOVY = 252;
PIZZA_COOKED_HIGH = 252;
FOOD_HIGH = 252;

GEM_SAPPHIRE = 260;
GEM_EMERALD = 261;
GEM_RUBY = 262;
GEM_DIAMOND = 263;

MISC_LOW = 270;
MISC_BIRD_NEST = 270;
MISC_HIGH = 270;

Please feel free to create Item records for any other items you might want to not drop while power skilling.

There has been a 'DontDrop' attribute added to MSI's DeclarePlayers.

with MSI_Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
Scripts := [];
Objects := [[]];
Priority := [[]];
DontDrop := []; //here
Loads[0] := ;
Loads[1] := ;
end;

An example of it being properly filled out would be:

with MSI_Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Pin := '';
Active := True;
Member := False;
Location := ;
Scripts := [];
Objects := [[]];
Priority := [[]];
DontDrop := [GEM_SAPPIRE, GEM_RUBY];
Loads[0] := ;
Loads[1] := ;
end;

Pretty straight forward but feel free to post any questions as well.

Coh3n

2010-09-20 22:57:18

It will support ANY item we have a record for. ;) Not just the ones you listed. Just thought that if someone was mining rune/addy and they wanted to mine/drop coal/iron/whatever while it spawns, they could.

NCDS

2010-09-20 23:00:21

From: Coh3n
It will support ANY item we have a record for. ;) Not just the ones you listed. Just thought that if someone was mining rune/addy and they wanted to mine/drop coal/iron/whatever while it spawns, they could.


Never thought about people using it like that :redface:

Edited first post.

Coh3n

2010-09-20 23:01:56

From: NCDS
Never thought about people using it like that :redface:

Edited first post.

Yeah I just thought of that on the spot. Not a bad idea though. It could potentially run into problems, but we'll cross that bridge when it comes.

NCDS

2010-09-20 23:04:14

From: Coh3n
Yeah I just thought of that on the spot. Not a bad idea though. It could potentially run into problems, but we'll cross that bridge when it comes.


Like perhaps if the script has been running long enough to the point that the inventory is full of DontDrop items.

We'll have to decide on how to handle that.

Coh3n

2010-09-21 01:30:55

From: NCDS
Like perhaps if the script has been running long enough to the point that the inventory is full of DontDrop items.

We'll have to decide on how to handle that.

Yeah I thought about that too. Let's not worry about it until we get everything else sorted out. :)

NCDS

2010-09-21 01:42:33

From: Coh3n
Yeah I thought about that too. Let's not worry about it until we get everything else sorted out. :)


Sounds good to me.

I'm testing the mage cutter now so that should be committed soon :)

Coh3n

2010-09-21 02:14:28

From: NCDS
Sounds good to me.

I'm testing the mage cutter now so that should be committed soon :)

Awesome! Don't forget to add the mage tree to SCRIPT_POWER_CHOP. I've forgotten that for the miner before. :p