0978788673
Youtube Master Race
Cho mình hỏi cách làm Trigger có nội dung: Chỉ cho phép Player (mọi Player) mua tối đa 5 Unit nào đó? Khi unit đó chết thì mới dc mua thêm :)
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
t muốn hỏi vụ Upgrade nữa :). Ví dụ trong map Chống Cửa bằng chòi, thì Chòi A sẽ có thể Upgrade lên Chòi B, rồi lên Chòi C. Vậy nếu mình muốn giới hạn, chỉ cho phép Player upgrade lên 5 chòi B thì làm như thế nào? Nếu từ Chòi B mà Upgrade lên Chòi C thì lại vẫn nâng cấp 1 Chòi A lên Chòi B dc.Player - Limit training of Footman to 1 for Player 1 (Red)
set t = CreateTextTagUnitBJ( "-" + I2S(R2I( GetUnitStateSwap(UNIT_STATE_MAX_MANA, a) * 0.20 )), a, 14.00, 12.00, 25.00, 100.00, 25.00, 10.00 )
call SetTextTagVelocityBJ( t, 64, 90 )
call SetTextTagPermanentBJ( t, false )
call SetTextTagLifespanBJ( t, 4.00 )
library DisplayCenteredText initializer Init requires Table
//*****************************************************************
//* DisplayCenteredText
//*
//* written by: Anitarf
//*
//* A set of functions for displaying centered game messages. The
//* functions do two things in order to center the message: first,
//* they add spaces at the start of the message string so the
//* message is "pushed" to the center of the area available for
//* game messages, which is about two thirds of the screen; and
//* second, they display the message at a certain x offset so the
//* above mentioned area gets centered on the screen.
//*
//* The values used were experimentally determined and are only
//* approximations, but results are very reliable in practice in
//* nearly all game resolution and with almost all input strings.
//*
//* The following functions are available:
//*
//* function GetCenteredMessage takes string line returns string
//* function DisplayCenteredTextToPlayer takes player toPlayer, real y, string message returns nothing
//* function DisplayTimedCenteredTextToPlayer takes player toPlayer, real y, real duration, string message returns nothing
//*
//* Note that if the string is too long to fit in the available
//* area then the game will split it before displaying, centering
//* won't work in this case, the solution is to give the functions
//* shorter strings to work with.
//*
//*****************************************************************
globals
private constant real DEFAULT_CHAR_WIDTH = 156 //default width for all undefined characters
private StringTable uppercase
private StringTable lowercase
endglobals
private function Init takes nothing returns nothing
set uppercase = StringTable.create()
set lowercase = StringTable.create()
// experimentally determined values, in 1/10000 of max message width
// more info: http://www.wc3campaigns.net/showthread.php?t=90599
set uppercase["a"]= 206
set uppercase["b"]= 162
set uppercase["c"]= 183
set uppercase["d"]= 193
set uppercase["e"]= 153
set uppercase["f"]= 122
set uppercase["g"]= 204
set uppercase["h"]= 200
set uppercase["i"]= 77
set uppercase["j"]= 80
set uppercase["k"]= 183
set uppercase["l"]= 148
set uppercase["m"]= 264
set uppercase["n"]= 200
set uppercase["o"]= 225
set uppercase["p"]= 156
set uppercase["q"]= 237
set uppercase["r"]= 179
set uppercase["s"]= 156
set uppercase["t"]= 151
set uppercase["u"]= 187
set uppercase["v"]= 183
set uppercase["w"]= 282
set uppercase["x"]= 204
set uppercase["y"]= 179
set uppercase["z"]= 179
set lowercase["a"]= 151
set lowercase["b"]= 159
set lowercase["c"]= 147
set lowercase["d"]= 162
set lowercase["e"]= 159
set lowercase["f"]= 98
set lowercase["g"]= 176
set lowercase["h"]= 159
set lowercase["i"]= 65
set lowercase["j"]= 77
set lowercase["k"]= 147
set lowercase["l"]= 68
set lowercase["m"]= 227
set lowercase["n"]= 156
set lowercase["o"]= 166
set lowercase["p"]= 162
set lowercase["q"]= 162
set lowercase["r"]= 98
set lowercase["s"]= 126
set lowercase["t"]= 100
set lowercase["u"]= 159
set lowercase["v"]= 159
set lowercase["w"]= 229
set lowercase["x"]= 159
set lowercase["y"]= 159
set lowercase["z"]= 147
set lowercase["."]= 51
set lowercase[","]= 55
set lowercase[" "]= 80
set lowercase["-"]= 104
endfunction
function GetCenteredMessage takes string line returns string
local string char
local integer i=0
local real charwidth
local real totalwidth=0.0
loop //get the approximate width of the string
set char = SubString(line, i, i+1)
exitwhen char == ""
if StringCase(char, false)==char then
set charwidth = lowercase[char]
else
set charwidth = uppercase[char]
endif
if charwidth == 0.0 then
set charwidth = DEFAULT_CHAR_WIDTH
endif
set totalwidth=totalwidth+charwidth
set i = i + 1
endloop
set i = R2I((5000.0-totalwidth/2)/lowercase[" "]) //number of spaces needed
set char = ""
loop
exitwhen i<=3 //safety margin, better add one space too few than one space too many
set char=char+" "
set i=i-1
endloop
return char+line
endfunction
function DisplayCenteredTextToPlayer takes player toPlayer, real y, string message returns nothing
call DisplayTextToPlayer(toPlayer, 0.25, y, GetCenteredMessage(message))
endfunction
function DisplayTimedCenteredTextToPlayer takes player toPlayer, real y, real duration, string message returns nothing
call DisplayTimedTextToPlayer(toPlayer, 0.25, y, duration, GetCenteredMessage(message))
endfunction
endlibrary
library [B]MyBrary[/B] requires AIDS
function test takes nothing returns nothing
call DoNothing( )
endfunction
endlibrary

function test takes unit u, integer i, player p returns nothing
local texttag tt = CreateTextTag()
call SetTextTagText(tt, (text), 0.024)
call SetTextTagPos(tt, GetUnitX(u) - 16.0, GetUnitY(u), 0.0)
call SetTextTagColor(tt, 0, 200, 80, 255)
call SetTextTagVelocity(tt, 0.0, 0.04)
call SetTextTagVisibility(tt, GetLocalPlayer()==p)
call SetTextTagFadepoint(tt, 1.0)
call SetTextTagLifespan(tt, 2.0)
call SetTextTagPermanent(tt, false)
set text = null
endfunction

Những cái Animation mà có - số thì ko bao giờ sài đc, ko bao giờ nó ra chuẩn theo mình mún, nó ra ngẫu nhiên
Cho hỏi có tool nào giúp khóa map, xong nếu bị depro ra thì toàn bộ item unit buff tạo mới ( Custom ) bị del theo luôn, trở về 1 dạng như map melee bt
Thấy có vài map TQ khi depro ra nó mất sạch hết![]()
chứ đâu ra cái tool đó
cái công thức của tớ là xdep lành bó tay thôi. còn về vụ đó thì tớ cũng lành bó tay 
Cho hỏi có tool nào giúp khóa map, xong nếu bị depro ra thì toàn bộ item unit buff tạo mới ( Custom ) bị del theo luôn, trở về 1 dạng như map melee bt
Thấy có vài map TQ khi depro ra nó mất sạch hết![]()

Eh men ! điền ô Animation Names thế nào để skill đc cái ani hiện là " Attack - 2 " ? "attack" bình thường thì dễ nhưng thêm số 2 voa thì ?!?

Thế hỏi cái khác dễ hơn: Trog trigger, Lệnh Action thế nào để remove 1 group tên là [a] khỏi game ?
