Возглавление школы - Страница 2 - Wc3-Maps Форум













[ Главная · Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 2 из 3
  • «
  • 1
  • 2
  • 3
  • »
Wc3-Maps Форум » Прочее » Архив » Возглавление школы
Возглавление школы
-
SreziДата: Среда, 16-11-2011, 11:26:53 | Сообщение # 21
Ополченец

загрузка наград ...
Группа: Пользователи
Сообщений: 92
Репутация: 49
Статус: Не на сайте
Лизка, задания уж больно элементарные.... Даже делать такое лень.
Как начнутся стоящие задания, то я начну выполнять. А пока что буду заниматься своим проектом
 
-
ЛизкаДата: Среда, 16-11-2011, 12:23:59 | Сообщение # 22

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
Srezi, ибо я могу давать отдельные уроки... но не знаю согласятся ли другие. могу перевезти в 3 класс тебя и wetalq
 
-
SreziДата: Среда, 16-11-2011, 12:56:31 | Сообщение # 23
Ополченец

загрузка наград ...
Группа: Пользователи
Сообщений: 92
Репутация: 49
Статус: Не на сайте
В 3 классе что изучается?
 
-
ЛизкаДата: Среда, 16-11-2011, 13:09:33 | Сообщение # 24

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
Более сложные триггеры очень сложные
 
-
SreziДата: Среда, 16-11-2011, 14:59:21 | Сообщение # 25
Ополченец

загрузка наград ...
Группа: Пользователи
Сообщений: 92
Репутация: 49
Статус: Не на сайте
Ну давай. Я за.
 
-
wetalqДата: Среда, 16-11-2011, 17:25:36 | Сообщение # 26
Король Мёртвых

загрузка наград ...
Группа: V.I.P.
Сообщений: 1263
Репутация: 1572
Статус: Не на сайте
Quote (Лизка)
Более сложные триггеры очень сложные


хотелось бы увидеть изучения сложных триггеров (а еще лучше Jass)


Покупка предметов через способность
 
-
ololoДата: Среда, 16-11-2011, 17:29:41 | Сообщение # 27
Враг сайта

загрузка наград ...
Группа: V.I.P.
Сообщений: 4760
Статус: Не на сайте
Ну зачем эта тема, объясните.
 
-
РостяДата: Среда, 16-11-2011, 22:04:51 | Сообщение # 28
Рыцарь

загрузка наград ...
Группа: Проверенные
Сообщений: 155
Репутация: 340
Статус: Не на сайте
Боло ты тригерызнаеш а я сложные не знаю
лизка давай меня в 3

 
-
ЛизкаДата: Среда, 16-11-2011, 22:17:07 | Сообщение # 29

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
Ростя, Ок

Добавлено (16.11.2011, 22:16:34)
---------------------------------------------
теперь мне надо учить 5 класс

Добавлено (16.11.2011, 22:17:07)
---------------------------------------------
1 урок. 1 тема 3тьего класса, СКРЕЩИВАНИЯ ПРЕДМЕТА

 
-
CaturnДата: Среда, 16-11-2011, 22:51:08 | Сообщение # 30
Темный рыцарь

загрузка наград ...
Группа: Проверенные
Сообщений: 217
Репутация: 128
Статус: Не на сайте
О да, уроки супер.
wetalq, что ты тут забыл?)

Мои статьи:
1. http://wc3-maps.ru/forum/78-1507-1
Школа тригеростроения, ГУИ.
http://wc3-maps.ru/forum/99-1471-1
 
-
ЛизкаДата: Среда, 16-11-2011, 23:10:21 | Сообщение # 31

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
И... Так, вот мы начинаем тему скрещивание предметов, чтобы скрестить предмет нужно:
Создайте триггер с именем Recipe
Code

//=======================================================================================================
// Recipe System
// By Fredbrik(Diablo-dk)
//
//=======================================================================================================
//globals
//integer               RN=0 // Recipe number.
//trigger               RT=CreateTrigger() // Main recipe trigger.
//boolean               RC=true
//integer array         itemid1
//integer array         itemid2
//integer array         itemid3
//integer array         itemid4
//integer array         itemid5
//integer array         itemid6
//integer array         ic //item count
//integer array         output
//endglobals
//=======================================================================================================
// User changeable constants
//=======================================================================================================
constant function Recipe_Effect takes nothing returns string
     return "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" //An effect that comes whenever a recipe is made.
