Перейти к содержанию

xcoms

Продвинутый пользователь
  • Постов

    51
  • Зарегистрирован

  • Посещение

  • Победитель дней

    3

Сообщения, опубликованные xcoms

  1. Краш мап сервера при использовании команды @jobchange .... что может быть ?! не подскажите )

    или кто знает все файлы где данная команда прописана !?

    через нпц команда работает !

  2. Проблема с анюнсом ...

    установил OnTimer60000: и OnTimer120000тобись должно быть 10 и 20 минут ... но проходит не более 2 минут и выдает сообщение

    Так держать, вы защищаете Империум Арену уже 10 минут!

    и за ним сразу

    "Слава гильдии ["+GetGuildName($LastEmpGuild)+"], они защищали Империум Арену целый 20 минут

    в чем косяк ?

  3. Спасибо за помощь написал вот так ...


    - script TBSummon -1,{
    OnInit:
    setarray $mob[0],1846,1845,1844;
    setarray $TownZ$[0],"prontera.gat","alberta.gat","aldebaran.gat","amatsu.gat","comodo.gat","geffen.gat","izlude.gat","hugel.gat","lighthalzen.gat","louyang.gat","morocc.gat","payon.gat","umbala.gat","yuno.gat","rachel.gat","einbech.gat","einbroch.gat","ayothaya.gat","moscovia.gat";
    end;
    onstart:
    set .@mob,$mob[rand(getarraysize($mob))];
    set .@town$,$TownZ$[rand(getarraysize($TownZ$))];
    if(.@town$ == "prontera.gat"){ set .@town2$,"Prontera"; }
    if(.@town$ == "alberta.gat"){ set .@town2$,"Alberta"; }
    if(.@town$ == "amatsu.gat"){ set .@town2$,"Amatsu"; }
    if(.@town$ == "comodo.gat"){ set .@town2$,"Comodo"; }
    if(.@town$ == "geffen.gat"){ set .@town2$,"Geffen"; }
    if(.@town$ == "izlude.gat"){ set .@town2$,"Izlude"; }
    if(.@town$ == "hugel.gat"){ set .@town2$,"Hugel"; }
    if(.@town$ == "lighthalzen.gat"){ set .@town2$,"Lighthalzen"; }
    if(.@town$ == "louyang.gat"){ set .@town2$,"Louyang"; }
    if(.@town$ == "morocc.gat"){ set .@town2$,"Morocc"; }
    if(.@town$ == "payon.gat"){ set .@town2$,"Payon"; }
    if(.@town$ == "umbala.gat"){ set .@town2$,"Umbala"; }
    if(.@town$ == "yuno.gat"){ set .@town2$,"Yuno"; }
    if(.@town$ == "rachel.gat"){ set .@town2$,"Rachel"; }
    if(.@town$ == "einbech.gat"){ set .@town2$,"Einbech"; }
    if(.@town$ == "einbroch.gat"){ set .@town2$,"Eibroch"; }
    if(.@town$ == "ayothaya.gat"){ set .@town2$,"Ayothaya"; }
    announce "Загадочный монстр: НУ привет дорогой игрок жаждущий подарков.",0;
    sleep2 5000;
    announce "В городе "+.@town2$+" появилься загадочный монстр убив его вы получите подарок .",0;
    sleep2 30000;
    monster .@town$,0,0,"Загадочный монстр",.@mob,1,"TBSummon::OnTBoxKilled";
    end;


    OnTBoxKilled:
    announce "Игрок "+strcharinfo(0)+" убил Загадочного Монстра и получил подарок!", bc_all;
    getitem 7227,5;
    end;

  4. или я туплю или лыжы не едят))

    ты о этом ?



    - script TBSummon -1,{
    setarray .map$,"prontera.gat","payon.gat";
    setarray .mob,1846,1845;
    set .map$, rand(0, getarraysize(.map$));
    set .mob, rand(0, getarraysize(.mob));
    oninit:
    set .map$[0];
    set .mob[0];
    end;
    onstart:
    rand(0, getarraysize(.mob)-1);
    announce "Treasure Box Summoner: I perfectly cast my summoning skills.",0;
    sleep2 5000;
    announce "15 rare Treasure Box will be spawned in 30 seconds at .",0;
    sleep2 30000;
    monster .map$,0,0,"Treasure Box",.mob,15,"TBSummon::OnTBoxKilled";
    end;
    OnTBoxKilled:
    announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
    getitem 20073,1;
    getitem 603,1;
    getitem 644,1;
    getitem 664,1;
    getitem 665,1;
    getitem 666,1;
    getitem 667,1;
    end;
    }

  5. получаеться что то такое ... при запуске включаеться анонсер ... но ни на одной карте никто не появляеться и в анонсере не показывает где ?! что не так ?


    // --- ARTHistic's Property ---
    // --- Please visit http://thdesigns.co.nr ---
    // --- Scripted By: ARTHistic ---
    // --- Do Not Revomed the Credits ---
    - script TBSummon -1,{
    setarray .map$,"prontera.gat","payon.gat";
    setarray .mob,1846,1845;
    set .map$, rand(0, getarraysize(.map$));
    set .mob, rand(0, getarraysize(.mob));
    onstart:
    announce "Treasure Box Summoner: I perfectly cast my summoning skills.",0;
    sleep2 5000;
    announce "15 rare Treasure Box will be spawned in 30 seconds at "+ .map$ +".",0;
    sleep2 30000;
    monster .map$,0,0,"Treasure Box",.mob,15,"TBSummon::OnTBoxKilled";
    end;
    OnTBoxKilled:
    announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
    getitem 20073,1;
    getitem 603,1;
    getitem 644,1;
    getitem 664,1;
    getitem 665,1;
    getitem 666,1;
    getitem 667,1;
    end;
    }

  6. как понял рандом ставиться в начале. потом .map$ .mob подменяют в срипте monster "map$",0,0,"Treasure Box",mob,15,"TBSummon::OnTBoxKilled";

    как то так ? строго не судите *(

    // --- ARTHistic's Property ---
    // --- Please visit http://thdesigns.co.nr ---
    // --- Scripted By: ARTHistic ---
    // --- Do Not Revomed the Credits ---

    - script TBSummon -1,{

    setarray .map$, "prontera.gat","payon.gat";
    setarray .mob, 1846, 1845;
    set .map$, rand(0, getarraysize(.map$));
    set .mob, rand(0, getarraysize(.mob));

    onstart:
    announce "Treasure Box Summoner: I perfectly cast my summoning skills.",0;
    sleep2 5000;
    announce "15 rare Treasure Box will be spawned in 30 seconds at Izlude.",0;
    sleep2 30000;
    monster "map$",0,0,"Treasure Box",.mob,15,"TBSummon::OnTBoxKilled";
    end;

    OnTBoxKilled:
    announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
    getitem 20073,1;
    getitem 603,1;
    getitem 644,1;
    getitem 664,1;
    getitem 665,1;
    getitem 666,1;
    getitem 667,1;
    end;
    }

    • Upvote 1
  7. Здраствуйте ...есть такой скрипт

    Как в нему сделать респам рандомного монстра и рандомной карты с оповещением анонсера на какой карте появилься монстр...

    Огромное спасибо за помощь!


    - script TBSummon -1,{
    onstart:
    announce "Treasure Box Summoner: I perfectly cast my summoning skills.",0;
    sleep2 5000;
    announce "15 rare Treasure Box will be spawned in 30 seconds at Izlude.",0;
    sleep2 30000;
    monster "izlude.gat",0,0,"Treasure Box",1845,15,"TBSummon::OnTBoxKilled";
    end;
    OnTBoxKilled:
    announce "The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!", bc_all;
    getitem 20073,1;
    getitem 603,1;
    getitem 644,1;
    getitem 664,1;
    getitem 665,1;
    getitem 666,1;
    getitem 667,1;
    end;
    }


  8. // Settings :
    // - Only required to edit the ShopSetting() Function
    // Notes : You may also add / remove Menu ( If any )
    // - Shop Currency can be either ItemID or Variable Name, but must write within Quotation Marks ( "" )
    // Ex. of Variable. -> Zeny , #CASHPOINTS , #KAFRAPOINTS , CustomVariable , #CustomVariable
    // - ERROR Message are used to show Invalid Settings in your NPC.


    // Leave this alone...
    - shop Emistry_Shop -1,512:100


    job_star,29,31,5 script Берёзка 751,{
    function ShopSettings;
    function ValidateCost;
    function CurrencyInfo;
    function ClearData;
    function ValueConvert;
    function ErrorNotice;

    mes "Магазины за разные Валюты^000000.";
    mes "^00FF00____________________________^000000";
    mes "За что будем покупать";
    next;
    // Menu Selection
    select("Магазин за PoD","Магазин за TCG Card","Магазин за VB","Магазин за кешпоинты");

    ClearData();
    ShopSettings( @menu );
    npcshopitem "Emistry_Shop",512,100;
    npcshopdelitem "Emistry_Shop",512;
    for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)
    npcshopadditem "Emistry_Shop",@ItemLists[.@i],@ItemCost[.@i];
    mes "Выбирайте товар";
    mes "^00FF00____________________________^000000";
    CurrencyInfo( @Currency$ );
    mes "^00FF00____________________________^000000";
    callshop "Emistry_Shop",1;
    npcshopattach "Emistry_Shop";
    end;


    function ShopSettings {
    switch( getarg(0) ){
    Case 1:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"7179";
    // Item ID Lists
    setarray @ItemLists[0],2306,7227;
    // Item Price
    setarray @ItemCost[0],1,1;
    break;
    Case 2:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"7227";
    // Item ID Lists
    setarray @ItemLists[0],20166,20167,20168,20169,20170,20171;
    // Item Price
    setarray @ItemCost[0],20,20,20,20,20,20;
    break;
    Case 3:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"7829";
    // Item ID Lists
    setarray @ItemLists[0],20166,20167,20168,20169,20170,20171;
    // Item Price
    setarray @ItemCost[0],20,20,20,20,20,20;
    break;
    Case 4:
    // Currency [ Item ID / Variable Name ]
    set @Currency$,"#CASHPOINTS";
    // Item ID Lists
    setarray @ItemLists[0],2306,2302,2303,2304,2305,2301;
    // Item Price
    setarray @ItemCost[0],20,22,34,445,52,641;
    break;
    // Case 4,5,6.....etc...
    default:
    ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );
    close;
    }


    if( @Currency$ == "" )
    ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );
    if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )
    ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );
    return;
    }

    function ErrorNotice {
    mes "^FF0000Ошибка^000000 - "+getarg(0);
    mes "^00FF00____________________________^000000";
    mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";
    close;
    }

    function CurrencyInfo {
    if( getitemname( atoi( getarg(0) ) ) != "null" ){
    mes "Валюта : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";
    mes "у вас есть : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000 валюты";
    }else if( getitemname( atoi( getarg(0) ) ) == "null" ){
    mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";
    mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";
    }
    return;
    }

    function ValidateCost {
    if( getitemname( atoi( getarg(0) ) ) != "null" ){
    if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;
    }else{
    if( getd( getarg(0) ) < getarg(1) ) return 1;
    }
    return 0;
    }

    function ClearData {
    set @Currency$,"";
    set @TotalCost,0;
    deletearray @bought_nameid[0],getarraysize( @bought_nameid );
    deletearray @bought_quantity[0],getarraysize( @bought_quantity );
    deletearray @ItemLists[0],getarraysize( @ItemLists );
    deletearray @ItemCost[0],getarraysize( @ItemCost );
    return;
    }

    function ValueConvert {
    set .@num, atoi(""+getarg(0));
    if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
    set .@l, getstrlen(""+.@num);
    for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
    if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
    }
    return .@num$;
    }

    OnBuyItem:
    ShopSettings( @menu );
    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)
    if( @ItemLists[@j] == @bought_nameid[@i] )
    set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );
    mes "^FF0000 ЛИСТ ПОКУПОК^000000";
    mes "^00FF00____________________________^000000";
    for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )
    mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";
    mes "^00FF00____________________________^000000";

    if( getitemname( atoi( @Currency$ ) ) != "null" )
    mes "Вам нужно оплатить : ^0000FF"+ValueConvert( @TotalCost )+" x "+getitemname( atoi( @Currency$ ) )+"^000000";
    else if( getitemname( atoi( @Currency$ ) ) == "null" ){
    mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" "+@Currency$+"^000000";
    }

    mes "^00FF00____________________________^000000";
    if( ValidateCost( @Currency$,@TotalCost ) ){
    if( getitemname( atoi( @Currency$ ) ) != "null" )
    mes "[ ^FF0000X^000000 ]У Вас недостаточно ^0000FF"+getitemname( atoi( @Currency$ ) )+"^000000";
    else{
    mes "[ ^FF0000X^000000 ] У Вас недостаточно ^0000FF"+@Currency$+"^000000";
    }
    }else{
    if( select( "^0000FFКупить^000000:Cancel" ) == 1 ){
    if( getitemname( atoi( @Currency$ ) ) != "null" )
    delitem atoi( @Currency$ ),@TotalCost;
    else{
    set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;
    }
    for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    getitem @bought_nameid[@i],@bought_quantity[@i];
    message strcharinfo(0),"Пуплено "+getarraysize( @bought_nameid )+" вещей.";
    mes "Спасибо за покупку.";
    }
    }
    ClearData();
    close;

    }

    Вот другой магазин!

    • Upvote 2
  9. Зародилься второй вопрос ... как вместо того чтобы НПЦ показывал ИД... он показывал название вещи !?


    //===== Athena Script =====================================
    //= Stop the Clock
    //===== By ================================================
    //= Tom94
    //===== Version ===========================================
    //= 1.0
    //=========================================================
    //= 1.0 - First release
    //===== Compatible With ===================================
    //= TXT and SQL. No idea which revisions xP
    //===== Description =======================================
    //= A minigame
    //=========================================================
    prontera,164,180,1 script Время 712,{
    if(.game == 1 && stopped != 1) {
    set stopped, 1;
    set @stopped, .i;
    message strcharinfo(0), "Вы остановили часы на "+@stopped+".";
    if(.lowest > @stopped) {
    set .lowest, @stopped;
    set .winner$, strcharinfo(0);
    }
    end;
    }
    else if(.game == 1) {
    message strcharinfo(0), "Вы уже остановили часы.";
    end;
    }
    set .name$, "[^ff0000Время^000000]";
    set .menu$, "Время:Информация:Подарок:Выйти";

    if(strcharinfo(0) == .winner$) {
    set stopped, 0;
    mes .name$;
    mes "Ваш подарок.";
    mes "Подарок -ID-: ^ff0000"+$prize_id+"^000000.";
    mes "Подарок -ID-: ^ff0000"+$prize_id($betitemid)+"^000000.";
    mes "Количество: ^ff0000"+$prize_amount+"^000000.";
    getitem $prize_id, $prize_amount;
    set .winner$, "";
    close;
    }
    if(stopped == 1) {
    set stopped, 0;
    mes .name$;
    mes "Вы зарегистрировали чара для участие в следующем раунде.";
    close;
    }
    if(getgmlevel() > 60) set .menu$, .menu$ + ":Начать игру:Установить подарок";
    mes .name$;
    mes "Добро пожаловать в ^ff0000игру Время^000000 .";
    switch(select(.menu$)) {
    case 1:
    mes "^ff0000Игра Время^000000 стартует каждого дня в 18:00. ";
    close;
    case 2:
    mes "^ff0000Время^000000 игра где вы должны нажимать на меня";
    mes "и кто будет ближе к 0 тот и победит.";
    next;
    mes .name$;
    mes "Точное время старта игры 17:59:50 -10 секунд до начала 18:00.";
    mes "В это время я отщитываю от 1000 до 0.";
    next;
    mes .name$;
    mes "Для победы, ты должен быть ближе к 0 покрайне мере ниже 50.";
    next;
    mes .name$;
    mes "Победитель получает подарок.";
    close;
    case 3:
    mes "Подарок: -ID- ^ff0000"+$prize_id+"^000000.";
    mes "Количество: ^ff0000"+$prize_amount+"^000000.";
    close;
    case 4:
    close;
    case 5:
    sleep2 100;
    close2;
    goto l_start;
    end;
    case 6:
    mes "Ведите ИД подарка:";
    input $prize_id;
    next;
    mes .name$;
    mes "Ведите количество подарков , которые получит победитель:";
    input $prize_amount;
    next;
    mes .name$;
    mes "Подарок -ID-: ^ff0000"+$prize_id+"^000000.";
    mes "Количество: ^ff0000"+$prize_amount+"^000000.";
    close;
    }
    OnClock1759:
    l_start:
    set .winner$, "";
    set .game, 1;
    set .lowest, 1000;
    for(set .i, 1000; .i > 300;set .i, .i - 100) {
    announce "В пронтере стартовала игра Время.",bc_blue;
    announce ":: "+.i+" ::",bc_blue|bc_area;
    misceffect 377;
    sleep2 1000;
    }
    for(set .i, 300; .i > 50;set .i, .i - 10) {
    announce ":: "+.i+" ::",bc_blue|bc_area;
    misceffect 377;
    sleep2 100;
    }
    for(set .i, 50; .i > 0;set .i, .i - 1) {
    announce ":: "+.i+" ::",bc_blue|bc_area;
    misceffect 377;
    sleep2 10;
    }
    set .game, 0;
    if(.winner$ == "") {
    announce "Никто не решилься остановить часы.Так что победителя нет ((.",bc_blue;
    end;
    }
    announce .winner$+" выиграл игру остановить часы.. Часы были остановлены в "+.lowest+".",bc_blue;
    sleep2 2500;
    announce .winner$+", нажмите на мне для получение подарка.",bc_blue;
    sleep2 2500;
    announce "Для участия в игре , нажмите на мне в следующий раз перед началом игры, юхууу.",bc_blue;
    end;
    }

  10. Логи выдают

    [Debug]: Data: string value="Так и не нашелься суперник или вышло время, и к сожалению дуель была отменена"
    [Debug]: Data: number value=17
    [Debug]: Source (NPC): Duel Gambling at prontera (150,177)

    всё что происходить ... функция не происходит и в чат сообщение не выбивает

  11. Друзя помогите разобраться....

    есть скрипт дуели ! Работает почти хорошо .. но есть проблема которую не могу решить ...

    в скрипте есть такой кусочек

    который должен отключать запрос на дуель по выходу времени ! но ничего не происходит.. можете подсказать почему ?(

    //If 5 Minutes passed after the challenger registred and no one accepts it.
    OnTimer1:
    announce "Так и не нашелься суперник или вышло время, и к сожалению дуель была отменена .",bc_map|bc_blue;
    if((.char$ != "") && (attachrid (getcharid(3,.char$)))) {
    set Zeny,Zeny+(.zeny/2);
    set dueling,0;
    }
    if((.char2$ != "") && (attachrid (getcharid(3,.char2$)))) {
    set Zeny,Zeny+(.zeny/2);
    set dueling,0;
    }
    // detachrid;
    set .char$,"";
    set .char2$,"";
    set .gambling,0;
    set .waiting,0;
    set .zeny,0;
    stopnpctimer;
    end;

    вот скрипт

    //===== eAthena Script ======================================================================
    //= Duel Gambling
    //===== Original By =========================================================================
    //= Information
    //===== Edited By =========================================================================
    //= Kaushik
    //===== Current Version: ====================================================================
    //= 1.4 = Fixed everything by Kaushik
    //= 1.3 = Added Comments and some Functions
    //= 1.2 - Fix exploitable bug
    //= 1.1 - Small Fix
    //= 1.0 - Script Release
    //===== Compatible With: ====================================================================
    //= Tested in TXT Revision 12168 Trunk
    //===== Description: ========================================================================
    //= You have to set the duel_time_interval to 0
    //===== Comments and Credits ================================================================
    //= Thanks to Ruroniarc,AnnieRuru,David Boy and Yhn that help me on getitemname2 o.O(getitemname2?)
    //= Thanks to my friend, Joey for the typo things
    //=
    //===========================================================================================
    prontera,150,177,4 script Дуель на деньги 953,{
    set @npcname$,"[Менеджер дуели]";

    L_mm:
    mes @npcname$;
    //If already a duel is going on
    if(.gambling) {
    mes "Дуель стартовала, пожалуйста дождитесь окончание";
    close;
    }

    mes callfunc("F_Hi") + " " + strcharinfo(0);
    //If the challenger and the one accepting the duel have registred and the duel is ready to start
    if(.char$ == strcharinfo(0) && .char2$ != "") {
    mes "^0000FF" +.char2$+ "^000000 ждет Вас для начала дуели!";
    if(.zeny) mes "Ставка дуели ^FF0000" +.zeny+ "^000000 zeny.";
    if(.item) mes "The player duel for a ^FF0000" + callfunc("F_getitemname2",.item2[0],.item2[1],.item2[2],.item2[3],.item2[4],.item2[5]) + "^000000";
    mes "Что бы Вы хотели?";
    next;
    menu "Начать дуель",L_sduel,"Закрыть дуель",L_cduel;
    }
    //If the one accept the duel is going to talk to the npc
    if(.waiting) {
    mes "Дуэль будет начата в ближайшее время!";
    close;
    }
    //If the challenger has registred, speaks again to the npc and no one accepted it
    if(.char$ == strcharinfo(0)) {
    mes "Пожалуйста, подождите вашего соперника.";
    next;
    menu "Закрыть дуель",L_cduel,"Я подожду",-;
    close;
    }
    //If a challenger has registred, another person speaks to the npc and no one has accepted before
    if(.char$ != "") {
    mes "Игрок ждет на поединок";
    mes "Что бы Вы хотели?";
    next;
    menu "Игрок и информация дуели",-,"Отправить приглашение на дуэль игроку",L_iduel,"Дуель на деньги?",L_info;
    mes @npcname$;
    mes "Игрок который ждет поединок ^0000FF"+.char$+"^000000";
    if(.zeny) mes "Дуелт за ^FF0000" +.zeny+ "^000000 зени.";
    if(.item) mes "Дуель за ^FF0000" + callfunc("F_getitemname2",.item[0],.item[1],.item[2],.item[3],.item[4],.item[5]) + "^000000";
    next;
    goto L_mm;
    }
    //If no challenger is registred.
    else {
    mes "Ни один игрок не ждет дуели за деньги в настоящее время";
    mes "Что бы вы хотели сделать?";
    next;
    menu "Начать дуель",-,"Дуель за деньги?",L_info;
    set .zeny,callfunc("F_PDZeny",0);
    Initnpctimer;
    set .char$,strcharinfo(0);
    mes @npcname$;
    mes "Пожалуйста подождите соперника.";
    announce .char$+ " ждет азартного игрока который отправиться с ним на дуель со ставкой " +.zeny+ " зеней " ,bc_map|bc_blue;
    close;
    }

    //This party will run after someone accepted the challenge of a challenger
    L_iduel:
    set .zeny,callfunc("F_PDZeny",.zeny);
    set .char2$,strcharinfo(0);
    set .waiting,1;
    mes @npcname$;
    mes "Пожалусто подождите я проинформирую вашого соперника.";
    announce .char$+ ", у вас есть соперник!",bc_map|bc_blue;
    close;

    //After both players registred and the challenger starts the duel.
    L_sduel:
    mes @npcname$;
    mes "Мы начинаем дуель.";
    close2;
    attachrid getcharid(3,.char2$);
    warp "pvp_n_1-1",90,50;
    attachrid getcharid(3,.char$);
    set dueling,1;
    warp "pvp_n_1-1",110,50;
    atcommand "@duel " + .char2$;
    attachrid getcharid(3,.char2$);
    atcommand "@accept";
    set dueling,1;
    // detachrid;
    set .gambling,1;
    announce .char$+ " начал дуель с " +.char2$+ "!",bc_map|bc_blue;
    end;

    //If only the challenger is registred and cancels or if both registred and the challenger cancels the duel.
    L_cduel:
    announce "Дуель была отменена игроком " +.char$,bc_map|bc_blue;
    mes @npcname$;
    mes "Очень жаль, " + callfunc("F_Bye");
    set dueling,0;
    set Zeny,Zeny+(.zeny/2);
    close2;
    if((.char2$ != "") && (attachrid (getcharid(3,.char2$)))) {
    attachrid getcharid(3,.char2$);
    set Zeny,Zeny+(.zeny/2);
    set dueling,0;
    // detachrid;
    }
    set .char$,"";
    set .char2$,"";
    set .gambling,0;
    set .waiting,0;
    set .zeny,0;
    end;

    //If you click on information for the duel.
    L_info:
    mes @npcname$;
    mes "Я собираю двох игроков,";
    mes "которые будуть биться на смерть,";
    next;
    mes @npcname$;
    mes "Перед началом дуели игрок указывает суму,";
    mes "за которую игроки будут сражаться.";
    mes "Победитель получат всё.";
    next;
    mes @npcname$;
    mes "Максимальное время ожидание дуали и дуелянта 5 минут.";
    next;
    goto L_mm;

    //If 5 Minutes passed after the challenger registred and no one accepts it.
    OnTimer1:
    announce "Так и не нашелься суперник или вышло время, и к сожалению дуель была отменена .",bc_map|bc_blue;
    if((.char$ != "") && (attachrid (getcharid(3,.char$)))) {
    set Zeny,Zeny+(.zeny/2);
    set dueling,0;
    }
    if((.char2$ != "") && (attachrid (getcharid(3,.char2$)))) {
    set Zeny,Zeny+(.zeny/2);
    set dueling,0;
    }
    // detachrid;
    set .char$,"";
    set .char2$,"";
    set .gambling,0;
    set .waiting,0;
    set .zeny,0;
    stopnpctimer;
    end;

    //When a player kills his oppenent.
    OnPCKillEvent:
    if(!dueling) end;
    set Zeny,Zeny+.zeny;
    atcommand "@leave";
    announce strcharinfo(0)+" выиграл в дуели!!! Поздравляем!!",bc_map|bc_blue;
    warp "prontera",158,184;
    set dueling,0;
    attachrid killedrid;
    set dueling,0;
    // detachrid;
    set .char$,"";
    set .char2$,"";
    set .gambling,0;
    set .waiting,0;
    set .zeny,0;
    set .waiting,0;
    warp "prontera",158,184;
    end;

    //When a player dies.. (Just incase he doesnt get killed by his oppenent)
    OnPCDieEvent:
    if(!dueling) end;
    if (killerrid == 0)
    {
    announce "Дуель была завершена потому что игрок "+strcharinfo(0)+" умер", bc_map|bc_blue;
    if (strcharinfo(0) == .char$)
    {
    attachrid getcharid(3,.char2$);
    set Zeny,Zeny+.zeny/2;
    }
    if (strcharinfo(0) == .char2$)
    {
    attachrid getcharid(3,.char$);
    set Zeny,Zeny+.zeny/2;
    }
    atcommand "@leave";
    set dueling,0;
    // detachrid;
    set .char$,"";
    set .char2$,"";
    set .gambling,0;
    set .waiting,0;
    set .zeny,0;
    set .waiting,0;
    end;
    }
    }
    //Function for gambling for Zeny
    Function script F_PDZeny {
    If(!getarg(0)) {
    mes @npcname$;
    mes "Какую ставку вы желаете установить?";
    next;
    input .@zeny;
    If(.@zeny > Zeny || !.@zeny) {
    mes "У вас недостаточно денег на ставку , пожалуйста приходите когда соверете нужную суму!";
    mes "Или просто измените на более низкую!";
    close;
    }
    set Zeny,Zeny-.@zeny;
    return .@zeny;
    }
    If(getarg(0) > Zeny) {
    mes "У Вас недостаточно денег на дуель , прихожите когда соберете достаточную суму !";
    close;
    }
    else
    set Zeny,Zeny-getarg(0);
    set .@zeny,getarg(0)*2;
    return .@zeny;
    warp "prontera",158,184;
    }

  12. Мож кому нужен =)


    prontera,145,173,5 script Хелперы онлайн 982,{
    mes "Хелперов онлайн : ^FF0000"+getarraysize( .GM_Name$ )+"^000000 ";
    mes "^0000FF***********************************^000000";
    for( set .@i,0; .@i < getarraysize( .GM_Name$ ) ; set .@i,.@i + 1 ){
    getmapxy( .Map$,.x,.y,0,.GM_Name$[.@i] );
    mes " ^0000FF"+.GM_Name$[.@i]+"^000000";
    mes "^0000FF***********************************^000000";
    }
    close;
    OnInit:
    set .MinGMLevel,60; // мин.Уровень который показывает
    end;
    OnPCLoginEvent:
    if( getgmlevel() < .MinGMLevel ) end;
    set .GM_Name$[ getarraysize( .GM_Name$ ) ],strcharinfo(0);

    end;
    OnPCLogoutEvent:
    if( getgmlevel() < .MinGMLevel ) end;
    for( set .@i,0; .@i < getarraysize( .GM_Name$ ) ; set .@i,.@i + 1 ){
    if( strcharinfo(0) != .GM_Name$[.@i] ) continue;
    deletearray .GM_Name$[.@i],1;
    end;
    }
    end;
    }

    • Upvote 3
    • Downvote 3
×
×
  • Создать...
Яндекс.Метрика