RPG Triggers

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
BrisbaneRz
Member
Posts: 59
Joined: May 20th, 2007, 9:19 am

RPG Triggers

Post by BrisbaneRz »

Need help with rpg triggers.
Seen done with sample

Events:PlayerX types -save as exact
Condition:Unit equals hero true
Actions:Save hero as code XXXXXXXXXXX
String XXXXXXXXXXX
Show code XXXXXXXXXXX

I really don't know how to operate it
Can anyone show another easy sample
Image
Without Optimized Connection(Non-Peak Local time)
Image
With Optimized Connection(Non-Peak Local time)
Image
Lol sad...[FURTHEST Country to me , with internet server in SpeedTest.net](Non-Peak Local time)
http://www.speedtest.net/summary.php
WOW HOT PROOF :D
User avatar
Totti_8
S.M.B. Creator
Posts: 84
Joined: January 20th, 2007, 11:32 am
Location: Germany

Post by Totti_8 »

there are 2 ways to do this.

1. you can make your own code-system that generates a code but this is hard because you must encode it yourself and then decode it with another trigger... very complex.

2. You can use Gamecache for saving your Hero. Its saver and easier to do i think.
Here is an example for such a Save-System:

First you must copy this function in the Header of the Map:

//Get Generated Code
function GetGeneratedCode takes integer Length returns string
local integer I0
local integer RandomNumber
local string CodeWords
local string EndCode
set CodeWords = "0123456789abcdefghijklmnopqrstuvwxyzßABCDEFGHIJKLMNOPQRSTUVWXYZ"
set I0 = 0
loop
exitwhen(I0 > Length)
set RandomNumber = GetRandomInt(0, StringLength(CodeWords))
set EndCode = (EndCode + SubString(CodeWords, RandomNumber, (RandomNumber + 1)))
set I0 = (I0 + 1)
endloop
return EndCode
endfunction


Then you create a Trigger called "Save":

Save
Events
Player - Player 1 (Red) types a chat message containing -save as An exact match
Player - Player 2 (Blue) types a chat message containing -save as An exact match
Player - Player 3 (Teal) types a chat message containing -save as An exact match
Player - Player 4 (Purple) types a chat message containing -save as An exact match
Player - Player 5 (Yellow) types a chat message containing -save as An exact match
Player - Player 6 (Orange) types a chat message containing -save as An exact match
Player - Player 7 (Green) types a chat message containing -save as An exact match
Player - Player 8 (Pink) types a chat message containing -save as An exact match
Player - Player 9 (Gray) types a chat message containing -save as An exact match
Player - Player 10 (Light Blue) types a chat message containing -save as An exact match
Conditions
Actions
Custom script: local string GameCacheName = GetGeneratedCode( 5 )
Custom script: call InitGameCache( GameCacheName + GetPlayerName( GetTriggerPlayer() ) + "2-3 Letters you've choosen. Example: xyz" + ".w3v" )
Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0.00, 0.00, 30.00, GameCacheName)
Game Cache - Store your Hero as Hero of Heros in (Last created game cache)
Game Cache - Save (Last created game cache)


Then you need a Load-Trigger:

Load
Events
Player - Player 1 (Red) types a chat message containing -load as A substring
Player - Player 2 (Blue) types a chat message containing -load as A substring
Player - Player 3 (Teal) types a chat message containing -load as A substring
Player - Player 4 (Purple) types a chat message containing -load as A substring
Player - Player 5 (Yellow) types a chat message containing -load as A substring
Player - Player 6 (Orange) types a chat message containing -load as A substring
Player - Player 7 (Green) types a chat message containing -load as A substring
Player - Player 8 (Pink) types a chat message containing -load as A substring
Player - Player 9 (Gray) types a chat message containing -load as A substring
Player - Player 10 (Light Blue) types a chat message containing -load as A substring
Conditions
Actions
Game Cache - Create a game cache from ((Substring((Entered chat string), 7, 11)) + ((Name of (Triggering player)) + your 3 Letters! + .w3v))
Game Cache - Restore Hero of Heros from (Last created game cache) for (Triggering player) at your Area facing (Random angle)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Last restored unit) Not equal to No unit
Then - Actions
Want do you want to do with the Hero. Perhaps you want to display that its the Right Code or something like that...
Else - Actions
Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: |c00FF0000Invalid Code!



I hope you understand this ;)
Image
User avatar
BrisbaneRz
Member
Posts: 59
Joined: May 20th, 2007, 9:19 am

lol

Post by BrisbaneRz »

this is a bit hard to catch
Image
Without Optimized Connection(Non-Peak Local time)
Image
With Optimized Connection(Non-Peak Local time)
Image
Lol sad...[FURTHEST Country to me , with internet server in SpeedTest.net](Non-Peak Local time)
http://www.speedtest.net/summary.php
WOW HOT PROOF :D
Sir-Tanks
Forum Spammer
Posts: 635
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Re: lol

Post by Sir-Tanks »

BrisbaneRz wrote:this is a bit hard to catch


Keep trying, i did it :P so it cant be that hard
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
Bartimaeus²

Re: lol

Post by Bartimaeus² »

Sir-Tanks wrote:
BrisbaneRz wrote:this is a bit hard to catch


Keep trying, i did it :P so it cant be that hard


fag, some of us are handicapped... :D
Sir-Tanks
Forum Spammer
Posts: 635
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Re: lol

Post by Sir-Tanks »

Baertaemias wrote:
Sir-Tanks wrote:
BrisbaneRz wrote:this is a bit hard to catch


Keep trying, i did it :P so it cant be that hard


fag, some of us are handicapped... :D

lol i am, im dyslexic :)
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
Bartimaeus²

Post by Bartimaeus² »

Oh, sorry... :roll:
namespoofer
V.I.P.
Posts: 332
Joined: March 4th, 2007, 12:39 am
Location: United States

Post by namespoofer »

Isn't dyslexic when you can write with both hands or something? :?
Image
Doesn't Dekar make the world easier?

"I Wumbo. YOU Wumbo. He she me.. WUMbo. Wumbo; WumboING; WumBOLogy; the study of WUMBO. It's first grade, Spongebob!"
"I'm sorry I doubted your great wisdom Patrick!"

Catch me on Azeroth (U.S. East) - NameSpoofer
Sir-Tanks
Forum Spammer
Posts: 635
Joined: May 29th, 2007, 9:02 am
Title: Strange old man
Location: London, England

Post by Sir-Tanks »

namespoofer wrote:Isn't dyslexic when you can write with both hands or something? :?

Are you serious?
Sir-Tanks is BACK and working on his new map Acts of War!
Take the best Stupidity test here
namespoofer
V.I.P.
Posts: 332
Joined: March 4th, 2007, 12:39 am
Location: United States

Post by namespoofer »

Yes.. :cry: splain please! :D :D
Image
Doesn't Dekar make the world easier?

"I Wumbo. YOU Wumbo. He she me.. WUMbo. Wumbo; WumboING; WumBOLogy; the study of WUMBO. It's first grade, Spongebob!"
"I'm sorry I doubted your great wisdom Patrick!"

Catch me on Azeroth (U.S. East) - NameSpoofer