[Статья]Скрешивание предметов
|
|
Glaber | Дата: Понедельник, 11.10.2010, 17:31 | Сообщение # 1 |
| Code function Trig_Acquires_Item_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction
function Trig_Acquires_Item_Func003Func001Func012C takes nothing returns boolean if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot1[GetForLoopIndexA()])) == udg_ITM_ItemSlot1[GetForLoopIndexA()] ) ) then return false endif if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot2[GetForLoopIndexA()])) == udg_ITM_ItemSlot2[GetForLoopIndexA()] ) ) then return false endif if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot3[GetForLoopIndexA()])) == udg_ITM_ItemSlot3[GetForLoopIndexA()] ) ) then return false endif if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot4[GetForLoopIndexA()])) == udg_ITM_ItemSlot4[GetForLoopIndexA()] ) ) then return false endif if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot5[GetForLoopIndexA()])) == udg_ITM_ItemSlot5[GetForLoopIndexA()] ) ) then return false endif if ( not ( GetItemTypeId(GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot6[GetForLoopIndexA()])) == udg_ITM_ItemSlot6[GetForLoopIndexA()] ) ) then return false endif return true endfunction
function Trig_Acquires_Item_Func003Func001C takes nothing returns boolean if ( not Trig_Acquires_Item_Func003Func001Func012C() ) then return false endif return true endfunction
function Trig_Acquires_Item_Actions takes nothing returns nothing set bj_forLoopAIndex = 1 set bj_forLoopAIndexEnd = udg_ITM_MaxItemRecipes loop exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd if ( Trig_Acquires_Item_Func003Func001C() ) then call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot1[GetForLoopIndexA()]) ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot2[GetForLoopIndexA()]) ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot3[GetForLoopIndexA()]) ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot4[GetForLoopIndexA()]) ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot5[GetForLoopIndexA()]) ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), udg_ITM_ItemSlot6[GetForLoopIndexA()]) ) call UnitAddItemByIdSwapped( udg_ITM_ReplacementItem[GetForLoopIndexA()], GetTriggerUnit() ) call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), ( "|cff00FFFFGame Message:|r Item Created: " + GetItemName(GetLastCreatedItem()) ) ) return else call DoNothing( ) endif set bj_forLoopAIndex = bj_forLoopAIndex + 1 endloop endfunction Просто копируйте в код с событие получает предмет Code function Trig_Capog_Conditions takes nothing returns boolean if ( not ( UnitHasItem(GetTriggerUnit(), GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I010')) == true ) ) then return false endif return true endfunction
function Trig_Capog_Func001C takes nothing returns boolean if ( not ( UnitHasItem(GetTriggerUnit(), GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00C')) == true ) ) then return false endif if ( not ( UnitHasItem(GetTriggerUnit(), GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I00P')) == true ) ) then return false endif return true endfunction
function Trig_Capog_Actions takes nothing returns nothing if ( Trig_Capog_Func001C() ) then call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIsm\\AIsmTarget.mdl" ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00C') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), 'I00P') ) call UnitAddItemByIdSwapped( 'I00T', GetTriggerUnit() ) call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), ( "|cff00FFFFGame Message:|r Собран предмет:" + GetItemName(GetLastCreatedItem()) ) ) else endif endfunction Тоже самое Ид предмета меняем и получимрезультат)
|
|
| |
Evgexa | Дата: Вторник, 12.10.2010, 06:22 | Сообщение # 2 |
| карту пример ) сюда!
|
|
| | |
Stinger | Дата: Понедельник, 28.03.2011, 09:51 | Сообщение # 4 |
| Да,на гуи проще,лучше бы автор скрины выложил
Я всё умею...ну почти всё ^Жми
|
|
| |
Night_Sta1ker | Дата: Вторник, 29.03.2011, 09:18 | Сообщение # 5 |
| ОлОлО и ниче не понятно
КЛОУНФИЕСТА
|
|
| | |
Glaber | Дата: Вторник, 29.03.2011, 10:04 | Сообщение # 7 |
| Quote (UZzip) F @ LK , для этого и конвертирует их = D Там все чотко и ясно , а конвертирую потому что так легче!........Добавлено (29.03.2011, 10:04) --------------------------------------------- Вот на ГУИ ты вот этот код спелла замучаешься менять значения! Хоть код и тупой , но настраивать легко и макс 5 мин займет. Code
function Trig_Kryg_Actions takes nothing returns nothing local unit u = GetTriggerUnit() set udg_Ship[24] = GetTriggerUnit() call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 0), bj_UNIT_FACING ) set udg_Ship[0] = GetLastCreatedUnit() call UnitApplyTimedLife(udg_Ship[0],'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 70), bj_UNIT_FACING ) set udg_Ship[1] = GetLastCreatedUnit() call UnitApplyTimedLife(udg_Ship[1],'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 140), bj_UNIT_FACING ) set udg_Ship[2] = GetLastCreatedUnit() call UnitApplyTimedLife(udg_Ship[2],'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 210), bj_UNIT_FACING ) set udg_Ship[3] = GetLastCreatedUnit() call UnitApplyTimedLife(udg_Ship[3],'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 280), bj_UNIT_FACING ) set udg_Ship[4] = GetLastCreatedUnit() call UnitApplyTimedLife(udg_Ship[4],'u002',4) call IssuePointOrderLocBJ( udg_Ship[0], "impale", GetUnitLoc(udg_Ship[1]) ) call IssuePointOrderLocBJ( udg_Ship[1], "impale", GetUnitLoc(udg_Ship[2]) ) call IssuePointOrderLocBJ( udg_Ship[2], "impale", GetUnitLoc(udg_Ship[3]) ) call IssuePointOrderLocBJ( udg_Ship[3], "impale", GetUnitLoc(udg_Ship[4]) ) call IssuePointOrderLocBJ( udg_Ship[4], "impale", GetUnitLoc(udg_Ship[0]) ) // =============================================================================== call TriggerSleepAction( 0.70 ) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, 0), bj_UNIT_FACING ) set udg_Ship[5] = GetCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, 70), bj_UNIT_FACING ) set udg_Ship[6] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, 140), bj_UNIT_FACING ) set udg_Ship[7] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, 210), bj_UNIT_FACING ) set udg_Ship[8] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, 280), bj_UNIT_FACING ) set udg_Ship[9] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call IssuePointOrderLocBJ( udg_Ship[5], "impale", GetUnitLoc(udg_Ship[6]) ) call IssuePointOrderLocBJ( udg_Ship[6], "impale", GetUnitLoc(udg_Ship[7]) ) call IssuePointOrderLocBJ( udg_Ship[7], "impale", GetUnitLoc(udg_Ship[8]) ) call IssuePointOrderLocBJ( udg_Ship[8], "impale", GetUnitLoc(udg_Ship[9]) ) call IssuePointOrderLocBJ( udg_Ship[9], "impale", GetUnitLoc(udg_Ship[5]) ) // =============================================================================== call TriggerSleepAction( 0.70 ) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 0), bj_UNIT_FACING ) set udg_Ship[10] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 70), bj_UNIT_FACING ) set udg_Ship[11] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 140), bj_UNIT_FACING ) set udg_Ship[12] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 210), bj_UNIT_FACING ) set udg_Ship[13] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 280), bj_UNIT_FACING ) set udg_Ship[14] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call IssuePointOrderLocBJ( udg_Ship[10], "impale", GetUnitLoc(udg_Ship[11]) ) call IssuePointOrderLocBJ( udg_Ship[11], "impale", GetUnitLoc(udg_Ship[12]) ) call IssuePointOrderLocBJ( udg_Ship[12], "impale", GetUnitLoc(udg_Ship[13]) ) call IssuePointOrderLocBJ( udg_Ship[13], "impale", GetUnitLoc(udg_Ship[14]) ) call IssuePointOrderLocBJ( udg_Ship[14], "impale", GetUnitLoc(udg_Ship[10]) ) //========================================================================================================= call TriggerSleepAction( 1.00 ) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 0), bj_UNIT_FACING ) set udg_Ship[15] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 70), bj_UNIT_FACING ) set udg_Ship[16] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 140), bj_UNIT_FACING ) set udg_Ship[17] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 210), bj_UNIT_FACING ) set udg_Ship[18] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call CreateNUnitsAtLoc( 1, 'u002', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, 280), bj_UNIT_FACING ) set udg_Ship[19] = GetLastCreatedUnit() call UnitApplyTimedLife(GetLastCreatedUnit(),'u002',4) call IssuePointOrderLocBJ( udg_Ship[15], "impale", GetUnitLoc(udg_Ship[24]) ) call IssuePointOrderLocBJ( udg_Ship[16], "impale", GetUnitLoc(udg_Ship[24]) ) call IssuePointOrderLocBJ( udg_Ship[17], "impale", GetUnitLoc(udg_Ship[24]) ) call IssuePointOrderLocBJ( udg_Ship[18], "impale", GetUnitLoc(udg_Ship[24]) ) call IssuePointOrderLocBJ( udg_Ship[19], "impale", GetUnitLoc(udg_Ship[24]) ) //_________________________________
set udg_Ship[0] = null set udg_Ship[1] = null set udg_Ship[2] = null set udg_Ship[3] = null set udg_Ship[4] = null set udg_Ship[5] = null set udg_Ship[6] = null set udg_Ship[7] = null set udg_Ship[8] = null set udg_Ship[9] = null set udg_Ship[10] = null set udg_Ship[11] = null set udg_Ship[12] = null set udg_Ship[13] = null set udg_Ship[14] = null endfunction
|
|
| |
Evgexa | Дата: Вторник, 29.03.2011, 11:33 | Сообщение # 8 |
| и опять триггер конвертированный в текст
|
|
| |
Glaber | Дата: Вторник, 29.03.2011, 11:44 | Сообщение # 9 |
| это уже старое а насчет если кода то да я же говорю Quote (F@lk) Хоть код и тупой, но настраивать легко и макс 5 мин займет. То что делается на ГУЕ я делаю и бывает конвертирую и добавляю локалки ведь так удобнее!!!!!! А если немогу сделать на ГУЕ то делаю на джассе.Добавлено (29.03.2011, 11:44) --------------------------------------------- Ибо все делать на джассе это не круто если можно тоже самое на ГУЕ
|
|
| |
Evgexa | Дата: Вторник, 29.03.2011, 11:45 | Сообщение # 10 |
| омг, не проще всё делать на GUI ?!
|
|
| |
|
|