endfunction

constant function Recipe_AP takes nothing returns string
     return "origin" //Attachment point for Recipe_Effect()
endfunction
//=======================================================================================================
// This function will return the first item of entered Id in the unit's inventory.
function GetItem takes unit u, integer Id returns item
     local integer i=0
     local item it
     loop
         exitwhen i==6
         if GetItemTypeId(UnitItemInSlot(u,i)) == Id then
             return UnitItemInSlot(u,i)
         set i=5
         endif
         set i=i+1
     endloop
     return null
endfunction
//==============================
function HasItems takes unit u, integer i returns boolean
     local integer index=0
     local integer id=-1
     local integer b1=0
     local integer b2=0
     local integer b3=0
     local integer b4=0
     local integer b5=0
     local integer b6=0
     loop
         exitwhen index==6
         set id=GetItemTypeId(UnitItemInSlot(u,index))
         if id == 0 then
             set id=-1
         endif
         if id == udg_itemid1[i] and b1 == 0 then
             set b1=1
             set id=-1
         endif
         if id == udg_itemid2[i] and b2 == 0 then
             set b2=1
             set id=-1
         endif
         if id == udg_itemid3[i] and b3 == 0 then
             set b3=1
             set id=-1
         endif
         if id == udg_itemid4[i] and b4 == 0 then
             set b4=1
             set id=-1
         endif
         if id == udg_itemid5[i] and b5 == 0 then
             set b5=1
             set id=-1
         endif
         if id == udg_itemid6[i] and b6 == 0 then
             set b6=1
             set id=-1
         endif
         if b1+b2+b3+b4+b5+b6 == udg_ic[i] then
             return true
         endif
         set index=index+1
     endloop
     return false
endfunction
//=======================================================================================================
// User Functions:
// Recipe Creating:
//
//=======================================================================================================
function CreateRecipe takes integer i1,integer i2,integer i3,integer i4,integer i5,integer i6,integer output returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_ic[udg_RN]=2
     if i3 != 0 then
         set udg_itemid3[udg_RN]=i3
         set udg_ic[udg_RN]=udg_ic[udg_RN]+1
     endif
     if i4 != 0 then
         set udg_itemid4[udg_RN]=i4
         set udg_ic[udg_RN]=udg_ic[udg_RN]+1
     endif
     if i5 != 0 then
         set udg_itemid5[udg_RN]=i5
         set udg_ic[udg_RN]=udg_ic[udg_RN]+1
     endif
     if i6 != 0 then
         set udg_itemid6[udg_RN]=i6
         set udg_ic[udg_RN]=udg_ic[udg_RN]+1
     endif
     set udg_output[udg_RN]=output
endfunction
function CreateRecipe2 takes integer i1,integer i2,integer i3 returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_output[udg_RN]=i3
     set udg_ic[udg_RN]=2
endfunction

// Creates a recipe that requires 2 items to combine into a new item. i3 is the combined item.
// Example: call CreateRecipe2('I000','I001','I002')
function CreateRecipe3 takes integer i1,integer i2,integer i3,integer i4 returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_itemid3[udg_RN]=i3
     set udg_output[udg_RN]=i4
     set udg_ic[udg_RN]=3
endfunction

// The same as CreateRecipe2 except this requires 3 items to combine. i4 is the combined item.
function CreateRecipe4 takes integer i1,integer i2,integer i3,integer i4,integer i5 returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_itemid3[udg_RN]=i3
     set udg_itemid4[udg_RN]=i4
     set udg_output[udg_RN]=i5
     set udg_ic[udg_RN]=4
endfunction

// The same as CreateRecipe2 except this requires 4 items to combine. i5 is the combined item.
function CreateRecipe5 takes integer i1,integer i2,integer i3,integer i4,integer i5,integer i6 returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_itemid3[udg_RN]=i3
     set udg_itemid4[udg_RN]=i4
     set udg_itemid5[udg_RN]=i5
     set udg_output[udg_RN]=i6
     set udg_ic[udg_RN]=5
endfunction

