begin A_sergey_scripts short win ;выигрыш short stav ;ставка short sas short button float timer Short asa set win to 8 if ( Menumode == 1 ) return endif If ( OnActivate == 1 ) ;активирован if ( con == 0 ) MessageBox "Вас приветствует кнопка судьбы PCName. Хотите ли вы поучавствовать в нашей игре?", "Да", "Нет" set con to 1 endif if ( con == 1 ) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0 ) MessageBox "Делайте ставку" set con to 2 else MessageBox "Прощайте" set con to 0 endif endif if ( con == 2 ) MessageBox "Сколько вы хотите поставить", "0 монет", "1 монету", "100 монет", "1000 монет" set con to 3 endif if ( con == 3 ) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0 ) MessageBox "Вы поставили 0 монет. Вы неможете играть так как вы ничего непоставили на кон." set con to 2 elseif ( button == 1 ) MessageBox "Вы поставили на кон 1 монету." set stav to 4 player->removeitem "gold_001" 1 elseif ( button == 2) MessageBox "Вы поставили на кон 100 монет" player-> removeitem "gold_100" 1 set stav to 4 elseif ( button == 3) MessageBox "Вы поставили на кон 1000 монет" set stav to 4 player-> removeitem "gold_100" 10 endif endif endif endif endif endif if ( stav == 4 ) set win to Random, 8 endif if ( win == 0 ) MessageBox "Поздравляю вы выиграли 1 монету !" player-> additem "gold_001" 1 set sas to 1 endif if ( win == 1 ) player->additem "Gold_100" 20 MessageBox "Поздравляю вы выиграли 2000 монет" set sas to 1 endif if ( win == 2 ) player->AddSpell, "a_froc" MessageBox "О-о-о-о...Вам неповезло и вы проиграли" set sas to 2 endif if ( win == 3 ) player->additem "azura's servant" 1 ; MessageBox "Вы проиграли! Но как утешиетльный приз получаете щит Азуры" set sas to 1 endif if ( win == 4 ) player->Additem "misc_com_bottle_02" 10 MessageBox "Вы проиграли! Но как утешиетльный приз получаете 10 бутылок" set sas to 1 endif if ( win == 5 ) player->additem "misc_com_bucket_boe_UNI" 1 MessageBox "Вы проиграли! Но как утешиетльный приз получаете ведро" set sas to 1 endif if ( win == 6 ) player-> removeitem "Gold_100" 1 MessageBox "С вас штраф 100 монет" set sas to 1 endif if ( win == 7 ) MessageBox "Вы выиграли бесплатный тур в один конец до ближайщей тюрьмы.Поздравляю вас !" Player -> GoToJail set sas to 1 endif if ( sas == 2 ) set timer to ( timer + GetSecondsPassed ) if timer > 30 player->RemoveSpell, "a_Froc" endif endif if ( sas == 1 ) if ( asa == 0 ) MessageBox "Вы поиграли в лотарею Кнопка Судьбы" set con to 10 startscript Finish_lottery set asa to 1 endif endif Endif end Finish_lottery if ( con == 10 ) set con to 0 stopscript Finish_lottery end