Farming script, need help making it generic

Hi guys!

I’ve been working on a farming script, which works fine for a single level.
However, it uses putnpc on 3 different npcs that increment a specific server var.

I need this var to have different names if I use the same npcs.txt in different levels.

Is there a way to pass a parameter to a putnpc, or a way to insert the level name inside of the var name?

You may find the working example in farmlandway.graal on Classic Graal Adventure, north west of Avalon

[ATTACH]3495[/ATTACH]
[ATTACH]3494[/ATTACH]
[ATTACH]3496[/ATTACH]
[ATTACH]3497[/ATTACH]
[ATTACH=CONFIG]3498[/ATTACH]

Additionnal files:

[QUOTE=fredi125;103483]
Is there a way to pass a parameter to a putnpc, or a way to insert the level name inside of the var name?

[/QUOTE]

if (playerenters){
  setstring this.levelvar#L,#L is the level;
  messsage #s(this.levelvar#L);

???

Yeah sorry I just figured it out, this and how to get the drop area position and width from a level specific var.

If anybody’s interested, once this is 100% functional anybody can use it and change it.