// The same as CreateRecipe2 except this requires 5 items to combine. i6 is the combined item.
function CreateRecipe6 takes integer i1,integer i2,integer i3,integer i4,integer i5,integer i6,integer i7 returns nothing
     set udg_RN=udg_RN+1
     set udg_itemid1[udg_RN]=i1
     set udg_itemid2[udg_RN]=i2
     set udg_itemid3[udg_RN]=i3
     set udg_itemid4[udg_RN]=i4
     set udg_itemid5[udg_RN]=i5
     set udg_itemid6[udg_RN]=i6
     set udg_output[udg_RN]=i7
     set udg_ic[udg_RN]=6
endfunction

// The same as CreateRecipe2 except this requires 6 items to combine. i7 is the combined item.
//===================================================================================================
// This function disassembles a recipe item to its original components.

function DisItem takes unit u,item it returns boolean
     local integer c=GetItemUserData(it)
     local item array newitem
     local integer i=udg_ic[c]
     if it != null then
         if i <= 6-UnitInventoryCount(u)+1 and i > 0 then
             set udg_RC=false
             if udg_itemid2[c] != null then
                 set newitem[1]=CreateItem(udg_itemid1[c],GetUnitX(u),GetUnitY(u))
                 set newitem[2]=CreateItem(udg_itemid2[c],GetUnitX(u),GetUnitY(u))
                 endif
             if udg_itemid3[c] != null then
                 set newitem[3]=CreateItem(udg_itemid3[c],GetUnitX(u),GetUnitY(u))
                 call UnitAddItem(u,newitem[3])
             endif
             if udg_itemid4[c] != null then
                 set newitem[4]=CreateItem(udg_itemid4[c],GetUnitX(u),GetUnitY(u))
                 call UnitAddItem(u,newitem[4])
             endif
             if udg_itemid5[c] != null then
                 set newitem[5]=CreateItem(udg_itemid5[c],GetUnitX(u),GetUnitY(u))
                 call UnitAddItem(u,newitem[5])
             endif
             if udg_itemid6[c] != null then
                 set newitem[6]=CreateItem(udg_itemid6[c],GetUnitX(u),GetUnitY(u))
                 call UnitAddItem(u,newitem[6])
             endif
             call RemoveItem(it)
             call UnitAddItem(u,newitem[1])
             call UnitAddItem(u,newitem[2])

         set newitem[1]=null
         set newitem[2]=null
         set newitem[3]=null
         set newitem[4]=null
         set newitem[5]=null
         set newitem[6]=null
         set udg_RC=true
         else
             return false
         endif
     endif
     return true
