Menorra Опубликовано 22 октября, 2008 Жалоба Поделиться Опубликовано 22 октября, 2008 Такие дела: есть вот этот мод. В нём можно купить 2 ванны))Перевожу другой мод (Вонючки называется ), позволяющий мыться. В т.ч. в ванных. Когда моешься, слетают негативные эффекты немытости тоже из этого мода.Есть объединяющий патч, который позволяет мыться в ванных первого мода так, чтобы слетали эффекты из второго. Сделано это незначительным добавлением в скрипт. Но.В Вонючках перед тем, как снимутся все негативные эффекты, вылазит менюшка, в которой надо выбрать с каким мылом мыться (да, всё непросто)). Если в инвентаре такого мыла нет, вылазит соответствующий мэсседжбокс. Если мыло есть, снимаются плохие эффекты и прибавляются хорошие (зависит от мыла) и тоже появляется мэсседжбокс.В патче же просто снимаюся эффекты, без выбора мыла, да и без наличия мыла в инвентаре.Короче, надо объединить толково скрипты)) А я не умею... Скрипт с выбором мыла из Вонючек: Begin _EG_bathuse short button short EG_tag if (OnActivate== 1) set bathuse_var to 1 if (EG_bathon==1) MessageBox "Хотите помыться?" "Нет" "Использовать Бархатные ручки" "Использовать Звездный лед" "Использовать Луноцвет" "Использовать Морской бриз" "Использовать Божественное мыло" "Использовать Океанскую глубь" "Использовать Полуночный мускус" "Использовать Решимость" endif endif if ( bathuse_var==1 ) set button to GetButtonPressed if (button==0) Set bathuse_var to 0 Activate endif if (button==1) Set EG_tag to 1 endif if (button==2) Set EG_tag to 2 endif if (button==3) Set EG_tag to 3 endif if (button==4) Set EG_tag to 4 endif if (button==5) Set EG_tag to 5 endif if (button==6) Set EG_tag to 6 endif if (button==7) Set EG_tag to 7 endif if (button==8) Set EG_tag to 8 endif if (EG_tag==1) if ( Player->GetItemCount, "_EG_soapinv_01" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_01" 1 player->AddSpell, "EG_soap_01" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if (EG_tag==2) if ( Player->GetItemCount, "_EG_soapinv_02" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_02" 1 player->AddSpell, "EG_soap_02" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==3) if ( Player->GetItemCount, "_EG_soapinv_03" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_03" 1 player->AddSpell, "EG_soap_03" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==4) if ( Player->GetItemCount, "_EG_soapinv_04" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_04" 1 player->AddSpell, "EG_soap_04" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==5) if ( Player->GetItemCount, "_EG_soapinv_05" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_05" 1 player->AddSpell, "EG_soap_05" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==6) if ( Player->GetItemCount, "_EG_soapinv_06" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_06" 1 player->AddSpell, "EG_soap_06" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==7) if ( Player->GetItemCount, "_EG_soapinv_07" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_07" 1 player->AddSpell, "EG_soap_07" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==8) if ( Player->GetItemCount, "_EG_soapinv_08" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_08" 1 player->AddSpell, "EG_soap_08" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif endif end Скрипт, который рулит ванной из первого мода: begin KO_Bath_Tub_Scripts Short controlvar Short button Short activate_menu Short increments Short angle_increments Short lockit float currxangle float curryangle float currzangle float currxpos float currypos float startxangle float startyangle float startzangle float currzpos float startxpos float startypos float startzpos short counter ;######################################################## ; If we're outside, there's no need for this script at all; commented for outside furniture ;######################################################## ;If (GetInterior == 0) ; return ;endif ;######################################################## ; This code makes sure that the object acts like a regular item ; that you can pick up and place in your inventory while ; in menu mode ;######################################################## if ( menumode == 1 ) if (OnActivate == 1) Activate set lockit to 0 endif return endif ;######################################################## ; If controlvar = -1 means the player selected the "Take" option ; in the menu and lets you pick up the item ;######################################################## if (controlvar == -1) Activate set controlvar to 0 set lockit to 0 return endif ;####################################################### ;Locks the painting position back in place ;Fixes a problem with the positioned object going back to where ;you dropped it after you load a savegame ;There's no way to know when the game is loaded that I know. ;I set the variable "lockit" to 1 whenever the painting is positioned ;When it is set to 1 this piece of code checks ;to see if the object is out of place and puts it back where it's ;supposed to be. ;####################################################### if (lockit == 1) if ( GetPos, z != currzpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, y != currypos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, x != currxpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return endif endif ;################################################################ ; End of Lock check ;################################################################ ;######################### Starting Menu ############################ if ( OnActivate == 1 ) ;if (GetInterior == 0) ; Activate ; set lockit to 0 ; return ;endif set increments to 1 set angle_increments to 1 set activate_menu to 1 set controlvar to 1 set startxpos to GetPos, x set startypos to GetPos, y set startzpos to GetPos, z set startxangle to GetAngle, x set startyangle to GetAngle, y set startzangle to GetAngle, z set currxpos to GetPos, x set currypos to GetPos, y set currzpos to GetPos, z elseif (controlvar ==0) return set lockit to 0 endif if (activate_menu == 1) MessageBox "Выберите действие:", "Взять", "Вращать", "Двигать", "Купаться", "Готово" set activate_menu to 0 set lockit to 0 endif if (controlvar ==1) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0) set controlvar to -1 set activate_menu to 0 return elseif ( button == 1) set controlvar to 2 set activate_menu to 2 elseif ( button == 2) set controlvar to 3 set activate_menu to 3 elseif ( button == 3 ) StartScript Remove_Bath_Effects Messagebox "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return else set controlvar to 0 set activate_menu to 0 set lockit to 1 return endif endif ;######################## Rotation Menu ################################### if (activate_menu ==2) if (angle_increments == 1) MessageBox "Меню вращения", "Вращать на 1 градус", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 5) MessageBox "Меню вращения", "Вращать на 5 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 45) MessageBox "Меню вращения", "Вращать на 45 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" else MessageBox "Меню вращения", "Вращать на 90 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 2) set currxangle to GetAngle, x set curryangle to GetAngle, y set currzangle to GetAngle, z set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (angle_increments == 1) set angle_increments to 5 elseif (angle_increments == 5) set angle_increments to 45 elseif (angle_increments == 45) set angle_increments to 90 else set angle_increments to 1 endif set activate_menu to 2 return elseif (button == 1) set currxangle to (currxangle + angle_increments) if (currxangle >= 360) set currxangle to (currxangle - 360) endif SetAngle, x, currxangle set activate_menu to 2 return elseif (button == 2) set curryangle to (curryangle + angle_increments) if (curryangle >= 360) set curryangle to (curryangle - 360) endif SetAngle, y, curryangle set activate_menu to 2 return elseif (button == 3) set currzangle to (currzangle + angle_increments) if (currzangle >= 360) set currzangle to (currzangle - 360) endif SetAngle, z, currzangle set activate_menu to 2 return elseif (button == 4) SetAngle, x, 0 SetAngle, y, 0 SetAngle, z, 0 set activate_menu to 2 return elseif (button == 5) SetAngle, x, startxangle SetAngle, y, startyangle SetAngle, z, startzangle set activate_menu to 2 return else set activate_menu to 1 set controlvar to 1 return endif endif if (lockit == 1) if ( counter < 20 ) Set counter to ( counter + 1 ) else Set counter to 0 if ( GetPos, z == currzpos ) if ( GetPos, y == currypos ) if ( GetPos, x == currxpos ) if ( GetAngle, z == currzangle ) if ( GetAngle, y == curryangle ) if ( GetAngle, x == currxangle ) return endif endif endif endif endif endif SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos SetAngle, x, currxangle SetAngle, y, curryangle SetAngle, z, currzangle endif endif ;##################### Position Menu ####################### if (activate_menu ==3) if (increments == 1) MessageBox "Меню движения", "Двигать на 1 пункт", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" elseif (increments == 5) MessageBox "Меню движения", "Двигать на 5 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" else MessageBox "Меню движения", "Двигать на 10 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 3) set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (increments == 1) set increments to 5 elseif (increments == 5) set increments to 10 else set increments to 1 endif set activate_menu to 3 return elseif (button == 1) set currxpos to (currxpos + increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 2) set currxpos to (currxpos - increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 3) set currypos to (currypos + increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 4) set currypos to (currypos - increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 5) set currzpos to (currzpos + increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 6) set currzpos to (currzpos - increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 7) SetPos, x, startxpos SetPos, y, startypos SetPos, z, startzpos set currxpos to startxpos set currypos to startypos set currzpos to startzpos set activate_menu to 3 return else set activate_menu to 1 set controlvar to 1 return endif endif End KO_Bath_Tub_Scripts Первый надо запихать во второй так, чтобы он срабатывал при нажатии кнопки "Купаться". Помогите, люди добрые, сами мы не местные... со скриптами не дружим. Помогите кто чем сможет Ссылка на комментарий Поделиться на другие сайты Поделиться
Smokingbird Опубликовано 22 октября, 2008 Жалоба Поделиться Опубликовано 22 октября, 2008 (изменено) begin KO_Bath_Tub_Scripts Short controlvar Short button Short activate_menu Short increments Short angle_increments Short lockit float currxangle float curryangle float currzangle float currxpos float currypos float startxangle float startyangle float startzangle float currzpos float startxpos float startypos float startzpos short counter short EG_tag short bathuse_var ;######################################################## ; If we're outside, there's no need for this script at all; commented for outside furniture ;######################################################## ;If (GetInterior == 0) ; return ;endif ;######################################################## ; This code makes sure that the object acts like a regular item ; that you can pick up and place in your inventory while ; in menu mode ;######################################################## if ( menumode == 1 ) if (OnActivate == 1) Activate set lockit to 0 endif return endif ;######################################################## ; If controlvar = -1 means the player selected the "Take" option ; in the menu and lets you pick up the item ;######################################################## if (controlvar == -1) Activate set controlvar to 0 set lockit to 0 return endif ;####################################################### ;Locks the painting position back in place ;Fixes a problem with the positioned object going back to where ;you dropped it after you load a savegame ;There's no way to know when the game is loaded that I know. ;I set the variable "lockit" to 1 whenever the painting is positioned ;When it is set to 1 this piece of code checks ;to see if the object is out of place and puts it back where it's ;supposed to be. ;####################################################### if (lockit == 1) if ( GetPos, z != currzpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, y != currypos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, x != currxpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return endif endif ;################################################################ ; End of Lock check ;################################################################ ;######################### Starting Menu ############################ if ( OnActivate == 1 ) ;if (GetInterior == 0) ; Activate ; set lockit to 0 ; return ;endif set increments to 1 set angle_increments to 1 set activate_menu to 1 set controlvar to 1 set startxpos to GetPos, x set startypos to GetPos, y set startzpos to GetPos, z set startxangle to GetAngle, x set startyangle to GetAngle, y set startzangle to GetAngle, z set currxpos to GetPos, x set currypos to GetPos, y set currzpos to GetPos, z elseif (controlvar ==0) return set lockit to 0 endif if (activate_menu == 1) MessageBox "Выберите действие:", "Взять", "Вращать", "Двигать", "Купаться", "Готово" set activate_menu to 0 set lockit to 0 endif if (controlvar ==1) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0) set controlvar to -1 set activate_menu to 0 return elseif ( button == 1) set controlvar to 2 set activate_menu to 2 elseif ( button == 2) set controlvar to 3 set activate_menu to 3 elseif ( button == 3 ) if ( bathuse_var == 0 ) set bathuse_var to 1 MessageBox "Хотите помыться?" "Нет" "Использовать Бархатные ручки" "Использовать Звездный лед" "Использовать Луноцвет" "Использовать Морской бриз" "Использовать Божественное мыло" "Использовать Океанскую глубь" "Использовать Полуночный мускус" "Использовать Решимость" endif else set controlvar to 0 set activate_menu to 0 set lockit to 1 return endif endif if ( bathuse_var==1 ) set button to GetButtonPressed if (button==0) Set bathuse_var to 0 Activate endif if (button==1) Set EG_tag to 1 endif if (button==2) Set EG_tag to 2 endif if (button==3) Set EG_tag to 3 endif if (button==4) Set EG_tag to 4 endif if (button==5) Set EG_tag to 5 endif if (button==6) Set EG_tag to 6 endif if (button==7) Set EG_tag to 7 endif if (button==8) Set EG_tag to 8 endif if (EG_tag==1) if ( Player->GetItemCount, "_EG_soapinv_01" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_01" 1 player->AddSpell, "EG_soap_01" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 [b]Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1[/b] return endif if (EG_tag==2) if ( Player->GetItemCount, "_EG_soapinv_02" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_02" 1 player->AddSpell, "EG_soap_02" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==3) if ( Player->GetItemCount, "_EG_soapinv_03" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_03" 1 player->AddSpell, "EG_soap_03" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==4) if ( Player->GetItemCount, "_EG_soapinv_04" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_04" 1 player->AddSpell, "EG_soap_04" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==5) if ( Player->GetItemCount, "_EG_soapinv_05" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_05" 1 player->AddSpell, "EG_soap_05" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==6) if ( Player->GetItemCount, "_EG_soapinv_06" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_06" 1 player->AddSpell, "EG_soap_06" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==7) if ( Player->GetItemCount, "_EG_soapinv_07" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_07" 1 player->AddSpell, "EG_soap_07" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif if(EG_tag==8) if ( Player->GetItemCount, "_EG_soapinv_08" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_08" 1 player->AddSpell, "EG_soap_08" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return endif endif ;######################## Rotation Menu ################################### if (activate_menu ==2) if (angle_increments == 1) MessageBox "Меню вращения", "Вращать на 1 градус", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 5) MessageBox "Меню вращения", "Вращать на 5 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 45) MessageBox "Меню вращения", "Вращать на 45 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" else MessageBox "Меню вращения", "Вращать на 90 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 2) set currxangle to GetAngle, x set curryangle to GetAngle, y set currzangle to GetAngle, z set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (angle_increments == 1) set angle_increments to 5 elseif (angle_increments == 5) set angle_increments to 45 elseif (angle_increments == 45) set angle_increments to 90 else set angle_increments to 1 endif set activate_menu to 2 return elseif (button == 1) set currxangle to (currxangle + angle_increments) if (currxangle >= 360) set currxangle to (currxangle - 360) endif SetAngle, x, currxangle set activate_menu to 2 return elseif (button == 2) set curryangle to (curryangle + angle_increments) if (curryangle >= 360) set curryangle to (curryangle - 360) endif SetAngle, y, curryangle set activate_menu to 2 return elseif (button == 3) set currzangle to (currzangle + angle_increments) if (currzangle >= 360) set currzangle to (currzangle - 360) endif SetAngle, z, currzangle set activate_menu to 2 return elseif (button == 4) SetAngle, x, 0 SetAngle, y, 0 SetAngle, z, 0 set activate_menu to 2 return elseif (button == 5) SetAngle, x, startxangle SetAngle, y, startyangle SetAngle, z, startzangle set activate_menu to 2 return else set activate_menu to 1 set controlvar to 1 return endif endif if (lockit == 1) if ( counter < 20 ) Set counter to ( counter + 1 ) else Set counter to 0 if ( GetPos, z == currzpos ) if ( GetPos, y == currypos ) if ( GetPos, x == currxpos ) if ( GetAngle, z == currzangle ) if ( GetAngle, y == curryangle ) if ( GetAngle, x == currxangle ) return endif endif endif endif endif endif SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos SetAngle, x, currxangle SetAngle, y, curryangle SetAngle, z, currzangle endif endif ;##################### Position Menu ####################### if (activate_menu ==3) if (increments == 1) MessageBox "Меню движения", "Двигать на 1 пункт", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" elseif (increments == 5) MessageBox "Меню движения", "Двигать на 5 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" else MessageBox "Меню движения", "Двигать на 10 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 3) set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (increments == 1) set increments to 5 elseif (increments == 5) set increments to 10 else set increments to 1 endif set activate_menu to 3 return elseif (button == 1) set currxpos to (currxpos + increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 2) set currxpos to (currxpos - increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 3) set currypos to (currypos + increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 4) set currypos to (currypos - increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 5) set currzpos to (currzpos + increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 6) set currzpos to (currzpos - increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 7) SetPos, x, startxpos SetPos, y, startypos SetPos, z, startzpos set currxpos to startxpos set currypos to startypos set currzpos to startzpos set activate_menu to 3 return else set activate_menu to 1 set controlvar to 1 return endif endif End KO_Bath_Tub_Scripts попробуй Изменено 22 октября, 2008 пользователем Smokingbird Ссылка на комментарий Поделиться на другие сайты Поделиться
Don Condor Опубликовано 22 октября, 2008 Жалоба Поделиться Опубликовано 22 октября, 2008 Если ничего не напутал, то...begin KO_Bath_Tub_Scripts Short controlvar Short button Short activate_menu Short increments Short angle_increments Short lockit float currxangle float curryangle float currzangle float currxpos float currypos float startxangle float startyangle float startzangle float currzpos float startxpos float startypos float startzpos short counter short button short EG_tag ;######################################################## ; If we're outside, there's no need for this script at all; commented for outside furniture ;######################################################## ;If (GetInterior == 0) ; return ;endif ;######################################################## ; This code makes sure that the object acts like a regular item ; that you can pick up and place in your inventory while ; in menu mode ;######################################################## if ( menumode == 1 ) if (OnActivate == 1) Activate set lockit to 0 endif return endif ;######################################################## ; If controlvar = -1 means the player selected the "Take" option ; in the menu and lets you pick up the item ;######################################################## if (controlvar == -1) Activate set controlvar to 0 set lockit to 0 return endif ;####################################################### ;Locks the painting position back in place ;Fixes a problem with the positioned object going back to where ;you dropped it after you load a savegame ;There's no way to know when the game is loaded that I know. ;I set the variable "lockit" to 1 whenever the painting is positioned ;When it is set to 1 this piece of code checks ;to see if the object is out of place and puts it back where it's ;supposed to be. ;####################################################### if (lockit == 1) if ( GetPos, z != currzpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, y != currypos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, x != currxpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return endif endif ;################################################################ ; End of Lock check ;################################################################ ;######################### Starting Menu ############################ if ( OnActivate == 1 ) ;if (GetInterior == 0) ; Activate ; set lockit to 0 ; return ;endif set increments to 1 set angle_increments to 1 set activate_menu to 1 set controlvar to 1 set startxpos to GetPos, x set startypos to GetPos, y set startzpos to GetPos, z set startxangle to GetAngle, x set startyangle to GetAngle, y set startzangle to GetAngle, z set currxpos to GetPos, x set currypos to GetPos, y set currzpos to GetPos, z elseif (controlvar ==0) return set lockit to 0 endif if (activate_menu == 1) MessageBox "Выберите действие:", "Взять", "Вращать", "Двигать", "Купаться", "Готово" set activate_menu to 0 set lockit to 0 endif if (controlvar ==1) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0) set controlvar to -1 set activate_menu to 0 return elseif ( button == 1) set controlvar to 2 set activate_menu to 2 elseif ( button == 2) set controlvar to 3 set activate_menu to 3 elseif ( button == 3 ) set bathuse_var to 1 if (EG_bathon==1) MessageBox "Хотите помыться?" "Нет" "Использовать Бархатные ручки" "Использовать Звездный лед" "Использовать Луноцвет" "Использовать Морской бриз" "Использовать Божественное мыло" "Использовать Океанскую глубь" "Использовать Полуночный мускус" "Использовать Решимость" endif if ( bathuse_var==1 ) set button to GetButtonPressed if (button==0) Set bathuse_var to 0 Activate endif if (button==1) Set EG_tag to 1 endif if (button==2) Set EG_tag to 2 endif if (button==3) Set EG_tag to 3 endif if (button==4) Set EG_tag to 4 endif if (button==5) Set EG_tag to 5 endif if (button==6) Set EG_tag to 6 endif if (button==7) Set EG_tag to 7 endif if (button==8) Set EG_tag to 8 endif if (EG_tag==1) if ( Player->GetItemCount, "_EG_soapinv_01" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_01" 1 player->AddSpell, "EG_soap_01" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if (EG_tag==2) if ( Player->GetItemCount, "_EG_soapinv_02" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_02" 1 player->AddSpell, "EG_soap_02" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==3) if ( Player->GetItemCount, "_EG_soapinv_03" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_03" 1 player->AddSpell, "EG_soap_03" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==4) if ( Player->GetItemCount, "_EG_soapinv_04" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_04" 1 player->AddSpell, "EG_soap_04" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==5) if ( Player->GetItemCount, "_EG_soapinv_05" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_05" 1 player->AddSpell, "EG_soap_05" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==6) if ( Player->GetItemCount, "_EG_soapinv_06" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_06" 1 player->AddSpell, "EG_soap_06" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==7) if ( Player->GetItemCount, "_EG_soapinv_07" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_07" 1 player->AddSpell, "EG_soap_07" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==8) if ( Player->GetItemCount, "_EG_soapinv_08" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_08" 1 player->AddSpell, "EG_soap_08" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif endif set controlvar to 0 set lockit to 1 return else set controlvar to 0 set activate_menu to 0 set lockit to 1 return endif endif ;######################## Rotation Menu ################################### if (activate_menu ==2) if (angle_increments == 1) MessageBox "Меню вращения", "Вращать на 1 градус", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 5) MessageBox "Меню вращения", "Вращать на 5 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 45) MessageBox "Меню вращения", "Вращать на 45 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" else MessageBox "Меню вращения", "Вращать на 90 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 2) set currxangle to GetAngle, x set curryangle to GetAngle, y set currzangle to GetAngle, z set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (angle_increments == 1) set angle_increments to 5 elseif (angle_increments == 5) set angle_increments to 45 elseif (angle_increments == 45) set angle_increments to 90 else set angle_increments to 1 endif set activate_menu to 2 return elseif (button == 1) set currxangle to (currxangle + angle_increments) if (currxangle >= 360) set currxangle to (currxangle - 360) endif SetAngle, x, currxangle set activate_menu to 2 return elseif (button == 2) set curryangle to (curryangle + angle_increments) if (curryangle >= 360) set curryangle to (curryangle - 360) endif SetAngle, y, curryangle set activate_menu to 2 return elseif (button == 3) set currzangle to (currzangle + angle_increments) if (currzangle >= 360) set currzangle to (currzangle - 360) endif SetAngle, z, currzangle set activate_menu to 2 return elseif (button == 4) SetAngle, x, 0 SetAngle, y, 0 SetAngle, z, 0 set activate_menu to 2 return elseif (button == 5) SetAngle, x, startxangle SetAngle, y, startyangle SetAngle, z, startzangle set activate_menu to 2 return else set activate_menu to 1 set controlvar to 1 return endif endif if (lockit == 1) if ( counter < 20 ) Set counter to ( counter + 1 ) else Set counter to 0 if ( GetPos, z == currzpos ) if ( GetPos, y == currypos ) if ( GetPos, x == currxpos ) if ( GetAngle, z == currzangle ) if ( GetAngle, y == curryangle ) if ( GetAngle, x == currxangle ) return endif endif endif endif endif endif SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos SetAngle, x, currxangle SetAngle, y, curryangle SetAngle, z, currzangle endif endif ;##################### Position Menu ####################### if (activate_menu ==3) if (increments == 1) MessageBox "Меню движения", "Двигать на 1 пункт", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" elseif (increments == 5) MessageBox "Меню движения", "Двигать на 5 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" else MessageBox "Меню движения", "Двигать на 10 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 3) set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (increments == 1) set increments to 5 elseif (increments == 5) set increments to 10 else set increments to 1 endif set activate_menu to 3 return elseif (button == 1) set currxpos to (currxpos + increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 2) set currxpos to (currxpos - increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 3) set currypos to (currypos + increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 4) set currypos to (currypos - increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 5) set currzpos to (currzpos + increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 6) set currzpos to (currzpos - increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 7) SetPos, x, startxpos SetPos, y, startypos SetPos, z, startzpos set currxpos to startxpos set currypos to startypos set currzpos to startzpos set activate_menu to 3 return else set activate_menu to 1 set controlvar to 1 return endif endif End KO_Bath_Tub_Scripts Upd: хех, меня опередили. Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 22 октября, 2008 Автор Жалоба Поделиться Опубликовано 22 октября, 2008 Smokingbird: строчки 202 и 150 - ошибка.Дон: кнопка "купаться" работает, зато при нажатии остальных ничего не происходит)) И когда искупаешься должен быть звук плеска воды. Его нет. Ссылка на комментарий Поделиться на другие сайты Поделиться
Don Condor Опубликовано 22 октября, 2008 Жалоба Поделиться Опубликовано 22 октября, 2008 Дон: кнопка "купаться" работает, зато при нажатии остальных ничего не происходит)) И когда искупаешься должен быть звук плеска воды. Его нет.Значит напутал Посмотрю ещё раз... Ссылка на комментарий Поделиться на другие сайты Поделиться
Don Condor Опубликовано 22 октября, 2008 Жалоба Поделиться Опубликовано 22 октября, 2008 А если так?begin KO_Bath_Tub_Scripts Short controlvar Short button Short activate_menu Short increments Short angle_increments Short lockit float currxangle float curryangle float currzangle float currxpos float currypos float startxangle float startyangle float startzangle float currzpos float startxpos float startypos float startzpos short counter short button short EG_tag ;######################################################## ; If we're outside, there's no need for this script at all; commented for outside furniture ;######################################################## ;If (GetInterior == 0) ; return ;endif ;######################################################## ; This code makes sure that the object acts like a regular item ; that you can pick up and place in your inventory while ; in menu mode ;######################################################## if ( menumode == 1 ) if (OnActivate == 1) Activate set lockit to 0 endif return endif ;######################################################## ; If controlvar = -1 means the player selected the "Take" option ; in the menu and lets you pick up the item ;######################################################## if (controlvar == -1) Activate set controlvar to 0 set lockit to 0 return endif ;####################################################### ;Locks the painting position back in place ;Fixes a problem with the positioned object going back to where ;you dropped it after you load a savegame ;There's no way to know when the game is loaded that I know. ;I set the variable "lockit" to 1 whenever the painting is positioned ;When it is set to 1 this piece of code checks ;to see if the object is out of place and puts it back where it's ;supposed to be. ;####################################################### if (lockit == 1) if ( GetPos, z != currzpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, y != currypos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, x != currxpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return endif endif ;################################################################ ; End of Lock check ;################################################################ ;######################### Starting Menu ############################ if ( OnActivate == 1 ) ;if (GetInterior == 0) ; Activate ; set lockit to 0 ; return ;endif set increments to 1 set angle_increments to 1 set activate_menu to 1 set controlvar to 1 set startxpos to GetPos, x set startypos to GetPos, y set startzpos to GetPos, z set startxangle to GetAngle, x set startyangle to GetAngle, y set startzangle to GetAngle, z set currxpos to GetPos, x set currypos to GetPos, y set currzpos to GetPos, z elseif (controlvar ==0) return set lockit to 0 endif if (activate_menu == 1) MessageBox "Выберите действие:", "Взять", "Вращать", "Двигать", "Купаться", "Готово" set activate_menu to 0 set lockit to 0 endif if (controlvar ==1) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0) set controlvar to -1 set activate_menu to 0 return elseif ( button == 1) set controlvar to 2 set activate_menu to 2 elseif ( button == 2) set controlvar to 3 set activate_menu to 3 elseif ( button == 3 ) set bathuse_var to 1 if (EG_bathon==1) MessageBox "Хотите помыться?" "Нет" "Использовать Бархатные ручки" "Использовать Звездный лед" "Использовать Луноцвет" "Использовать Морской бриз" "Использовать Божественное мыло" "Использовать Океанскую глубь" "Использовать Полуночный мускус" "Использовать Решимость" endif if ( bathuse_var==1 ) set button to GetButtonPressed if (button==0) Set bathuse_var to 0 Activate endif if (button==1) Set EG_tag to 1 endif if (button==2) Set EG_tag to 2 endif if (button==3) Set EG_tag to 3 endif if (button==4) Set EG_tag to 4 endif if (button==5) Set EG_tag to 5 endif if (button==6) Set EG_tag to 6 endif if (button==7) Set EG_tag to 7 endif if (button==8) Set EG_tag to 8 endif if (EG_tag==1) if ( Player->GetItemCount, "_EG_soapinv_01" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_01" 1 player->AddSpell, "EG_soap_01" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if (EG_tag==2) if ( Player->GetItemCount, "_EG_soapinv_02" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_02" 1 player->AddSpell, "EG_soap_02" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==3) if ( Player->GetItemCount, "_EG_soapinv_03" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_03" 1 player->AddSpell, "EG_soap_03" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==4) if ( Player->GetItemCount, "_EG_soapinv_04" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_04" 1 player->AddSpell, "EG_soap_04" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==5) if ( Player->GetItemCount, "_EG_soapinv_05" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_05" 1 player->AddSpell, "EG_soap_05" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==6) if ( Player->GetItemCount, "_EG_soapinv_06" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_06" 1 player->AddSpell, "EG_soap_06" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==7) if ( Player->GetItemCount, "_EG_soapinv_07" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_07" 1 player->AddSpell, "EG_soap_07" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==8) if ( Player->GetItemCount, "_EG_soapinv_08" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_08" 1 player->AddSpell, "EG_soap_08" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif set controlvar to 0 set lockit to 1 return else set controlvar to 0 set activate_menu to 0 set lockit to 1 return endif endif ;######################## Rotation Menu ################################### if (activate_menu ==2) if (angle_increments == 1) MessageBox "Меню вращения", "Вращать на 1 градус", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 5) MessageBox "Меню вращения", "Вращать на 5 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 45) MessageBox "Меню вращения", "Вращать на 45 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" else MessageBox "Меню вращения", "Вращать на 90 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 2) set currxangle to GetAngle, x set curryangle to GetAngle, y set currzangle to GetAngle, z set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (angle_increments == 1) set angle_increments to 5 elseif (angle_increments == 5) set angle_increments to 45 elseif (angle_increments == 45) set angle_increments to 90 else set angle_increments to 1 endif set activate_menu to 2 return elseif (button == 1) set currxangle to (currxangle + angle_increments) if (currxangle >= 360) set currxangle to (currxangle - 360) endif SetAngle, x, currxangle set activate_menu to 2 return elseif (button == 2) set curryangle to (curryangle + angle_increments) if (curryangle >= 360) set curryangle to (curryangle - 360) endif SetAngle, y, curryangle set activate_menu to 2 return elseif (button == 3) set currzangle to (currzangle + angle_increments) if (currzangle >= 360) set currzangle to (currzangle - 360) endif SetAngle, z, currzangle set activate_menu to 2 return elseif (button == 4) SetAngle, x, 0 SetAngle, y, 0 SetAngle, z, 0 set activate_menu to 2 return elseif (button == 5) SetAngle, x, startxangle SetAngle, y, startyangle SetAngle, z, startzangle set activate_menu to 2 return else set activate_menu to 1 set controlvar to 1 return endif endif if (lockit == 1) if ( counter < 20 ) Set counter to ( counter + 1 ) else Set counter to 0 if ( GetPos, z == currzpos ) if ( GetPos, y == currypos ) if ( GetPos, x == currxpos ) if ( GetAngle, z == currzangle ) if ( GetAngle, y == curryangle ) if ( GetAngle, x == currxangle ) return endif endif endif endif endif endif SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos SetAngle, x, currxangle SetAngle, y, curryangle SetAngle, z, currzangle endif endif ;##################### Position Menu ####################### if (activate_menu ==3) if (increments == 1) MessageBox "Меню движения", "Двигать на 1 пункт", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" elseif (increments == 5) MessageBox "Меню движения", "Двигать на 5 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" else MessageBox "Меню движения", "Двигать на 10 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 3) set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (increments == 1) set increments to 5 elseif (increments == 5) set increments to 10 else set increments to 1 endif set activate_menu to 3 return elseif (button == 1) set currxpos to (currxpos + increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 2) set currxpos to (currxpos - increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 3) set currypos to (currypos + increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 4) set currypos to (currypos - increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 5) set currzpos to (currzpos + increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 6) set currzpos to (currzpos - increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 7) SetPos, x, startxpos SetPos, y, startypos SetPos, z, startzpos set currxpos to startxpos set currypos to startypos set currzpos to startzpos set activate_menu to 3 return else set activate_menu to 1 set controlvar to 1 return endif endif End KO_Bath_Tub_Scripts Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 22 октября, 2008 Автор Жалоба Поделиться Опубликовано 22 октября, 2008 Строчка 123 - ошибка. Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 22 ноября, 2008 Автор Жалоба Поделиться Опубликовано 22 ноября, 2008 Люди добрые, может ещё кто поможет? Ато Дон успеха так и не смог добиться( Ссылка на комментарий Поделиться на другие сайты Поделиться
Argon Опубликовано 22 ноября, 2008 Жалоба Поделиться Опубликовано 22 ноября, 2008 (изменено) Menorra Попробуй по другому. В патче измени скрипт KO_Bath_Tub_Scripts так чтобы он запускал скрипт с выбором мыла из Вонючек.Вот коды: begin KO_Bath_Tub_Scripts Short controlvar Short button Short activate_menu Short increments Short angle_increments Short lockit float currxangle float curryangle float currzangle float currxpos float currypos float startxangle float startyangle float startzangle float currzpos float startxpos float startypos float startzpos short counter ;######################################################## ; If we're outside, there's no need for this script at all; commented for outside furniture ;######################################################## ;If (GetInterior == 0) ; return ;endif ;######################################################## ; This code makes sure that the object acts like a regular item ; that you can pick up and place in your inventory while ; in menu mode ;######################################################## if ( menumode == 1 ) if (OnActivate == 1) Activate set lockit to 0 endif return endif ;######################################################## ; If controlvar = -1 means the player selected the "Take" option ; in the menu and lets you pick up the item ;######################################################## if (controlvar == -1) Activate set controlvar to 0 set lockit to 0 return endif ;####################################################### ;Locks the painting position back in place ;Fixes a problem with the positioned object going back to where ;you dropped it after you load a savegame ;There's no way to know when the game is loaded that I know. ;I set the variable "lockit" to 1 whenever the painting is positioned ;When it is set to 1 this piece of code checks ;to see if the object is out of place and puts it back where it's ;supposed to be. ;####################################################### if (lockit == 1) if ( GetPos, z != currzpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, y != currypos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return elseif ( GetPos, x != currxpos) SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos return endif endif ;################################################################ ; End of Lock check ;################################################################ ;######################### Starting Menu ############################ if ( OnActivate == 1 ) ;if (GetInterior == 0) ; Activate ; set lockit to 0 ; return ;endif set increments to 1 set angle_increments to 1 set activate_menu to 1 set controlvar to 1 set startxpos to GetPos, x set startypos to GetPos, y set startzpos to GetPos, z set startxangle to GetAngle, x set startyangle to GetAngle, y set startzangle to GetAngle, z set currxpos to GetPos, x set currypos to GetPos, y set currzpos to GetPos, z elseif (controlvar ==0) return set lockit to 0 endif if (activate_menu == 1) MessageBox "Выберите действие:", "Взять", "Вращать", "Двигать", "Купаться", "Готово" set activate_menu to 0 set lockit to 0 endif if (controlvar ==1) set button to GetButtonPressed if ( button == -1 ) return elseif ( button == 0) set controlvar to -1 set activate_menu to 0 return elseif ( button == 1) set controlvar to 2 set activate_menu to 2 elseif ( button == 2) set controlvar to 3 set activate_menu to 3 elseif ( button == 3 ) StartScript, "_EG_bathuse" ;Messagebox "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." Cast "KO_Bathing_Spell" Player set controlvar to 0 set lockit to 1 return else set controlvar to 0 set activate_menu to 0 set lockit to 1 return endif endif ;######################## Rotation Menu ################################### if (activate_menu ==2) if (angle_increments == 1) MessageBox "Меню вращения", "Вращать на 1 градус", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 5) MessageBox "Меню вращения", "Вращать на 5 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" elseif (angle_increments == 45) MessageBox "Меню вращения", "Вращать на 45 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" else MessageBox "Меню вращения", "Вращать на 90 градусов", "Вращать по оси X", "Вращать по оси Y", "Вращать по оси Z", "Сбросить на 0", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 2) set currxangle to GetAngle, x set curryangle to GetAngle, y set currzangle to GetAngle, z set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (angle_increments == 1) set angle_increments to 5 elseif (angle_increments == 5) set angle_increments to 45 elseif (angle_increments == 45) set angle_increments to 90 else set angle_increments to 1 endif set activate_menu to 2 return elseif (button == 1) set currxangle to (currxangle + angle_increments) if (currxangle >= 360) set currxangle to (currxangle - 360) endif SetAngle, x, currxangle set activate_menu to 2 return elseif (button == 2) set curryangle to (curryangle + angle_increments) if (curryangle >= 360) set curryangle to (curryangle - 360) endif SetAngle, y, curryangle set activate_menu to 2 return elseif (button == 3) set currzangle to (currzangle + angle_increments) if (currzangle >= 360) set currzangle to (currzangle - 360) endif SetAngle, z, currzangle set activate_menu to 2 return elseif (button == 4) SetAngle, x, 0 SetAngle, y, 0 SetAngle, z, 0 set activate_menu to 2 return elseif (button == 5) SetAngle, x, startxangle SetAngle, y, startyangle SetAngle, z, startzangle set activate_menu to 2 return else set activate_menu to 1 set controlvar to 1 return endif endif if (lockit == 1) if ( counter < 20 ) Set counter to ( counter + 1 ) else Set counter to 0 if ( GetPos, z == currzpos ) if ( GetPos, y == currypos ) if ( GetPos, x == currxpos ) if ( GetAngle, z == currzangle ) if ( GetAngle, y == curryangle ) if ( GetAngle, x == currxangle ) return endif endif endif endif endif endif SetPos, x, currxpos SetPos, y, currypos SetPos, z, currzpos SetAngle, x, currxangle SetAngle, y, curryangle SetAngle, z, currzangle endif endif ;##################### Position Menu ####################### if (activate_menu ==3) if (increments == 1) MessageBox "Меню движения", "Двигать на 1 пункт", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" elseif (increments == 5) MessageBox "Меню движения", "Двигать на 5 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" else MessageBox "Меню движения", "Двигать на 10 пунктов", "+X", "-X", "+Y", "-Y", "+Z", "-Z", "Отменить", "Назад" endif set activate_menu to 0 endif if (controlvar == 3) set button to GetButtonPressed if (button == -1) return elseif (button == 0) if (increments == 1) set increments to 5 elseif (increments == 5) set increments to 10 else set increments to 1 endif set activate_menu to 3 return elseif (button == 1) set currxpos to (currxpos + increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 2) set currxpos to (currxpos - increments) SetPos, x, currxpos set activate_menu to 3 return elseif (button == 3) set currypos to (currypos + increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 4) set currypos to (currypos - increments) SetPos, y, currypos set activate_menu to 3 return elseif (button == 5) set currzpos to (currzpos + increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 6) set currzpos to (currzpos - increments) SetPos, z, currzpos set activate_menu to 3 return elseif (button == 7) SetPos, x, startxpos SetPos, y, startypos SetPos, z, startzpos set currxpos to startxpos set currypos to startypos set currzpos to startzpos set activate_menu to 3 return else set activate_menu to 1 set controlvar to 1 return endif endif End KO_Bath_Tub_ScriptsИ скрипт _EG_bathuseBegin _EG_bathuse short button short EG_tag if (OnActivate == 0) return else set bathuse_var to 1 if (EG_bathon==1) MessageBox "Хотите помыться?" "Нет" "Использовать Бархатные ручки" "Использовать Звездный лед" "Использовать Луноцвет" "Использовать Морской бриз" "Использовать Божественное мыло" "Использовать Океанскую глубь" "Использовать Полуночный мускус" "Использовать Решимость" endif endif if ( bathuse_var==1 ) set button to GetButtonPressed if (button==0) Set bathuse_var to 0 Activate endif if (button==1) Set EG_tag to 1 endif if (button==2) Set EG_tag to 2 endif if (button==3) Set EG_tag to 3 endif if (button==4) Set EG_tag to 4 endif if (button==5) Set EG_tag to 5 endif if (button==6) Set EG_tag to 6 endif if (button==7) Set EG_tag to 7 endif if (button==8) Set EG_tag to 8 endif if (EG_tag==1) if ( Player->GetItemCount, "_EG_soapinv_01" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_01" 1 player->AddSpell, "EG_soap_01" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if (EG_tag==2) if ( Player->GetItemCount, "_EG_soapinv_02" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_02" 1 player->AddSpell, "EG_soap_02" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==3) if ( Player->GetItemCount, "_EG_soapinv_03" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_03" 1 player->AddSpell, "EG_soap_03" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==4) if ( Player->GetItemCount, "_EG_soapinv_04" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_04" 1 player->AddSpell, "EG_soap_04" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==5) if ( Player->GetItemCount, "_EG_soapinv_05" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_05" 1 player->AddSpell, "EG_soap_05" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==6) if ( Player->GetItemCount, "_EG_soapinv_06" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_06" 1 player->AddSpell, "EG_soap_06" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==7) if ( Player->GetItemCount, "_EG_soapinv_07" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_07" 1 player->AddSpell, "EG_soap_07" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif if(EG_tag==8) if ( Player->GetItemCount, "_EG_soapinv_08" == 0 ) MessageBox "У вас нет этого мыла." Set EG_tag to 0 set bathuse_var to 0 return endif StartScript Remove_Bath_Effects Player->removeitem "_EG_soapinv_08" 1 player->AddSpell, "EG_soap_08" MessageBox, "Вы окунаетесь в горячую воду и смываете с себя грязь. У вас ощущение, будто вы родились заново." set bathuse_var to 0 return endif endif StopScript, "_EG_bathuse" endВроде так, если не ошибаюсь. Изменено 24 ноября, 2008 пользователем Argon Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 24 ноября, 2008 Автор Жалоба Поделиться Опубликовано 24 ноября, 2008 _EG_bathuse - это из самих вонючек. А если изменить, то мод сам по себе работать правильно будет? Ссылка на комментарий Поделиться на другие сайты Поделиться
Argon Опубликовано 24 ноября, 2008 Жалоба Поделиться Опубликовано 24 ноября, 2008 _EG_bathuse - это из самих вонючек. А если изменить, то мод сам по себе работать правильно будет?Если твой патч будет подключаться последним, то никаких проблем не будет - он просто заменит скрипты для этих плагинов и все. Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 24 ноября, 2008 Автор Жалоба Поделиться Опубликовано 24 ноября, 2008 Мм, в патче этого скрипта нет, он есть только в самих вонючках. Просто добавить его? Или я чего-то не понимаю? Ссылка на комментарий Поделиться на другие сайты Поделиться
Argon Опубликовано 24 ноября, 2008 Жалоба Поделиться Опубликовано 24 ноября, 2008 Мм, в патче этого скрипта нет, он есть только в самих вонючках. Просто добавить его? Или я чего-то не понимаю?Говоря про патч, я имел в виду создать свой новый. Просто добавить нельзя, надо предварительно удалить скрипт из патча вонючек, чтобы они не дублировали друг друга. А как имено этот патч из вонючек совмещает эти плагины? Много чего добавляет? Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 25 ноября, 2008 Автор Жалоба Поделиться Опубликовано 25 ноября, 2008 Собственно это даже не патч, это просто сам мод с ванными, но с поправками к скриптам.Просто добавить нельзя, надо предварительно удалить скрипт из патча вонючек, чтобы они не дублировали друг друга.Почему же? Если патч подключать после вонючек, то он его будет не дублировать, а заменять. Ссылка на комментарий Поделиться на другие сайты Поделиться
Argon Опубликовано 25 ноября, 2008 Жалоба Поделиться Опубликовано 25 ноября, 2008 Почему же? Если патч подключать после вонючек, то он его будет не дублировать, а заменять. Страно, ты же сама говорила, что имена скриптов (и коды) ты привела из оригинальных плагинов, а не из патча (_EG_bathuse и KO_Bath_Tub_Scripts). Впрочем, если ты хочешь что-то поменять, то ответ на все свои вопросы ты можешь найти в Morrowind Scripting for Dummies 8.0 - персональной библии скриптолога. Ссылка на комментарий Поделиться на другие сайты Поделиться
Menorra Опубликовано 25 ноября, 2008 Автор Жалоба Поделиться Опубликовано 25 ноября, 2008 Сколько меня уже отсылали к сему священному источнику мудрости..))) Но мне всё лень за него взяться)) Ладно, сейчс чего-нибудь попробую с твоими скриптами наворотить... Попыталась таки в патч добавить второй скрипт и подключить его после вонючек. Ванны как работали без мыла, так и работают... Ладно, фиг с ним, пусть так будет, не так уж это и смертельно. Ссылка на комментарий Поделиться на другие сайты Поделиться
Рекомендуемые сообщения
Для публикации сообщений создайте учётную запись или авторизуйтесь
Вы должны быть пользователем, чтобы оставить комментарий
Создать учетную запись
Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!
Регистрация нового пользователяВойти
Уже есть аккаунт? Войти в систему.
Войти