1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

Need Help Timer and function with string

Discussion in 'Sea Dogs: City of Abandoned Ships' started by Myth, Aug 20, 2017.

  1. Myth

    Myth Master Mariner

    Joined:
    Mar 25, 2014
    Messages:
    203
    Gender:
    Male
    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;
     
  2. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    66,575
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Store the variable in a player attribute first, then use that for your function call?
     
  3. Myth

    Myth Master Mariner

    Joined:
    Mar 25, 2014
    Messages:
    203
    Gender:
    Male
    Very much versions of attribute.
     

Share This Page