• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Timer and function with string

Myth

Freebooter
Good day!
When the specified time passes, the function "DiseaseFester"

pchar.quest.DiseaseFester5.win_condition.l1 = "timer";
pchar.quest.DiseaseFester5.win_condition.l1.date.day = GetAddingDataDay(0, 0, 1);
pchar.quest.DiseaseFester5.win_condition.l1.date.month = GetAddingDataMonth(0, 0, 1);
pchar.quest.DiseaseFester5.win_condition.l1.date.year = GetAddingDataYear(0, 0, 1);
pchar.quest.DiseaseFester5.win_condition.l1.date.hour = 1+rand(7);
pchar.quest.DiseaseFester5.function = "DiseaseFester";

But I need start function with string
void DiseaseFester(string stat)

How can I improve the timer so that it calls a function with one variable? I do not really want to rewrite the function call in a case.

Case "DiseaseFester":
DiseaseFester(string stat)
break;
 
Store the variable in a player attribute first, then use that for your function call?
 
Back
Top