[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > Triggers & Scripts


Triggers & Scripts In this forum you may ask for help on fixing a trigger or script. But if you need help getting started with a trigger, this is not the right place — use the World Editor Help Zone.

Closed Thread
 
Thread Tools
Old 08-12-2012, 07:49 PM   #1 (permalink)
Forum Moderator HappyTauren
MUHAMMAD MAN
 
HappyTauren's Avatar
Resource Moderator
 
Join Date: Nov 2006
Posts: 7,502
HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)
LUA - I have no idea why this doesn't work.

Jass:
//!   externalblock extension=lua ObjectMerger $FILENAME$
//! i     setobjecttype("abilities")
//! i
//! i     function GetHotkey(x,y)
//! i       if     y==0 then
//! i         if     x==0 then return "Q"
//! i         elseif x==1 then return "W"
//! i         elseif x==2 then return "E"
//! i         elseif x==3 then return "R"
//! i         end
//! i       elseif y==1 then
//! i         if     x==0 then return "A"
//! i         elseif x==1 then return "S"
//! i         elseif x==2 then return "D"
//! i         elseif x==3 then return "F"
//! i         end
//! i       elseif y==2 then
//! i         if     x==0 then return "Z"
//! i         elseif x==1 then return "X"
//! i         elseif x==2 then return "C"
//! i         elseif x==3 then return "V"
//! i         end
//! i       end
//! i     end
//! i
//! i     function FixValue(s)
//! i       if not s == "" then
//! i         tempstring = string.sub(s,1,1)
//! i         if     tempstring == "P" then return string.sub(s,2).."%"
//! i         elseif tempstring == "S" then return string.sub(s,2).." seconds"
//! i         elseif tempstring == "_" then return string.sub(s,2)
//! i         else return s
//! i         end
//! i       else
//! i         return s
//! i       end
//! i     end

//        TALENTS
//! i     talentcount = 0
//! i     talentchar = "T"
//! i     talentstring = "00"

//! i     function CreateTalent(type, name, level, only, cost, order, x, y, icon, desc)
//! i       if talentcount > 9 then
//! i         talentstring = talentchar + "0"
//! i       elseif talentcount > 99 then
//! i         talentstring = talentchar
//! i     end

//! i     createobject("AAns",talentchar..talentstring..talentcount)

//! i     makechange(current, "aart", "ReplaceableTextures\\CommandButtons\\BTN"..icon..".blp")
//! i     makechange(current, "Ans5", order)
//! i     makechange(current, "Ndt1", "0")
//! i     makechange(current, "Ndt2", cost)
//! i     makechange(current, "arac", "other")
//! i     makechange(current, "ahky", GetHotkey(x,y))
//! i    
//! i     if only == 0 then
//! i       makechange(current, "anam", "Talent - "..type.." - "..name.." ("..level..")")
//! i       makechange(current, "atp1", "Learn |cffffcc00"..name.."|r - ".."Level "..level.." [|cffffcc00"..GetHotkey(x,y).."|r]")
//! i     else
//! i       makechange(current, "anam", "Talent - "..type.." - "..name)
//! i       makechange(current, "atp1", "Learn |cffffcc00"..name.."|r [|cffffcc00"..GetHotkey(x,y).."|r]")
//! i     end
//! i    
//! i     makechange(current, "aub1", desc)
//! i     talentcount = talentcount + 1
//! i     end
//! i    
//! i     function AddTalent1(type, name, cost, order, x, y, icon, desc, f1, v1, f2, v2, f3, v3, f4, v4)
//! i       desc = "|cffffcc00Description|r: "..desc
//! i       if not f1 == "" then desc = desc.."|n|n|cffffcc00"..f1.."|r: "..FixValue(v1) end
//! i       if not f2 == "" then desc =   desc.."|n|cffffcc00"..f2.."|r: "..FixValue(v2) end
//! i       if not f3 == "" then desc =   desc.."|n|cffffcc00"..f3.."|r: "..FixValue(v3) end
//! i       if not f4 == "" then desc =   desc.."|n|cffffcc00"..f4.."|r: "..FixValue(v4) end      
//! i       CreateTalent(type, name, 0, 1, cost, order, x, y, icon, desc)
//! i     end
////////[ACTUAL SETUP]////////////////////////////////////////////
//               TYPE      NAME         COST LVL ORDERSTRING X Y ICON          DESCRIPTION                                                                             Field1   VAL    Field2      VAL   Field3   VAL  Field4      VAL
//! i AddTalent1("Combat", "Block",     1,       "defend",   0,1,"Defend",     "Gives a percentage of chance of blocking an attack, reducing damage by a percentage.", "Chance","P10", "Reduction","P50","",      "",  "",         ""  )
//!   endexternalblock
HappyTauren is offline  
Old 08-12-2012, 08:12 PM   #2 (permalink)
Forum Moderator PurgeandFire
ʕ•͡ᴥ•ʔ
 
PurgeandFire's Avatar
Resource & Tutorial Moderator
 
Join Date: Nov 2006
Posts: 3,565
PurgeandFire has much of which to be proud (1108)PurgeandFire has much of which to be proud (1108)PurgeandFire has much of which to be proud (1108)PurgeandFire has much of which to be proud (1108)PurgeandFire has much of which to be proud (1108)
Does it show an error or does it just not work?

If it shows an error post jassnewgenpack5d\logs\grimex.txt
PurgeandFire is online now  
Old 08-12-2012, 08:40 PM   #3 (permalink)
Forum Moderator HappyTauren
MUHAMMAD MAN
 
HappyTauren's Avatar
Resource Moderator
 
Join Date: Nov 2006
Posts: 7,502
HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)HappyTauren has a brilliant future (1690)
Code:
setobjecttype abilities
createobject T000
makechange 0 aart
makechange 0 Ans5
This is what the error file says.
Also,
Jass:
//! i     makechange(current, "Ans5", order)
When I remove everything below this line (and including this line) from the function, it compiles (but doesn't work). Now it doesn't even compile.

It seems to be the field "aub1" that I am having problems with. Why doesn't this let me change the value of extended tooltip?

Works now, I didn't know I had to specify a level. *sigh*

Last edited by HappyTauren; 08-12-2012 at 10:30 PM.
HappyTauren is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 06:00 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle