• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Kusanagi Kuro

Profile posts Latest activity Postings Experience Albums Resources About

  • Chào! Dạo này ko thấy ông onl nữa nhỉ? Hôm nào rảnh, nhắm onl đc thì nói trước với tui để tui onl luôn, có vài chuyện thắc mắc trong WE, đang cần hỏi :D
    Cam on :)

    Xin loi nhung ma hien gio to dang ko muon doc code nen cau chiu kho tao thread o Trigger and Scripts gium. Thanks :p
    ----------
    Thks.
    ----------
    Your Welcome, it's always a good thing for one to help another :)
    ừ làm đúng rồi đó :), à k có gì, chỉ em cách chọn custom script = phím tắt ấy mà, còn % rớt item thì chỉ cần ghi chance(%) trên conditions như chị làm ấy nhé.
    À quên nếu không muốn con unit đó rớt item đó nữa thì dùng lệnh
    call destroy(GetUnitTypeId(u)) để xóa bộ nhớ và em có thể cài đặt lại. (cái kia là VD nhé)
    Cái này tùy biến thoải mái, dùng bất cứ event gì củng dc cả, nếu muốn gom ở diện rộng thì pick group lại, còn cái specific kia chỉ là test thôi.
    Cái này chạy theo loại type như em nói đó.
    Trigger 1 là lưu con Peasant vào u sau đó gọi:

    call additem(GetUnitTypeId(udg_u),0,'afac')

    đây là lệnh để lưu item cần rớt vào unit type u với:

    GetUnitTypeId(udg_u) nơi dữ liệu lưu vào
    0 nơi chứa
    'afac' là rawcode của item muốn lưu (crtl + D)

    ở trigger 2:

    chance(.....) là % rớt item, sau khi bật conditions em bấm "c" nó sẽ ra custom script.
    Item - Create (getitem(GetUnitTypeId(GetTriggerUnit()),0)) at (Position of (Triggering unit))

    ở lệnh này là tiến hành tạo item đã được lưu, em có thể lưu nó vào 1 var integer i.
    VD:
    set i = getitem(GetUnitTypeId(GetTriggerUnit()),0)

    với:
    GetUnitTypeId(GetTriggerUnit()) lấy item ở đâu
    0 là vị trí của item đó.
    library ItemDrop
    globals
    private hashtable H = InitHashtable()
    endglobals
    //
    function chance takes integer i returns boolean
    return GetRandomInt(0,100) <= i
    endfunction
    //
    function additem takes integer i,integer ch,integer itemdata returns nothing
    call SaveInteger(H,i,ch,itemdata)
    endfunction
    //
    function getitem takes integer i,integer ch returns integer
    local integer it = LoadInteger(H,i,ch)
    return it
    endfunction
    //
    function destroy takes integer i returns nothing
    call FlushChildHashtable(H,i)
    endfunction
    //
    endlibrary
    //
    test
    Events
    Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
    Set u = Peasant 0002 <gen>
    Custom script: call additem(GetUnitTypeId(udg_u),0,'afac')
    Custom script: call additem(GetUnitTypeId(udg_u),1,'spsh')

    //
    test 1
    Events
    Unit - A unit Dies
    Conditions
    Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (chance(100))
    Then - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (chance(70))
    Then - Actions
    Item - Create (getitem(GetUnitTypeId(GetTriggerUnit()),0)) at (Position of (Triggering unit))
    Else - Actions
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (chance(30))
    Then - Actions
    Item - Create (getitem(GetUnitTypeId(GetTriggerUnit()),1)) at (Position of (Triggering unit))
    Else - Actions
    Else - Actions
    System đó cần nhiều tool quá, add hay làm gì củng mệt lắm đó em 0.0, viết 1 cái đơn giản mà dùng thôi, chị ghi vậy thôi, còn nếu vẫn muốn xài thì chị chỉ cho.
    Dong sau cung sau khi da dang ky tat ca item.

    Nho la item dang gem phai co level > 100 thi moi duoc nhan dang.
    Strange because i made something similar with one letter less and it was 5 :/
    I think it will work with 6 since 5 is maybe getting the space ^^
    Sax. Noi chuyen voi nguoi la ma dung tu voi ban than nhu vay thi khong hieu lam cung uong.

    Thoi thi ko co gi. Noi chung la effect co ve on, ko co loi gi ca.
    "Bo trym" la thai do gi vay? Neu da nho nguoi khac lam gi gium thi dung co to cai thai do do, khong co hay ti nao dau.

    Ra ngoai test map ma lam spell roi check xem hd co dung y muon ko. De trong cai map chinh roi keu la ko test duoc.
    Effect thay binh thuong. Target dinh tum lum element nen cung ko ro la co hoat dong dung theo y muon ko :p
    Conditions em có thể gán nó thẳng vào spell củng được, và 1 cái begin casting riêng biệt để block nó khi nó k đủ charge
    Cast Charge
    Events
    Conditions
    Actions
    -------- VD --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Ability being cast) Equal to Animate Dead
    Then - Actions
    Set i[(Player number of (Owner of (Triggering unit)))] = (i[(Player number of (Owner of (Triggering unit)))] + 1)
    Else - Actions


    Cast spell
    Events
    Conditions
    Actions
    -------- VD --------
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    (Ability being cast) Equal to Avatar
    i[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 10
    Then - Actions
    -------- ----------------- --------
    Set i[(Player number of (Owner of (Triggering unit)))] = 0
    Else - Actions
    Unit - Pause (Triggering unit)
    Unit - Order (Triggering unit) to Stop
    Unit - Unpause (Triggering unit)
    Game - Display to (Owner of (Triggering unit)), at offset (0.00, 0.00) the text: Not enough charge
    Chị sorry, cái spell trif có quá nhiều loop và trigger và dài quá nên chị pó tay thôi ==!, em chỉ cần nói em làm như thế nào mà nó không destroy là dc, chị giúp cho
    Elemental Burst Count
    Events
    Unit - A unit Starts the effect of an ability
    Conditions
    (Ability being cast) Not equal to Elemental Burst
    (Level of Elemental Burst (Dummy) for (Triggering unit)) Greater than 0
    Actions
    Set CV = (Custom value of (Triggering unit))
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
    ElementalBurst_Count[CV] Not equal to 10
    Then - Actions
    Set ElementalBurst_Count[CV] = (ElementalBurst_Count[CV] + 1)
    Else - Actions
    Unit - Add Elemental Burst to (Triggering unit)
    Unit - Set level of Elemental Burst for (Triggering unit) to (Level of Elemental Burst (Dummy) for (Triggering unit))


    Giải thích thử ?
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top