RunUO-FR
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
RunUO-FR

Forum de support pour RunUO en français.
 
AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment : -17%
Casque de réalité virtuelle Meta Quest 2 ...
Voir le deal
249.99 €

 

 Commandes pour ouvrir site/forum/... (RunUO 2.1)

Aller en bas 
AuteurMessage
Scriptiz

Scriptiz


Messages : 102
Date d'inscription : 02/09/2008
Localisation : Belgium

Commandes pour ouvrir site/forum/... (RunUO 2.1) Empty
MessageSujet: Commandes pour ouvrir site/forum/... (RunUO 2.1)   Commandes pour ouvrir site/forum/... (RunUO 2.1) Icon_minipostedDim 14 Aoû - 3:04

Trois commandes pour permettre à vous joueurs d'accéder plus facilement aux pages web que vous leur proposez (site, forum, et ici une page pour voter pour le shard).

.site (ou [site si vous n'avez pas modifier le préfixe des commandes)
.forum (ou [forum )
.vote (ou [vote )

Il vous suffit de changer les URLs en haut du fichier vers vos sites.

Code:
/***************************************************************************
 *                              WebCommands.cs
 *                            -------------------
 *  begin                : August 14, 2010
 *  copyright            : (C) Scriptiz
 *  email                : maeliguul@hotmail.com
 *  version              : 2011-08-14
 *
 ***************************************************************************/

/***************************************************************************
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 ***************************************************************************/
using Server.Mobiles;
using Server.Items;
using Server.Commands;

namespace Server.Commands
{
    public class WebCommands
    {
        // Les urls nécessaires :)
        public static string SiteUrl = "http://www.vivre-uo.fr";
        public static string ForumUrl = "http://www.vivre-uo.fr/forum/";
        public static string VoteUrl = "http://www.rpg-paradize.com/?page=vote&vote=23892";

        public static void Initialize()
        {
            CommandSystem.Register("site", AccessLevel.Player, new CommandEventHandler(Site_OnCommand));
            CommandSystem.Register("forum", AccessLevel.Player, new CommandEventHandler(Forum_OnCommand));
            CommandSystem.Register("vote", AccessLevel.Player, new CommandEventHandler(Vote_OnCommand));
        }

        [Usage("site")]
        [Description("Ouvre une page web vers le site de Vivre.")]
        public static void Site_OnCommand(CommandEventArgs e)
        {
            e.Mobile.LaunchBrowser(SiteUrl);
        }

        [Usage("forum")]
        [Description("Ouvre une page web vers le forum de Vivre.")]
        public static void Forum_OnCommand(CommandEventArgs e)
        {
            e.Mobile.LaunchBrowser(ForumUrl);
        }

        [Usage("vote")]
        [Description("Ouvre une page web vers la page vous permettant de voter pour Vivre.")]
        public static void Vote_OnCommand(CommandEventArgs e)
        {
            e.Mobile.LaunchBrowser(VoteUrl);
        }
    }
}
Revenir en haut Aller en bas
http://uoclassic.free.fr/
 
Commandes pour ouvrir site/forum/... (RunUO 2.1)
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Commandes pour utiliser des bandages (RunUO 2.1)
» .site/.forum
» Bienvenue sur RunUO-FR
» Exécuter Runuo
» RunUO sous Linux

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RunUO-FR :: Domaine public :: Vos créations-
Sauter vers: