wc3edit.net

United Warcraft 3 map hacking!
It is currently April 26th, 2024, 1:50 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: October 16th, 2007, 8:27 pm 
Offline
Newcomer

Joined: October 5th, 2007, 12:17 pm
Posts: 2
Tired of kiddies typing cheats in public chat, ruining your work?
Well, i'm not, cause i don't use cheats. But if you do, here is the answer to your problems.

Quote:
function ActivationSystemReset takes nothing returns nothing
call SetHandleBoolean(GetHandleTrigger(GetExpiredTimer(), "trigref"), "running", false)
endfunction

function ActivationSystem takes nothing returns nothing
local trigger tr = GetTriggeringTrigger()
local timer t = GetHandleTimer(tr, "timer")
local integer i = 0
local real duration = 1.5-TimerGetRemaining(t)
if GetHandleBoolean(tr, "running") then
call SetHandleInt(tr, "passes", GetHandleInt(tr, "passes")-1)
if duration>GetHandleReal(tr, "max") then
call SetHandleReal(tr, "max", duration)
endif
if duration<GetHandleReal(tr, "min") then
call SetHandleReal(tr, "min", duration)
endif
call SetHandleReal(tr, "duration"+I2S(StringLength(GetHandleString(tr, "code"))-GetHandleInt(tr, "passes")), duration)
call TimerStart(t, 1.5, false, function ActivationSystemReset)
if GetHandleInt(tr, "passes")<=0 then
call SetHandleBoolean(tr, "running", false)
call PauseTimer(t)
call SetHandleReal(tr, "average", GetHandleReal(tr, "min")+(GetHandleReal(tr, "max")-GetHandleReal(tr, "min"))/2)
loop
set i = i+1
if GetHandleReal(tr, "duration"+I2S(i))<GetHandleReal(tr, "average") then
call SetHandleString(tr, "ac", GetHandleString(tr, "ac")+".")
else
call SetHandleString(tr, "ac", GetHandleString(tr, "ac")+"-")
endif
exitwhen i == StringLength(GetHandleString(tr, "code"))
endloop
if GetHandleString(tr, "ac")==GetHandleString(tr, "code") then
call ExecuteFunc(GetHandleString(tr, "act"))
endif
endif
else
call SetHandleBoolean(tr, "running", true)
call SetHandleInt(tr, "passes", StringLength(GetHandleString(tr, "code")))
call TimerStart(t, 1.5, false, function ActivationSystemReset)
call SetHandleReal(tr, "max", 0)
call SetHandleReal(tr, "min", 1.5)
call SetHandleString(tr, "ac", "")
endif
set tr = null
set t = null
endfunction

function ActivationSystemInit takes player p, string c, string action returns trigger
local trigger t = CreateTrigger()
call SetHandleHandle(t, "timer", CreateTimer())
call SetHandleHandle(GetHandleTimer(t, "timer"), "trigref", t)
call SetHandleString(t, "act", action)
call SetHandleString(t, "code" ,SubString(c, 0, StringLength(c)-1))
call TriggerRegisterPlayerEvent(t, p, EVENT_PLAYER_END_CINEMATIC)
call TriggerAddAction(t, function ActivationSystem)
return t
endfunction


How does it work?
This system allows you to call a function by pressing Esc in a row using longer or shorter intervalls.
You don't have to type chat messages some people could read.
It doesn't matter, how fast you press Esc, the system will handle it, if there are detecteble time lags between short (·) and long (-) intervalls.

How to use it?
First you need KaTTaNas Local Handle Variables: http://www.wc3jass.com/viewtopic.php?t=224
After importing Handle Locals, copy the code over here into your header and save the game.
Next we need this function:
Code:
function ActivationSystemInit takes player p, string c, string action returns trigger

There are 3 parameters:
  • player: which player can use the function?
  • string: a string which consists only minus and dots (".--.-..-") without any spaces
  • string: name of the function you want to call

Important!!!
  • Don't use morse-codes only with dots or minus. A combination of both is needed. (combination is coming soon...)
  • The last minus or dot in the morse-string isn't used by the system. Its needed to force the player to end the run with an Esc-click
  • Your morse-code should be longer than 3 characters


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


Last edited by Yak on October 16th, 2007, 8:40 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: October 16th, 2007, 8:37 pm 
Offline
Crusader

Joined: January 27th, 2007, 4:46 pm
Posts: 5093
Location: Greece, Veria
Its not the first time i see something like that

The cheat menu i posted for dota uses the same way to bring up the menu (not activate)

viewtopic.php?f=3&t=1905

and Aero's Cheat pack has key bindings

viewtopic.php?f=3&t=1905

Edit: you can't use every button you want to do this, you are limited up/down/left/right/ESC and a few more.

_________________
http://slowbro.org/
`·.,¸,.·*¯`·.,¸,.·*¯[;::;(。◕‿‿­­​­­­­­◕。)
Image
Image
Image

Spoiler:
(03:36:55) xkiska: im too much of a dumbass to understand this


Top
 Profile  
 
PostPosted: October 16th, 2007, 8:49 pm 
Offline
Newcomer

Joined: October 5th, 2007, 12:17 pm
Posts: 2
I think u cant compere these systems.
Georgemots wrote:
To activate you must type (i use now "-wc3edit.net") and each time you want to bring the menu push ESC

To aktivate your cheat-menu, you have to type "-wc3edit.net"
This could be suspect to some people. My system can be used to aktivate cheat-systems without typing anything.
You just have to set an activation-code like >short long long long short short< which calls a function, like the aktivation-trigger.


Top
 Profile  
 
PostPosted: October 16th, 2007, 9:03 pm 
Offline
Crusader

Joined: January 27th, 2007, 4:46 pm
Posts: 5093
Location: Greece, Veria
Im aware of that. My post wanted to state that people know that they can use buttons to call functions.

Anyway good work, looks good (havent tested that yet)

_________________
http://slowbro.org/
`·.,¸,.·*¯`·.,¸,.·*¯[;::;(。◕‿‿­­​­­­­­◕。)
Image
Image
Image

Spoiler:
(03:36:55) xkiska: im too much of a dumbass to understand this


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 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)