diff options
Diffstat (limited to 'npc/guild')
-rw-r--r-- | npc/guild/gldfunc_treasure.txt | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/npc/guild/gldfunc_treasure.txt b/npc/guild/gldfunc_treasure.txt index f52403c3e..ad4e3bb20 100644 --- a/npc/guild/gldfunc_treasure.txt +++ b/npc/guild/gldfunc_treasure.txt @@ -43,7 +43,7 @@ //================================================
function script F_GldTreas {
- if(getarg(10) == 1) goto TreasureSpawn;
+ if(getarg(10) == 1) goto L_SPAWN;
SetCastleData getarg(0)+".gat",4,0;
SetCastleData getarg(0)+".gat",5,0;
KillMonster getarg(0)+".gat","Treasure_"+getarg(1)+"::OnDied";
@@ -56,42 +56,13 @@ function script F_GldTreas { if (getarg(2) <= 0) return;
set getarg(3), getarg(2); //sets the counter variable = to the box number amount
-TreasureSpawn:
-
- set getarg(4), getarg(5); //sets the box id variable = to the box id
- set $@temp, rand(4);
- if ($@temp > 2) set getarg(4), getarg(4) + 1;
- areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
- set getarg(3), getarg(3) - 1;
- if(getarg(3) <= 0) return;
-
- set getarg(4), getarg(5); //sets the box id variable = to the box id
- set $@temp, rand(4);
- if ($@temp > 2) set getarg(4), getarg(4) + 1;
- areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
- set getarg(3), getarg(3) - 1;
- if(getarg(3) <= 0) return;
-
- set getarg(4), getarg(5); //sets the box id variable = to the box id
- set $@temp, rand(4);
- if ($@temp > 2) set getarg(4), getarg(4) + 1;
- areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
- set getarg(3), getarg(3) - 1;
- if(getarg(3) <= 0) return;
-
- set getarg(4), getarg(5); //sets the box id variable = to the box id
- set $@temp, rand(4);
- if ($@temp > 2) set getarg(4), getarg(4) + 1;
- areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
- set getarg(3), getarg(3) - 1;
- if(getarg(3) <= 0) return;
-
+L_SPAWN:
set getarg(4), getarg(5); //sets the box id variable = to the box id
set $@temp, rand(4);
if ($@temp > 2) set getarg(4), getarg(4) + 1;
areamonster getarg(0)+".gat",getarg(6),getarg(7),getarg(8),getarg(9),"Treasure Chest",getarg(4),1,"Treasure_"+getarg(1)+"::OnDied";
set getarg(3), getarg(3) - 1;
- if(getarg(3) > 0) goto TreasureSpawn;
+ if(getarg(3) > 0) goto L_SPAWN;
return;
}
|