endfunction
//=======================================================================================================
//
//Main Recipe Function: Do not change unless you know what you are doing
//
//=======================================================================================================
function Recipe_Main takes nothing returns nothing
     local item it
     local integer i=0
     local unit u=GetManipulatingUnit()
     loop
         exitwhen i==udg_RN
         set i=i+1
         if udg_RC == true then
             if udg_ic[i] == 6 then
                 if HasItems(u,i) then
                     call RemoveItem(GetItem(u,udg_itemid1[i]))
                     call RemoveItem(GetItem(u,udg_itemid2[i]))
                     call RemoveItem(GetItem(u,udg_itemid3[i]))
                     call RemoveItem(GetItem(u,udg_itemid4[i]))
                     call RemoveItem(GetItem(u,udg_itemid5[i]))
                     call RemoveItem(GetItem(u,udg_itemid6[i]))
                     call DestroyEffect(AddSpecialEffectTarget(Recipe_Effect(),u,Recipe_AP()))
                     set it=CreateItem(udg_output[i],GetUnitX(u),GetUnitY(u))
                     call SetItemUserData(it,i) //Used for disassembling.
                     call UnitAddItem(u,it)
                     set i=udg_RN
                 endif
             elseif udg_ic[i] == 5 then
                 if HasItems(u,i) then
                     call RemoveItem(GetItem(u,udg_itemid1[i]))
                     call RemoveItem(GetItem(u,udg_itemid2[i]))
                     call RemoveItem(GetItem(u,udg_itemid3[i]))
                     call RemoveItem(GetItem(u,udg_itemid4[i]))
                     call RemoveItem(GetItem(u,udg_itemid5[i]))
                     call DestroyEffect(AddSpecialEffectTarget(Recipe_Effect(),u,Recipe_AP()))
                     set it=CreateItem(udg_output[i],GetUnitX(u),GetUnitY(u))
                     call SetItemUserData(it,i) //Used for disassembling.
                     call UnitAddItem(u,it)
                     set i=udg_RN
                 endif
             elseif udg_ic[i] == 4 then
                 if HasItems(u,i) then
                     call RemoveItem(GetItem(u,udg_itemid1[i]))
                     call RemoveItem(GetItem(u,udg_itemid2[i]))
                     call RemoveItem(GetItem(u,udg_itemid3[i]))
                     call RemoveItem(GetItem(u,udg_itemid4[i]))
                     call DestroyEffect(AddSpecialEffectTarget(Recipe_Effect(),u,Recipe_AP()))
                     set it=CreateItem(udg_output[i],GetUnitX(u),GetUnitY(u))
                     call SetItemUserData(it,i) //Used for disassembling.
                     call UnitAddItem(u,it)
                     set i=udg_RN
                 endif
             elseif udg_ic[i] == 3 then
                 if HasItems(u,i) then
                     call RemoveItem(GetItem(u,udg_itemid1[i]))
                     call RemoveItem(GetItem(u,udg_itemid2[i]))
                     call RemoveItem(GetItem(u,udg_itemid3[i]))
                     call DestroyEffect(AddSpecialEffectTarget(Recipe_Effect(),u,Recipe_AP()))
                     set it=CreateItem(udg_output[i],GetUnitX(u),GetUnitY(u))
                     call SetItemUserData(it,i) //Used for disassembling.
                     call UnitAddItem(u,it)
                     set i=udg_RN
                 endif
             elseif udg_ic[i] == 2 then
                 if HasItems(u,i) then
                     call RemoveItem(GetItem(u,udg_itemid1[i]))
                     call RemoveItem(GetItem(u,udg_itemid2[i]))
                     call DestroyEffect(AddSpecialEffectTarget(Recipe_Effect(),u,Recipe_AP()))
                     set it=CreateItem(udg_output[i],GetUnitX(u),GetUnitY(u))
                     call SetItemUserData(it,i) //Used for disassembling.
                     call UnitAddItem(u,it)
                     set i=udg_RN
                 endif
             endif
         endif
     endloop
     set it=null
     set u=null
endfunction
function InitRecipe takes nothing returns nothing
     set udg_RT=CreateTrigger()
     set udg_RC=true
     call TriggerRegisterAnyUnitEventBJ( udg_RT, EVENT_PLAYER_UNIT_PICKUP_ITEM )
     call TriggerAddAction(udg_RT,function Recipe_Main)
endfunction
//call this at map init.

//forced by WE
function InitTrig_Recipe takes nothing returns nothing
endfunction
// End Recipe

Ставте это туда

Создаем 2 триггер, любой
Событие Map Инцилизация
Действие кустом скрипт call InitRecipe()
Действие кустом скрипт call CreateRecipe2('rde1','rde2','rde3')
Действие кустом скрипт call CreateRecipe('rat6', 'rat9', 'ratc',0,0,0, 'ratf')
тоже самое call CreateRecipe4('ram1', 'ram2', 'ram3', 'ram4', 'rugt')
Тоже самое call CreateRecipe4('kybl', 'kygh', 'kybl', 'kygh', 'mgtk')
Тоже самое call CreateRecipe5('oslo', 'oven', 'oli2', 'ofir', 'ocor', 'gldo')
Тоже самое call CreateRecipe6('sor1', 'sor2', 'sor3', 'sor4', 'sor5', 'sor6', 'sora')

Новый триггер: событие боевая единица: Юнит приводит способность в действие
Действие: кустом скрипт if DisItem(GetSpellAbilityUnit(),UnitItemInSlot(GetSpellAbilityUnit(),0)) == false then
Кустом скрипт call BJDebugMsg("Error! Unable to disassemble item!")
КУстом скрипт endif
comment disassembles the item in slot 1. If there isn't enough space for the new item it will display an error instead.

вот вам и скрещивание. У кого получилось выкладываем скрины
 
-
CaturnДата: Среда, 16-11-2011, 23:23:43 | Сообщение # 32
Темный рыцарь

загрузка наград ...
Группа: Проверенные
Сообщений: 217
Репутация: 128
Статус: Не на сайте
Лизка, это точно не твоя наработка.
Quote
call TriggerAddAction(udg_RT,function Recipe_Main)

