HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Name Spoof and Color Spoof Triggers

03-15-2009, 02:16 PM#1
Deadly_Shadow
First off, i am not asking for a hack. I simply wish to know how to make a trigger to change your name and color in game. or if any of you have an unprotected map with these features i would greatly apreciate it if you could send it my way. I do not wish to rip off anyones maps, simply to learn how to make these triggers.
Ex. nomorholywar's Polar Escape maps
they have both of these features, actualy the exact ones i want. he says he will send anyone an unprotected version if they ask, but i emailed him 3 times already in the last 2 and a half months and still no reply.
Thanks for any and all help.
03-16-2009, 06:54 AM#2
Pyrogasm
Trigger:
Player - Change name of (Player 1 (Red)) to (|c00ff00 + ((Name of (Player 1 (Red)))) + |r)
That's just an example. "|c00ff00...|r" is a color code; |c is required to start the code; the next 6 are hexidecimal values for the RGB values, and then the |r ends the color code.
03-16-2009, 08:56 PM#3
Deadly_Shadow
Thanks, i understand all that now, but i cant find the trigger. I have wc3 ROC. I dont know if that makes a difference.
03-16-2009, 09:46 PM#4
Blacktastic
RoC is alot more limited as to what it can do than TFT. TFT is cheap as hell so really it shouldn't be much trouble to pick it up. I never mapped in RoC though so I can't say for certain it isnt there.
03-17-2009, 01:29 AM#5
Deadly_Shadow
well i know it is because nomorholywar has it in his polar escape maps. I just cant seem to find it. The triggers are a bit harder to work with in this version as I hear. lucky me D:
03-17-2009, 03:24 AM#6
Blacktastic
So why not just get TFT?
03-17-2009, 01:34 PM#7
Deadly_Shadow
im already getting guild wars and im useing a few hundred for a robotics competition this week and next. so i dont realy have the money resources currently. is there anyone here that can help me with ROC. (btw im only 16)
03-17-2009, 01:50 PM#8
akolyt0r
it could be the jass native already exists for RoC aswell..
03-17-2009, 06:04 PM#9
ShadowWolf
Go mow a couple lawns and buy TFT. It's ~$20?

If you REALLY are interested in mapmaking for wc3, it's very much worth it to just bite the bullet and buy TFT.
03-17-2009, 06:37 PM#10
Deaod
Theres a native for changing a players name (SetPlayerName(whichplayer, newname))...And afaik RoC and TFT both support all natives. Just not via GUI.
03-18-2009, 02:03 PM#11
Deadly_Shadow
so just use jasscraft and input the data that way? im sure as long as its in jass format you can get the game to work it. (i hope)
04-25-2009, 12:38 PM#12
Deadly_Shadow
alright i got the program a long time ago to work out some trigger bugs but its not easy to use without a tutorial. anyone got a good one?
04-25-2009, 03:04 PM#13
Tastingo
I'm not sure if you figured it out yet. So I'll post some basic options. I also don't know how well you know JASS so I will just post a guide as if you don't know. Basicly just make your conditions and events how you want. Don't add the actions. Now convert to custom script. These were all made in thinking a chat event will fire them.

Say this is your trigger. (This is my trigger called Trig Unitled Trigger 001, it has no events no conditions no actions)
Collapse JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

function Trig_Unitlted_Trigger_001_Actions is where all your actions will be, and must be before the endfunction. Here are some choices for code to fill in between.

Setting the Triggering Player name. (No Color)
Collapse JASS:
call SetPlayerName( GetTriggerPlayer(), "Enter Name")

Setting the Triggering Player name with color
Collapse JASS:
call SetPlayerName( GetTriggerPlayer(), "|cffFF0000Enter Name" )


Setting the Triggering Player name with color and substring. (Change |cffFF0000 for your color, and the number "0" to wherever you want it to start)
Collapse JASS:
call SetPlayerName( GetTriggerPlayer(), ( "|cffFF0000" + SubString(GetEventPlayerChatString(), 0, StringLength(GetEventPlayerChatString())) ) )

I will just set a player name so my code would look like this.
Collapse JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call SetPlayerName( GetTriggerPlayer(), "Enter Name" )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

Hope that helps :).
04-25-2009, 03:42 PM#14
Alevice
Tatingo. The substring one would need a chat event to fire it.
04-25-2009, 08:40 PM#15
Tastingo
Ya I know the purpose was for if he didn't know where to put one of those functions/calls/actions. I said it was a blank trigger purposely :). It wasn't a copy and paste, but to help teach him. But thank you I will say it needs one.