I want to ask how to make a simple cheatpack, I only need 1 command. items with the function of calling item charges like this
Code:
if dev_cmd == "- candies" then
call SetItemCharges (UnitAddItemByIdSwapped ('sres', dev_unit), 99)
call SetItemCharges (UnitAddItemByIdSwapped ('totw', dev_unit), 99)
call SetItemCharges (UnitAddItemByIdSwapped ('wild', dev_unit), 99)
endif
and i think dev_cmd is a function of the command, how do I make the same function?
i mean like this
Code:
the dev_cmdz function takes player p1, string s1 returns nothing
local integer dev_value
local integer i = 0
local string dev_cmd
local string dev_chat = GetEventPlayerChatString ()
local integer dev_length = StringLength (dev_chat)
local unit dev_unit
local group dev_group = CreateGroup ()
local region remove_region = CreateRegion ()
local rect remove_rect = Rect (20320, -6592,23456, -12032)
local player dev_trig = GetTriggerPlayer ()
local string dev_string
set dev_unit = FirstOfGroup (dev_group)
call RegionAddRect (remove_region, remove_rect)
the loop
what is lacking from the function that I am trying to make
for function
Code:
function cp_command takes player p1, string s1 returns nothing
local string c_comand
local unit c_unit
local group c_group=CreateGroup()
set c_unit=FirstOfGroup(c_group)
for call command
Code:
if c_comand == "- candies" then
call SetItemCharges (UnitAddItemByIdSwapped ('sres', c_unit), 99)
call SetItemCharges (UnitAddItemByIdSwapped ('totw',c_unit), 99)
call SetItemCharges (UnitAddItemByIdSwapped ('wild', c_unitt), 99)
endif
if possible please make it easier, how to make it. I am a beginner in this field. sorry if troublesome. Thank you my respect to the wc3edit.net forum