Mythruna

Modder's Workbench => Scripting => Topic started by: GaraQuor on October 21, 2012, 06:28:30 AM



Title: Cash-System V0.1 by Gara
Post by: GaraQuor on October 21, 2012, 06:28:30 AM
Hello everybody :D
I have create a script for Mythruna server.
it adds a system of money ^ ^ + a system of sale of plots easily

-The commands:
"~cash" allows you to view your account.
"~givecash" can give money to another player. (Ex: "~givecash Test 200")

-Configurations:
-static File CashFile = new File( "scripts/Cash-Player.txt" )
Path of the backup file of account

/!\ /!\ Warning /!\ /!\
-static def PASSOWRD = "azerty"

You absolutely must change the "password", replace it with anything (as long as it's still letters) but change absolutely.
If you do not change your Cash System is in danger

-static def StartCash = 200;
It will be the starting cash for each player

-The sale of a plot (strongholds, plots, ....)
To sell a plot you must have a plot ^^
Then you must place this object in the property
(http://img15.hostingpics.net/pics/964661Mythruna1350821394452.png)

and you must rename your property by a number such as "200" to sell your plot for 200$
(http://img15.hostingpics.net/pics/328820Mythruna1350821394453.png)

Here is your plot for sale !



-To purchase a plot

To see the price of a plot you must select the "Plot Info"
And left-click on the object of sale (sign)
(http://img15.hostingpics.net/pics/194471Mythruna1350821394454.png)

To buy a plot you must select the "Buy"
And left-click on the object of sale (sign)
(http://img15.hostingpics.net/pics/845569Mythruna1350821394455.png)

Here, I hope this script will help you.
I intend to develop as much as possible :D

Ah yes: p
The download link is http://www.mythruna-france.tk/download/Cash-System.init.groovy.php (http://www.mythruna-france.tk/download/Cash-System.init.groovy.php)
*And sorry for my very bad English :)


Title: Re: Cash-System V0.1 by Gara
Post by: Sean on October 21, 2012, 07:58:44 AM
This is quite amazing!


Title: Re: Cash-System V0.1 by Gara
Post by: ap0r on October 21, 2012, 08:26:52 AM
Awesome but only a fraction of keyboards worldwide have the "~". I'd suggest you get a replacement key or very little persons will be able to play with your mod.

Cheers!


Title: Re: Cash-System V0.1 by Gara
Post by: GaraQuor on October 21, 2012, 08:57:39 AM
I have no choice because the server commands are well :/
in solo, the command starts with "/"
on the server, the commands starting with "~"

unless I misunderstood but I like that it works with me

With script admin pack
this is the same

http://mythruna.com/mediawiki/index.php?title=Running_a_Server (http://mythruna.com/mediawiki/index.php?title=Running_a_Server)


Title: Re: Cash-System V0.1 by Gara
Post by: belgariad87 on October 21, 2012, 10:48:07 AM
huh, this is very nice. Keep this stuff coming!


Title: Re: Cash-System V0.1 by Gara
Post by: pspeed on October 21, 2012, 11:33:27 AM
First, this is really excellent.  I haven't had a chance to play with it yet but from the description and initiative shown it's just awesome.

Ah yes: p
The download link is http://95d68402.linkbucks.com (http://95d68402.linkbucks.com) (I put a system of remuneration if I is not right I will withdraw immediately :) )

I don't really have a problem with it right now.  The screen was a little confusing and did a pop-under giant full screen thing when I clicked the "Skip" link so that I could download it.

Eventually the Mythruna store will let you sell things or accept optional payment, etc..  That's not for a while yet, I think.  In the mean time, I think this approach is ok but please keep in mind that things are in flux and I may ask you to change this later.

But all that being said, I'm really excited to see this.  I hope it is just the first of many plug-ins and it already raises the plug-in system in my priority list. :)  As I redesign the main menus, I've been incorporating a plug-in management page that I planned to leave "invisible" until implemented... but now maybe I will implement it sooner.


Title: Re: Cash-System V0.1 by Gara
Post by: pspeed on October 21, 2012, 11:47:46 AM
Oh, and the Gara is right... when you implement new commands on the server side they have to start with the ~ character.  This used to be the way to open pretty much every game console way back when (since Quake at least) so I figured it was safe.

This is how the chat console knows whether to execute the command locally or forward it to the server... it also keeps the command help separate since ~help and /help give two different lists.

I could probably fix this and make the key configurable but I don't know when I will get to it.  I've even considered making ~ (or some configurable key) pop open the chat bar in command mode automatically so that you don't have to hit enter first.

Note: it should be possible to create a client-side plug-in that registers / versions of the commands that simply forward to ~ versions... but it makes Gara's plug-in a little less convenient since right now it's a server-side only plug-in.  (though I guess the client-side one would be an optional plugin for those who can't use ~)


Title: Re: Cash-System V0.1 by Gara
Post by: Michael on October 21, 2012, 12:06:14 PM
another good key for commands could be the Slash '/' for one person, and a backslash '\' for the server command.
/help = local
\help = server
help\ = server
\help\ = server

? eh?


Title: Re: Cash-System V0.1 by Gara
Post by: pspeed on October 21, 2012, 12:13:28 PM
another good key for commands could be the Slash '/' for one person, and a backslash '\' for the server command.
/help = local
\help = server
help\ = server
\help\ = server

? eh?

No, backslash is an escape character for encodings.


Title: Re: Cash-System V0.1 by Gara
Post by: FutureB on October 21, 2012, 01:33:32 PM
This is fantastic Gara, one question for paul, would we be able to use this in your server just from downloading the client plug in or would you have to do the server plugin aswell, another thing is would you use this plug in paul?

lastly does this just work with strong holds or towns and citys aswell. and does it work with the plots in citys and towns?

goodwork gara :P


Title: Re: Cash-System V0.1 by Gara
Post by: ap0r on October 21, 2012, 04:21:08 PM
another good key for commands could be the Slash '/' for one person, and a backslash '\' for the server command.
/help = local
\help = server
help\ = server
\help\ = server

? eh?

No, backslash is an escape character for encodings.

maybe use something simple like "<"  ?


Title: Re: Cash-System V0.1 by Gara
Post by: pspeed on October 21, 2012, 06:31:06 PM
This is fantastic Gara, one question for paul, would we be able to use this in your server just from downloading the client plug in or would you have to do the server plugin aswell, another thing is would you use this plug in paul?

lastly does this just work with strong holds or towns and citys aswell. and does it work with the plots in citys and towns?

goodwork gara :P

This is a server-side plug-in... and no, I don't plan to add it to the public server.


Title: Re: Cash-System V0.1 by Gara
Post by: Michael on November 03, 2012, 05:56:26 PM
May you add a money name? a while back, i thought of runas as the money name, EX: 200 runas.


Title: Re: Cash-System V0.1 by Gara
Post by: pspeed on November 03, 2012, 06:06:01 PM
I can say 100000000% that the real game will never have money called "runas".  Modders are welcome to do as they wish, of course.


Title: Re: Cash-System V0.1 by Gara
Post by: Michael on November 03, 2012, 06:07:27 PM
Hey gara, do you mind if i try to make my own version?


Title: Re: Cash-System V0.1 by Gara
Post by: GaraQuor on November 03, 2012, 07:21:10 PM
Go there :)


Title: Re: Cash-System V0.1 by Gara
Post by: Michael on November 03, 2012, 07:50:53 PM
Go there :)
YAY!
EDIT: thank you so much :)