Тру функция для кустом код, редко вижу системы или способности с этой функцией, но если вижу, то в этой наработке глоаблки, и полное отсутствие рук авторахештаблицы(ц).

Мои статьи:
1. http://wc3-maps.ru/forum/78-1507-1
Школа тригеростроения, ГУИ.
http://wc3-maps.ru/forum/99-1471-1
 
-
wetalqДата: Среда, 16-11-2011, 23:34:34 | Сообщение # 33
Король Мёртвых

загрузка наград ...
Группа: V.I.P.
Сообщений: 1263
Репутация: 1572
Статус: Не на сайте
Quote (Лизка)
Code
Recipe System  
// By Fredbrik(Diablo-dk)


да не все ок)


Покупка предметов через способность
 
-
wetalqДата: Среда, 16-11-2011, 23:36:31 | Сообщение # 34
Король Мёртвых

загрузка наград ...
Группа: V.I.P.
Сообщений: 1263
Репутация: 1572
Статус: Не на сайте
Quote (Caturn)
что ты тут забыл?)


я где то писал что хочу учиться новому, а проанализировать чужие наработки я могу и сам


Покупка предметов через способность
 
-
CaturnДата: Среда, 16-11-2011, 23:58:07 | Сообщение # 35
Темный рыцарь

загрузка наград ...
Группа: Проверенные
Сообщений: 217
Репутация: 128
Статус: Не на сайте
wetalq, в конце концов нам всё равно приходится анализировать чужие наработки, знания.
Мои статьи:
1. http://wc3-maps.ru/forum/78-1507-1
Школа тригеростроения, ГУИ.
http://wc3-maps.ru/forum/99-1471-1
 
-
SreziДата: Четверг, 17-11-2011, 14:28:57 | Сообщение # 36
Ополченец

загрузка наград ...
Группа: Пользователи
Сообщений: 92
Репутация: 49
Статус: Не на сайте
3 Класс и сразу джассовые триггеры?хм... Я вообще не знаю, что такое джасс. я в пролете. Ибо работаю на 99% на гуи
 
-
wetalqДата: Четверг, 17-11-2011, 17:33:16 | Сообщение # 37
Король Мёртвых

загрузка наград ...
Группа: V.I.P.
Сообщений: 1263
Репутация: 1572
Статус: Не на сайте
Quote (Caturn)
wetalq, в конце концов нам всё равно приходится анализировать чужие наработки, знания.


это легче делать когда рядом есть человек который объяснит за что отвечает та или инная строчка


Покупка предметов через способность
 
-
ЛизкаДата: Суббота, 19-11-2011, 09:50:31 | Сообщение # 38

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
Ладно: задаю вам задания записатся в школу Caturn, и чтобы он вас научил работать с функциями string local real local integer Local boolean И чем отличаются True/falso
 
-
wetalqДата: Суббота, 19-11-2011, 11:56:07 | Сообщение # 39
Король Мёртвых

загрузка наград ...
Группа: V.I.P.
Сообщений: 1263
Репутация: 1572
Статус: Не на сайте
Quote (Лизка)
falso


False

Quote (Лизка)
Ладно: задаю вам задания записатся в школу Caturn


он получил бан на 10 дней(


Покупка предметов через способность
 
-
ЛизкаДата: Суббота, 19-11-2011, 12:37:03 | Сообщение # 40

загрузка наград ...
Группа: Пользователи
Сообщений: 81
Репутация: 155
Статус: Не на сайте
Ладно попробую объяснить чем отлечаются Falso от True
Когда вы пишите код, вам надо очень много функций! Пожалуйсто рассмотрите схему

Code
Local bolean - Seng

Почему так нельзя назвать? 1 под bolean может быть только True или Falso.
Возникает вопрос! чем они отличаются???? True - правда Falso - ложь. постарайтесь это запомнить что под local bolean - не может быть чего либо кроме Falso/True
 
Wc3-Maps Форум » Прочее » Архив » Возглавление школы
  • Страница 2 из 3
  • «
  • 1
  • 2
  • 3
  • »
Поиск:
Рейтинг@Mail.ru
Яндекс.Метрика

Copyright © 2010-2017
Вакансии :: Контакты
Мобильная версия сайта
chat