just putting it out there .


This forum houses many years of development, tracing back to some of the earliest posts that exist on the board. Its current use is for the continued development of the server and game it has always served: The Mana World.
William James wrote:Act as If what you do make's a difference, because It does.
Code: Select all
052-2.gat,1,1,0|script|#ItemsInvoker|127,{
end;
onInit:
setarray $@illia_storage_items, 541, 567, 568, 562;
setarray $@illia_storage_special_items, 687, 827, 1229;
// Map coords : x1,y1, x2,y2, ...
setarray $@illia_storage_item_points, 20,67, 22,75, 27,71, 30,73, 34,76, 30,64, 34,65, 34,62, 21,61, 22,64;
end;
[...]
L_ItemSpawn:
// This section will decide what to spawn: special monster, monster, item, special item
// Calculation uses a decreasing variable which introduces a deviation.
// Its initial value is based on $@Illia_Luvia_Harvest
// * first decide (50% / 50%) if the deviation will be positive or negative
// * Apply the deviation to a random number between 0, 100. (note the final value can be < 0 or > 100)
// The purpose is that, when the initial deviation is high, there are high chances to get either
// a special monster, or a special item.
set @m, rand(100);
if (@m < 50)
set @r, rand(100) - $@illia_storage_deviation;
if (@m >= 50)
set @r, rand(100) + $@illia_storage_deviation;
[...]
if (@r > 98)
goto L_MakeSpecialItem;
[...]
L_MakeSpecialItem:
makeitem $@illia_storage_special_items[rand(getarraysize($@illia_storage_special_items))], rand(2, 4), "052-2.gat", $@item_invoke_x, $@item_invoke_y;
areatimer "052-2.gat", 19, 60, 35, 78, 10, "#ItemsInvoker::onWow";
set $@illia_storage_max_items, $@illia_storage_max_items - 1;
set @r, 0;
end;