wc3edit.net

United Warcraft 3 map hacking!
It is currently March 29th, 2024, 3:20 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: April 17th, 2020, 2:29 am 
Offline
Newcomer

Joined: September 20th, 2018, 10:50 am
Posts: 2
Map: Hero of The Empire 1.25b

Link map: http://hero-empire.com/load/download_he ... b/1-1-0-84

Request: Custom Commands

I just want commands like "-gold" or "-givegold". This is a great map, i want to beat it with my friends as legit as possible. But most of the time we lost because we lack the gold to don't click me better equipment

Thanks in advance to anyone who could do this!


Top
 Profile  
 
PostPosted: April 17th, 2020, 3:21 am 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
There's no point requesting a single command btw, it's easier to just add a full cheatpack.
But I actually love writing code so I made a custom command anyways.

Type -gold x to receive x gold
(i.e. -gold 100 gives you 100 gold)

This is the code for the command. Simple & short.
Spoiler:
Code:
globals
endglobals

function cc_givegold_cmd_act takes nothing returns nothing
    local player p = GetTriggerPlayer()
    local string src = GetEventPlayerChatString()
    local integer currentGold = GetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD)
    local string commandPart = SubString(src,0,6)
    local string goldPart = SubString(src,6,999)
    if(commandPart == "-gold ")then
        call SetPlayerState(p, PLAYER_STATE_RESOURCE_GOLD, currentGold + S2I(goldPart))
    endif
endfunction

function cc_givegold_cmd_init takes nothing returns nothing
    local trigger t = CreateTrigger()
    local integer i = 0
    loop
        exitwhen i > 24
        call TriggerRegisterPlayerChatEvent(t, Player(i), "-gold ", false)
        set i = i + 1
    endloop
    call TriggerAddAction(t, function cc_givegold_cmd_act)
    set t = null
endfunction

function main takes nothing returns nothing
    call cc_givegold_cmd_init()
endfunction


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: May 8th, 2020, 4:31 pm 
Offline
Newcomer

Joined: February 17th, 2020, 12:31 pm
Posts: 6
I want.how to edit size map.i edit finish but big size can't to creing for play :3


Top
 Profile  
 
PostPosted: May 8th, 2020, 10:13 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
You can't edit the map size without losing parts of the map.


Top
 Profile  
 
PostPosted: June 5th, 2020, 3:43 pm 
Offline
Newcomer

Joined: June 3rd, 2020, 11:51 pm
Posts: 2
Is there chance that you can edit


1: to reduce the lapse time being death to 10-15 sec max.

2: Assasin being able to use Bow items such as: The hunt begins (and it's evolutions) and Holy bow.

3: Make undroppable items dropables such as: Excalibur, Dragon Slayer

Thanks in advance


Btw great work at coding for a single command.


Top
 Profile  
 
PostPosted: June 6th, 2020, 10:02 pm 
Offline
Super Moderator

Joined: February 3rd, 2009, 11:28 pm
Posts: 2394
Please create a new request if you want another command written


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)