Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,219
Hello, I just "finished" a rep system since there isnt a approved one in the spell section.
However the "system" turned into a demo in my opinion (or atleast it feels like it)
anyway, looking for some feedback before actuall upload.
However the "system" turned into a demo in my opinion (or atleast it feels like it)
anyway, looking for some feedback before actuall upload.
-
init
-
Events
- Map initialization
- Conditions
-
Actions
- Hashtable - Create a hashtable
- Set RS_hash = (Last created hashtable)
- Set RS_name[1] = holy order
- Set RS_name[2] = Cult of TeddyBears
-
Events
-
remove faction demo
-
Events
- Player - Player 1 (Red) types a chat message containing remove as An exact match
- Conditions
-
Actions
- Set RS_id = 1
- Set RS_name[RS_id] = <Empty String>
- Custom script: call FlushChildHashtable(udg_RS_hash, udg_RS_id)
-
Events
-
add rep demo
-
Events
- Player - Player 1 (Red) skips a cinematic sequence
- Conditions
-
Actions
- Custom script: local integer old
- Set RS_id = 2
- Set RS_player = 1
- Set RS_rep_to_add = 5
- Custom script: set old = LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player)
- Custom script: call SaveInteger(udg_RS_hash, udg_RS_id, udg_RS_player, old + udg_RS_rep_to_add)
- Custom script: call BJDebugMsg(GetPlayerName(Player(udg_RS_id - 1)) + " increased his rep with " + udg_RS_name[udg_RS_id] + " by " + I2S(udg_RS_rep_to_add))
- Custom script: call BJDebugMsg(GetPlayerName(Player(udg_RS_id - 1)) + " now has " + I2S( LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player)) + " rep")
- Set RS_rep_event = 1.00
- Set RS_rep_event = 0.00
-
Events
-
get rep demo
-
Events
- Player - Player 1 (Red) types a chat message containing get rep as An exact match
- Conditions
-
Actions
- Set RS_id = 1
- Set RS_player = 1
- Custom script: call BJDebugMsg(GetPlayerName(Player(udg_RS_id - 1)) + " currently have " + I2S(LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player)) + " with " + udg_RS_name[udg_RS_id])
-
Events
-
reset rep demo
-
Events
- Player - Player 1 (Red) types a chat message containing reset rep as An exact match
- Conditions
-
Actions
- Set RS_id = 1
- Set RS_player = 1
- Custom script: call SaveInteger(udg_RS_hash, udg_RS_id, udg_RS_player, 0)
-
Events
-
add rank
-
Events
- Map initialization
- Conditions
-
Actions
- Set RS_player = 1
- Set RS_id = 1
- Set RS_point = 50
- Custom script: call SaveInteger(udg_RS_hash, 13, udg_RS_player, udg_RS_point)
- Set RS_point = 70
- Custom script: call SaveInteger(udg_RS_hash, 14, udg_RS_player, udg_RS_point)
-
Events
-
update rank
-
Events
- Game - RS_rep_event becomes Greater than or equal to 1.00
- Conditions
-
Actions
- Set RS_id = 1
- Set RS_players = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
-
Player Group - Pick every player in RS_players and do (Actions)
-
Loop - Actions
- Set RS_player = (Player number of (Picked player))
- Custom script: if LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player) >= LoadInteger(udg_RS_hash,13, udg_RS_player) then
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- faction1_rank_variable[RS_player] Less than 1
-
Then - Actions
- Game - Display to (All players) the text: ((Name of (Player(RS_player))) + ( reached rank 1 with + RS_name[RS_id]))
- Set faction1_rank_variable[RS_player] = 1
- Else - Actions
-
If - Conditions
- Custom script: endif
- -------- ---------------- --------
- Set RS_player = (Player number of (Picked player))
- Custom script: if LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player) >= LoadInteger(udg_RS_hash,14, udg_RS_player) then
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- facton2_rank_variable[RS_player] Less than 2
-
Then - Actions
- Game - Display to (All players) the text: ((Name of (Player(RS_player))) + ( reached rank 2 with + RS_name[RS_id]))
- Set facton2_rank_variable[RS_player] = 2
- Else - Actions
-
If - Conditions
- Custom script: endif
-
Loop - Actions
- Set RS_id = 2
-
Player Group - Pick every player in RS_players and do (Actions)
-
Loop - Actions
- Set RS_player = (Player number of (Picked player))
- Custom script: if LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player) >= LoadInteger(udg_RS_hash,13, udg_RS_player) then
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- faction1_rank_variable[RS_player] Less than 1
-
Then - Actions
- Game - Display to (All players) the text: ((Name of (Player(RS_player))) + ( reached rank 1 with + RS_name[RS_id]))
- Set faction1_rank_variable[RS_player] = 1
- Else - Actions
-
If - Conditions
- Custom script: endif
- -------- ---------------- --------
- Set RS_player = (Player number of (Picked player))
- Custom script: if LoadInteger(udg_RS_hash, udg_RS_id, udg_RS_player) >= LoadInteger(udg_RS_hash,14, udg_RS_player) then
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- facton2_rank_variable[RS_player] Less than 2
-
Then - Actions
- Game - Display to (All players) the text: ((Name of (Player(RS_player))) + ( reached rank 2 with + RS_name[RS_id]))
- Set facton2_rank_variable[RS_player] = 2
- Else - Actions
-
If - Conditions
- Custom script: endif
-
Loop - Actions
-
Events
Last edited: