![]() |
scripts using mysql (any kind of script) - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Requests (/Forum-Script-Requests) +--- Thread: scripts using mysql (any kind of script) (/Thread-scripts-using-mysql-any-kind-of-script) |
scripts using mysql (any kind of script) - ChaveS - 12-05-2012 12:25 PM My shard is going crazy, using many logs, vars, tag, etc... So no ill try to use mysql to store some infos. Already installed and connected mysql on local host. I remember on last forum we got many script samples using mysql... But on new forum we dont got so much... Someone has the old scripts so i can take a look.. Thats the way i learn! thanks! RE: scripts using mysql (any kind of script) - Barnabus - 12-11-2012 09:13 AM I believe you will suffer more reading and writing to an external database because you have said "My Shard is going crazy"..... (Juts to note on LOGS (These are not variables and don't use up memory)...... I would suggest removing the VARS in many cases you dont need to use variables as you have return and arguments with functions. If you already know the following forgive me and consider others browsing may find it useful to know how to reduce the VARLIST by removing some elsewhere Lets take a real life example to demonstrate how you can turn any situation into variables arguements and functions as well as just for fun: You just met a new girl and would like to have intimate relations with her in your own house. Though the whole event is dependant of 4 major factors. 1. You must remeber her name. 2. You must select a time when your wife isnt home. 3. You must phone and invite the the new girl around. 4. The girl must accept your invite. To relate this to your problem, you currently have the following VARS Code: // Stuff we dont know The stuff we do know can be either tagged to an ITEMdef in game or added to a DEFNAME Adding to a DEFNAME may use the same memory as a VAR but it is still a method for tidying up .VARLIST Code: [DEFNAME ExtraCurricularActivities] Code: [FUNCTION GetHerNameScam] "I am getting laid if I phone, get her name, invite her around when wife is out and she accepts". Lets pretend this Chicks morality lies somewhere similiar to your own, and she will accept if you use her name to invite her. InviteChickAround Depends on GetHerNameScam which is fired when you PhoneChick. As there is no sphere commands for phoning DialConnect Hangup and Reply we will just make up as would be functions So the whole thing will start with the command .PhoneChick and VAR.ChicksName and VAR.AmIGettingLaid will be completely gone. Code: [FUNCTION PhoneChick] |