• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[feedback] [GUI] Rep System

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,288
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.


  • 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
  • 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)
  • 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
  • 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])
  • 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)
  • 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)
  • 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
          • 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
          • Custom script: endif
      • 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
          • 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
          • Custom script: endif
 
Last edited:
i think you should have a second event or a function call that happens when a player reaches a higher rank since that adds more functionality to the system for example
player reaches rank 2 > immediately has access to better weapons

this way you could run some extra code without having to scroll through this system to add it
 
@muzzel
A player can gain reputation with a faction. Once the player reaches X reputation points with a faction his relation to that faction increases. This system is used in most RPG games to gain acces to good weapons and/or other items.

@gorillabull
hm, that's actually a good idea. I will look into that tomarrow
 
Status
Not open for further replies.
Back
Top