Реклама в шаут, трейд, хиро

BigChlen

New member
Код:
using System;
using System.Linq;
using System.Collections.Generic;
using NewWidget.Core;
using NewWidget.Core.Native;
using NewWidget.Core.Scripting;

public class Script : ScriptBase {

    public override void OnStart() {
        base.OnStart();
        CreateTimer(10000 + WaitRandom(rng), Advertising);
    }

    string text_shuat = "";
    string text_trade = "";
    string text_hero = "";

    void Advertising() {
        Client.Say(text_shuat, ChatTypes.Shout);
        Wait(10000 - WaitRandom(rng));
        Client.Say(text_trade, ChatTypes.Trade);
        Wait(10000 - WaitRandom(rng));
        Client.Say(text_hero, ChatTypes.HeroVoice);
    }
    
    Random rng = new Random();
    
    static int WaitRandom(Random rng)
    {
        return rng.Next(10000);
    }
    
}
 
Сверху