Author Topic: [XP] Global Switches and Variables for RMX-OS  (Read 26982 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
[XP] Global Switches and Variables for RMX-OS
« on: January 07, 2010, 09:25:30 PM »
Global Switches and Variables for RMX-OS
Authors: Blizzard
Version: 1.3
Type: RMX-OS plugin
Key Term: RMX-OS Plugin

Introduction

This script will allow to have global switches and variables on your server.

This script is to be distributed under the same terms and conditions like the script it was created for: RMX-OS.

Features

  • easy to configure
  • controls a certain set of switches globallly
  • controls a certain set of variables globallly

Screenshots

N/A for this sort of script.

Demo

N/A

Script

Just make a new script above main and paste this code into it.
(click to show/hide)

Make a new file with an .rb extension in the Extensions folder of RMX-OS and copy-paste this script into it.
(click to show/hide)


Instructions

In the script in the first comment.

Compatibility

Requires RMX-OS to work.

Credits and Thanks

  • Boris "Blizzard" Mikić

Author's Notes

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
« Last Edit: March 23, 2019, 06:34:03 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #1 on: January 08, 2010, 12:45:01 AM »
Okay so pretty much this can be used like this.

Theres one chest in the Forest of Killer Bunnies. It has 5000 gold.
When someone opens it it then turns on a global switch and no one else can get that gold right?

If thats what it is. Awesome script.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #2 on: January 08, 2010, 04:28:52 AM »
yet again you beat me and my busy ass to it :P
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #3 on: January 08, 2010, 10:50:33 AM »
Lol! Well, I have that and some other scripts (RMX-OS + Blizz-ABS stuff) that I need to finish by the end of this month so I if you want me not to beat you to it, you better get working. xD

@G_G: Yup. Stuff is still saved in the database, but as soon as you enter the server, your switches and variables are overwritten by the with the global values. Also, this script does not ensure consistency completely. The game designers has to take care of that themselves.
« Last Edit: January 08, 2010, 10:52:25 AM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Hellfire Dragon

  • Astral Trancist
  • *****
  • Posts: 768
  • LV: 24
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #4 on: January 08, 2010, 04:14:46 PM »
Awesome script Blizz :D

Offline edwardthefma

  • Transcended Spirit
  • ***
  • Posts: 134
  • LV: 3
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #5 on: January 11, 2010, 12:05:16 AM »
this script works  it is badd ass this is going to be the key to having a monstor killed and having the pepol
in the map see it happen
tho i have a question
 if i hit a swich and stay thare
and some 1 else enters the map dose it swich that same swich for them
« Last Edit: January 11, 2010, 07:22:51 PM by edwardthefma »
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
 shellium.org :) free linux shells pm me and i will gladly
help you get 1

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #6 on: February 22, 2010, 10:14:34 AM »
Update to v1.01.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #7 on: February 25, 2010, 05:14:19 PM »
Quote from: the script
Code: [Select]
raise 'ERROR: The "Global DNS" requires RMX-OS 1.09 or higher.'
"Global DNS" ?

lol
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #8 on: February 26, 2010, 09:28:28 AM »
Lulz

*fixes*
« Last Edit: February 26, 2010, 09:30:33 AM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Sith-Man

  • Guest
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #9 on: March 23, 2010, 09:59:48 AM »
Could this be used for having a character show up on a different map after having been talked to?

Like if I wanted to have an area where a player could select party members, and have the selectable characters be walking around the area after having been unlocked/recruited.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #10 on: March 23, 2010, 10:14:02 AM »
You don't need GLOBAL switches for that.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #11 on: April 20, 2010, 01:36:49 AM »
is it possible to have a global variable equal to a string?

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #12 on: April 20, 2010, 02:37:03 AM »
use this in a script call.
Code: [Select]
$game_variables[id] = "string here"

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #13 on: April 20, 2010, 05:12:13 AM »
I have, and it works fine when i dont do a global variable, but when i do, it always is 0.

Offline stripe103

  • Astral Trancist
  • *****
  • Posts: 570
  • LV: 18
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #14 on: June 29, 2010, 04:13:34 PM »
I have a problem with this script. When I make a global variable or switch and try to change them, they just change back to 0 or false. I can't even see that it changes on the game but on the server it says that they are changed.
These are the scripts I use(in the current order):
Code: [Select]
RMX-OS
Global Vars and Switches
Blizz-ABS 1, 2 and 3
Blizz-ABS Controller for RMX-OS
Questbook by Zeriab
Self Variables by DrakoShade
The Chaos Project Debug Menu by Blizzard
Location Window by Hunter X
Multiple Timers by Glitchfinder
ForeverZer0's Advanced Weather(the one based on Ccoa's script)
and at last the RMX-OS Main

By Axerax

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #15 on: June 29, 2010, 05:07:18 PM »
http://forum.chaos-project.com/index.php/topic,23.0.html

Also, you didn't configure the script properly.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline stripe103

  • Astral Trancist
  • *****
  • Posts: 570
  • LV: 18
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #16 on: June 29, 2010, 05:24:46 PM »
I have changed the order of the scripts and they are still not working. But what did I miss in the configuration?
I did configure the what switches and variables should be global, both on the client and the server.

By Axerax

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #17 on: June 29, 2010, 07:02:46 PM »
Did you activate the extension?
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline stripe103

  • Astral Trancist
  • *****
  • Posts: 570
  • LV: 18
  • Gender: Male
    • View Profile
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #18 on: June 29, 2010, 08:31:23 PM »
Yes I did. That is the strange thing. I have made everything I was supposed to. Setup the script in the client. Adding the extension on the server and setting that up and adding the extension file name to the config.ini file. But I think that the server and client communicates enough since the server knows when a global variable/switch is changed. The thing is that it change it back to 0/false.

EDIT: I just have to ask. Can it be the server computer itself that is to old? The game runs and all but the computer is about 7 years old. It is my parents old computer. I'm just using it as a developement server. I will hopefully change it later.
« Last Edit: June 29, 2010, 08:33:16 PM by stripe103 »

By Axerax

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Switches and Variables for RMX-OS
« Reply #19 on: June 30, 2010, 08:41:46 AM »
Well, the RMX-OS server system is relatively lightweight so a weak server machine shouldn't become a bottleneck if there are only a few players online.

Try finding the file to which the server saves the global switches and variables and see if they are properly saved. Also, make sure you are using the newest versions. I changed something recently and I had to update a few RMX-OS pkugins so they work with the newest version of RMX-OS.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.