![]() |
Need help in general Scripting - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Need help in general Scripting (/Thread-Need-help-in-general-Scripting) |
RE: Need help in general Scripting - Kanibal - 04-27-2016 07:31 AM (04-27-2016 04:59 AM)roberpot Wrote: I treat with 1and1. Are cheap and linux vps are nice. Windows servers reboot all days (the one i contract yes...). I have windows 2003 server with six month uptime ![]() Need help in general Scripting - roberpot - 04-27-2016 08:37 AM The problem was not the os. The problem was the environment configured by 1and1. Is a shit. RE: Need help in general Scripting - Fronz - 04-27-2016 12:58 PM https://www.1and1.com/vps-hosting-packages With all this conversation it got me confused. If I get the 1 vCore will it be good? Again not planning on having a huge shard. If I have 100 players will I be able to run the shard with no lag or problems if I get the Virtual Server M? Potato, Fronz RE: Need help in general Scripting - XuN - 04-27-2016 04:07 PM Take in count that 1vCore will have to do all the OS's operations like executing background programs, etc. So you won't have the 100% of that vCore, there is also another thing to take in count: it is not the same 1 vCore with 1200mhz of speed than one with 4200mhz and that web does not specify it's speed. The same goes for the RAM: there is no need of insane amounts of ram (better to focus on quality (speed and so) than in capacity) but take in count that it's not only Sphere the only one using it. So while having expensive hardware is not really needed and will be a waste of money, trying to get the lowest and cheaper one is not a good idea tho. Try to get something like: Default SO + programs + vCore (higher speed possible) and 2gb ram (higher speed too) RE: Need help in general Scripting - Fronz - 04-28-2016 06:32 AM Okey. Gonna check for that thanks! Now I think I'm all set. I just need some final stuff before going live. Since it's my first time opening a shard what should I know and do? I already have SphereService, should I use Filezilla and host on the VPS too? Other questions are how do I set a live Player Status page on my Website? How do I rollback a save? Like if I have a problem and I have to load a previous save? How often should I backup the server and what files should I backup? Many thanks, Fronz RE: Need help in general Scripting - Kanibal - 04-28-2016 09:53 PM (04-28-2016 06:32 AM)Fronz Wrote: I already have SphereService, should I use Filezilla and host on the VPS too? Windows or Linux host? (04-28-2016 06:32 AM)Fronz Wrote: Other questions are how do I set a live Player Status page on my Website? Use MySQL DB for store players online etc. (04-28-2016 06:32 AM)Fronz Wrote: How do I rollback a save? Like if I have a problem and I have to load a previous save? Delete sphereworld.scp etc. and rename backup files. (04-28-2016 06:32 AM)Fronz Wrote: How often should I backup the server and what files should I backup? You dont need a backup ![]() Also you can use telnet, to connect and control Sphere ![]() RE: Need help in general Scripting - Fronz - 05-01-2016 11:46 AM Thanks man. Will make sure to follow your steps! I'll investigate the other stuff. It's a windows server! // ///////////////////////////////// Got a question now. Why is it when I make a potion with alchemy (any potion), I do it fine. But when I .save the sphere it gives an error ERROR:GC: 1 unplaced object deleted ERROR:UID=0438b8d8f, id=0419e 'night sight', Invalid code=3202 (Object not placed in the world) Yet the potion is still okey. Everything is alright. // /////////////////////////////////////// [ITEMDEF 0e9b] //Mortar & Pestle DEFNAME = i_mortar_pestle VALUE = 170 TYPE = t_script RESOURCES = 5 i_ingot_iron WEIGHT = 1 SKILLMAKE = TINKERING 70.0,t_tinker_tools ON=@Create MORE1 = 3 TAG.SKILL = 0.0 TAG.ID = TYPE = T_MORTAR ON = @Click if ( 0<TAG.CLICKED> == 0 ) TAG.CLICKED = <TIME> endif MESSAGE <NAME> if ( !strcmp( "<TAG.ID>", "" ) ) return 1 endif if ( (<TIME> - <TAG.CLICKED>) > 15 ) MESSAGE (click again to clear) else NAME = TAG.ID = TAG.SKILL = 0.0 MESSAGE *You wash the mortar and clear the pestle* endif TAG.CLICKED = <TIME> return 1 ON=@ContextMenuRequest SRC.AddContextEntry 747,5121 ON=@ContextMenuSelect IF (<ARGN>==747) NAME = TAG.ID = TAG.SKILL = 0.0 MESSAGE *You wash the mortar and clear the pestle* resendtooltip ENDIF ON=@DClick if (<TOPOBJ.UID> != <SRC.UID> ) src.sysmessage You must have the mortar and pestle in your pack. return 1 endif if (<MORE1> != 3 ) SRC.NEWITEM i_mortar_pestle SRC.ACT.BOUNCE REMOVE SRC.ACT.USE return 1 endif if ( !strcmp( "<TAG.ID>", "") ) SRC.ACT = <UID> SRC.SKILLMENU sm_alchemy return 1 endif if (<SRC.ACTION> != -1 ) SRC.SYSMESSAGE You must wait to perform another action. return 1 endif SRC.NEWITEM <TAG.ID> if ( (<SRC.ACT.TYPE> == t_potion) && (<SRC.RESTEST i_bottle_empty> == 0) ) SRC.SYSMESSAGE You have no bottles for your potion. elseif (<SRC.RESTEST <SRC.ACT.RESOURCES>> == 0 ) SRC.SYSMESSAGE You need <SRC.ACT.RESMAKE> to produce <SRC.ACT.NAME>. elseif ( !<SRC.CANMAKE <SRC.ACT.BASEID>> ) SRC.SYSMESSAGE You haven't got the faintest idea on how to produce <SRC.ACT.NAME>. else SRC.SYSMESSAGE You start producing <SRC.ACT.NAME>. SRC.MAKEITEM = <TAG.ID> SRC.TAG.MAKEITEM.LEVEL = <TAG.SKILL> endif //SRC.ACT.REMOVE return 1 // ///////////////////////////////////// [FUNCTION dialog_skill_alchemy] TAG.POTIONS = 0 VAR.CANMAKE = 0 DSA_POTION i_potion_CureLess DSA_SKILL 15.0 DSA_DESC1 Instantly cures even the simpler DSA_DESC2 poisons DSA_DESC3 " " DSA_POTION i_potion_NightSight DSA_SKILL 20.0 DSA_DESC1 Allows perfect sight even in the DSA_DESC2 most pure darkness DSA_DESC3 "" DSA_POTION i_potion_RefreshLess DSA_SKILL 30.0 DSA_DESC1 Instantly restores a small amount of DSA_DESC2 stamina DSA_DESC3 " " DSA_POTION i_potion_HealLess DSA_SKILL 33.0 DSA_DESC1 Instantly restores a small amount of DSA_DESC2 health DSA_DESC3 " " DSA_POTION i_potion_ExplosionLess DSA_SKILL 36.0 DSA_DESC1 When thrown, creates a small explosion, DSA_DESC2 damaging everyone in the close vicinity DSA_DESC3 "" DSA_POTION i_potion_AgilityLess DSA_SKILL 40.0 DSA_DESC1 Temporarily increases Dexterity DSA_DESC2 by a small amount DSA_DESC3 "" DSA_POTION i_potion_StrengthLess DSA_SKILL 45.0 DSA_DESC1 Temporarily increases Strength DSA_DESC2 by a small amount DSA_DESC3 "" DSA_POTION i_potion_PoisonLess DSA_SKILL 45.0 DSA_DESC1 Used to apply a weak DSA_DESC2 poison on certain weapons DSA_DESC3 "" DSA_POTION i_potion_ClevernessLess DSA_SKILL 50.0 DSA_DESC1 Temporarily increases Intelligence DSA_DESC2 by a small amount DSA_DESC3 "" DSA_POTION i_potion_Refresh DSA_SKILL 52.0 DSA_DESC1 Instantly restores a significant amount DSA_DESC2 of stamina DSA_DESC3 " " DSA_POTION i_potion_EmpowerLess DSA_SKILL 53.0 DSA_DESC1 Unknown DSA_DESC2 " " DSA_DESC3 " " DSA_POTION i_potion_Heal DSA_SKILL 54.0 DSA_DESC1 Instantly restores a significant amount DSA_DESC2 of health DSA_DESC3 " " DSA_POTION i_potion_Explosion DSA_SKILL 55.0 DSA_DESC1 When thrown, creates an explosion, DSA_DESC2 damaging everyone in the close vicinity DSA_DESC3 "" DSA_POTION i_potion_Cure DSA_SKILL 56.0 DSA_DESC1 Instantly cures even the average DSA_DESC2 poisons DSA_DESC3 " " DSA_POTION i_potion_Agility DSA_SKILL 60.0 DSA_DESC1 Temporarily increases Dexterity DSA_DESC2 by a significant amount DSA_DESC3 "" DSA_POTION i_potion_PermanenceLess DSA_SKILL 61.0 DSA_DESC1 Doubles the duration of the benefitial DSA_DESC2 spells already in effect DSA_DESC3 "" DSA_POTION i_potion_StoneSkin DSA_SKILL 63.0 DSA_DESC1 Hardens the skin to stone, thus raising DSA_DESC2 defense. It's effect is less noticeable DSA_DESC3 the stronger the Armour equipped. DSA_POTION i_potion_Strength DSA_SKILL 64.0 DSA_DESC1 Temporarily increases Strength DSA_DESC2 by a significant amount DSA_DESC3 "" DSA_POTION i_potion_Poison DSA_SKILL 65.0 DSA_DESC1 Used to apply an average DSA_DESC2 poison on certain weapons DSA_DESC3 "" DSA_POTION i_potion_ManaLess DSA_SKILL 66.0 DSA_DESC1 Instantly restores a small amount of DSA_DESC2 mana DSA_DESC3 " " DSA_POTION i_potion_Empower DSA_SKILL 67.0 DSA_DESC1 Unknown DSA_DESC2 " " DSA_DESC3 " " DSA_POTION i_potion_Cleverness DSA_SKILL 68.0 DSA_DESC1 Temporarily increases Intelligence DSA_DESC2 by a significant amount DSA_DESC3 "" DSA_POTION i_potion_Permanence DSA_SKILL 70.0 DSA_DESC1 Triples the duration of the benefitial DSA_DESC2 spells already in effect DSA_DESC3 " " DSA_POTION i_potion_CureGreat DSA_SKILL 71.0 DSA_DESC1 Instantly cures even the deadlier DSA_DESC2 poisons DSA_DESC3 " " DSA_POTION i_potion_RefreshGreat DSA_SKILL 72.0 DSA_DESC1 Instantly restores a large amount DSA_DESC2 of stamina DSA_DESC3 " " DSA_POTION i_potion_AgilityGreat DSA_SKILL 74.0 DSA_DESC1 Temporarily increases Dexterity DSA_DESC2 by a large amount DSA_DESC3 "" DSA_POTION i_potion_ExplosionGreat DSA_SKILL 76.0 DSA_DESC1 When thrown, creates a large explosion, DSA_DESC2 damaging everyone in the close vicinity DSA_DESC3 "" DSA_POTION i_potion_StrengthGreat DSA_SKILL 78.0 DSA_DESC1 Temporarily increases Strength DSA_DESC2 by a large amount DSA_DESC3 "" DSA_POTION i_potion_SteelSkin DSA_SKILL 80.0 DSA_DESC1 Hardens the skin to steel, thus raising DSA_DESC2 defense. It's effect is less noticeable DSA_DESC3 the stronger the Armour equipped. DSA_POTION i_potion_Mana DSA_SKILL 84.0 DSA_DESC1 Instantly restores a significant amount DSA_DESC2 of mana DSA_DESC3 " " DSA_POTION i_potion_HealGreat DSA_SKILL 86.0 DSA_DESC1 Instantly restores a large amount DSA_DESC2 of health DSA_DESC3 " " DSA_POTION i_potion_ClevernessGreat DSA_SKILL 88.0 DSA_DESC1 Temporarily increases Intelligence DSA_DESC2 by a large amount DSA_DESC3 "" DSA_POTION i_potion_PermanenceGreat DSA_SKILL 90.0 DSA_DESC1 Quads the duration of the benefitial DSA_DESC2 spells already in effect DSA_DESC3 " " DSA_POTION i_potion_PoisonGreat DSA_SKILL 90.0 DSA_DESC1 Used to apply a strong DSA_DESC2 poison on certain weapons DSA_DESC3 "" DSA_POTION i_potion_EmpowerGreat DSA_SKILL 93.0 DSA_DESC1 Unknown DSA_DESC2 " " DSA_DESC3 " " DSA_POTION i_potion_Invisibility DSA_SKILL 95.0 DSA_DESC1 This potion renders every particle in your DSA_DESC2 body translucent, as long as you remain DSA_DESC3 imobile DSA_POTION i_potion_Shrink DSA_SKILL 97.0 DSA_DESC1 Shrinks small pets, allowing them to DSA_DESC2 be carried with relative ease. DSA_DESC3 " " DSA_POTION i_potion_ManaGreat DSA_SKILL 99.0 DSA_DESC1 Instantly restores a large amount DSA_DESC2 of mana DSA_DESC3 " " DSA_POTION i_potion_ShrinkGreat DSA_SKILL 100.0 DSA_DESC1 Shrinks large pets, allowing them to DSA_DESC2 be carried with relative ease. DSA_DESC3 " " DSA_POTION i_potion_ra DSA_SKILL 100.0 DSA_DESC1 Allows the effects of reactive DSA_DESC2 armour to be used in potion form. DSA_DESC3 " " DSA_POTION i_potion_Emblaze DSA_SKILL 100.0 DSA_DESC1 Unknown DSA_DESC2 " " DSA_DESC3 " " DSA_POTION i_potion_hope DSA_SKILL 115.0 DSA_DESC1 Unknown DSA_DESC2 " " DSA_DESC3 " " DSA_POTION i_potion_PoisonFood DSA_SKILL 101.0 DSA_DESC1 Used to apply a strong DSA_DESC2 poison to food and drinks DSA_DESC3 " " DSA_POTION i_potion_PoisonDeadly DSA_SKILL 105.0 DSA_DESC1 Used to apply a deadly DSA_DESC2 poison on certain weapons DSA_DESC3 "" DSA_POTION i_blood_vampire DSA_SKILL 100.0 DSA_DESC1 Used by DSA_DESC2 necromancers DSA_DESC3 "" DSA_POTION i_blood_wither DSA_SKILL 100.0 DSA_DESC1 Used by DSA_DESC2 necromancers DSA_DESC3 "" DSA_POTION i_blood_strangle DSA_SKILL 100.0 DSA_DESC1 Used by DSA_DESC2 necromancers DSA_DESC3 "" if (<TAG.POTIONS> == 0 ) SRC.SYSMESSAGE You can't make anything with what you have. return 1 endif TAG.CURR.N = 0 DSA_NEXT DIALOG d_skill_alchemy [FUNCTION DSA_POTION] VAR.CANMAKE = 0 VAR.MAKE_ACT = <SRC.ACT> SRC.NEWITEM = <args> [FUNCTION DSA_SKILL] //if !(<SRC.RESTEST <SRC.ACT.RESOURCES>> ) if (<SRC.ALCHEMY> < <args> ) SRC.ACT.REMOVE SRC.ACT = <VAR.MAKE_ACT> return 1 endif VAR.CANMAKE = 1 TAG.POTIONS = <eval (<TAG.POTIONS> + 1)> TRY TAG.POTION.<TAG.POTIONS>.SKILL = <ARGS> TRY TAG.POTION.<TAG.POTIONS>.ID = <SRC.ACT.BASEID> TRY TAG.POTION.<TAG.POTIONS>.NAME = <SRC.ACT.NAME> TRY TAG.POTION.<TAG.POTIONS>.RESMAKE = <SRC.ACT.RESMAKE> TRY TAG.POTION.<TAG.POTIONS>.RESOURCES = <SRC.ACT.RESOURCES> SRC.ACT.REMOVE SRC.ACT = <VAR.MAKE_ACT> [FUNCTION DSA_DESC1] if (<VAR.CANMAKE> ) TRY TAG.POTION.<TAG.POTIONS>.DESC1 = <args> endif [FUNCTION DSA_DESC2] if (<VAR.CANMAKE> ) TRY TAG.POTION.<TAG.POTIONS>.DESC2 = <args> endif [FUNCTION DSA_DESC3] if (<VAR.CANMAKE> ) TRY TAG.POTION.<TAG.POTIONS>.DESC3 = <args> endif [FUNCTION DSA_NEXT] if (<TAG.CURR.N> == <TAG.POTIONS> ) return 1 endif TAG.CURR.N = <eval (<TAG.CURR.N>+1)> if (<TAG.CURR.N> == 1 ) VAR.PAGE0 = 1 VAR.PAGE1 = 2 VAR.PAGE2 = 3 elseif (<TAG.CURR.N> == <TAG.POTIONS> ) VAR.PAGE0 = 2 VAR.PAGE1 = 1 VAR.PAGE2 = 3 else VAR.PAGE0 = 3 VAR.PAGE1 = 2 VAR.PAGE2 = 1 endif [FUNCTION DSA_PREV] if (<TAG.CURR.N> == 1 ) return 1 endif TAG.CURR.N = <eval (<TAG.CURR.N>-1)> if (<TAG.CURR.N> == 1 ) VAR.PAGE0 = 1 VAR.PAGE1 = 2 VAR.PAGE2 = 3 elseif (<TAG.CURR.N> == <TAG.POTIONS> ) VAR.PAGE0 = 2 VAR.PAGE1 = 1 VAR.PAGE2 = 3 else VAR.PAGE0 = 3 VAR.PAGE1 = 2 VAR.PAGE2 = 1 endif [DIALOG d_skill_alchemy] 100, 100 page 0 resizepic 20 0 2600 374 334 // Curved Grey background //gumppic 0 0 8016 // -- with patch only text 60 45 0 1 text 70 65 61 10 text 60 100 0 2 croppedtext 70 120 290 40 51 14 text 60 200 0 3 text 70 220 41 11 text 70 240 41 12 text 70 260 41 13 button 300 70 2122 2123 1 0 5 // -- with patch only page <VAR.PAGE0> button 320 284 <eval 01196> <eval 01197> 1 0 1 //button 320 284 8018 8018 1 0 1 // -- with patch only page <VAR.PAGE1> button 320 0 <eval 0119a> <eval 01199> 1 0 2 //button 320 0 8017 8017 1 0 2 // -- with patch only page <VAR.PAGE2> button 320 284 <eval 01196> <eval 01197> 1 0 1 //button 320 284 8018 8018 1 0 1 // -- with patch only button 320 0 <eval 0119a> <eval 01199> 1 0 2 //button 320 0 8017 8017 1 0 2 // -- with patch only [DIALOG d_skill_alchemy TEXT] Potion recipes // 0 Recipe: Ingredients: Description: . . . . . . <TAG.POTION.<TAG.CURR.N>.NAME> // 10 <TAG.POTION.<TAG.CURR.N>.DESC1> // 11 <TAG.POTION.<TAG.CURR.N>.DESC2> // 12 <TAG.POTION.<TAG.CURR.N>.DESC3> // 13 <TAG.POTION.<TAG.CURR.N>.RESMAKE> // 14 <TAG.POTION.<TAG.CURR.N>.SKILL> // 15 . // 16 [DIALOG d_skill_alchemy BUTTON] ON = 1 // next DSA_NEXT DSA_APPLY DIALOG d_skill_alchemy return 1 ON = 2 // prev DSA_PREV DSA_APPLY DIALOG d_skill_alchemy return 1 ON = 0 SRC.SYSMESSAGE You set up the mortar to produce <TAG.POTION.<TAG.CURR.N>.NAME>. DSA_APPLY DSA_CLEARTAGS return 1 [FUNCTION DSA_APPLY] TAG.ID = <TAG.POTION.<TAG.CURR.N>.ID> TAG.SKILL = <TAG.POTION.<TAG.CURR.N>.SKILL> NAME = NAME = <NAME> (<TAG.POTION.<TAG.CURR.N>.NAME>) SOUND = 0057 [FUNCTION DSA_CLEARTAGS] SERV.NEWITEM i_mortar_pestle NEW.TAG.CLICKED=<TAG.CLICKED> NEW.TAG.ID=<TAG.ID> NEW.TAG.SKILL=<TAG.SKILL> NEW.NAME=<NAME> NEW.BOUNCE REMOVE // /////////////////////////////////////////////////// // /////////////////////////////////////////////////// Much Obliged, Fronz RE: Need help in general Scripting - Fronz - 05-02-2016 12:53 AM It's somewhere on the @Dclick, because it only happens when I double click it. Also, it happens when I have or don't have the reagents. Meaning if I don't have the regs when I .save it appears the same error. Same for no bottles etc. I assume it's this function SRC.NEWITEM <TAG.ID> if ( (<SRC.ACT.TYPE> == t_potion) && (<SRC.RESTEST i_bottle_empty> == 0) ) SRC.SYSMESSAGE You have no bottles for your potion. elseif (<SRC.RESTEST <SRC.ACT.RESOURCES>> == 0 ) SRC.SYSMESSAGE You need <SRC.ACT.RESMAKE> to produce <SRC.ACT.NAME>. elseif ( !<SRC.CANMAKE <SRC.ACT.BASEID>> ) SRC.SYSMESSAGE You haven't got the faintest idea on how to produce <SRC.ACT.NAME>. else SRC.SYSMESSAGE You start producing <SRC.ACT.NAME>. SRC.MAKEITEM = <TAG.ID> SRC.TAG.MAKEITEM.LEVEL = <TAG.SKILL> endif //SRC.ACT.REMOVE return 1 I just don't have enough knowledge to make it work. Sorry, Fronz RE: Need help in general Scripting - XuN - 05-02-2016 06:48 PM The problem is that you create that item, but you don't place it anywhere so it stands in 'limbo' ... forever and Sphere removes those items giving you a warning, so you can know that there is something wrong, just uncomment the 'SRC.ACT.REMOVE' line and you are done with it. RE: Need help in general Scripting - Fronz - 05-03-2016 12:10 AM You're right. Thanks! But the problem is, if I remove the // from that line the Mortar and Pestle is also removed. And that I don't want to. Is there a way to keep the Mortar and Pestle and not showing up those warnings on sphere? Everything works fine though, it's just every time I save I have those errors. Meaning if I get a few players doing Pots I'll get a shit load of errors on sphere :\ Edit: If it helps, the scripts I have for this Alchemy Script are a bit outdated to what the shards that used theses scripts had. I can't get hold to the newer scripts. But, if I remember correctly... In the improved scripts when you'd make a Potion the Mortar and Pestle would bounce on the backpack with the same tag it previously had. These scripts I have it doesn't, the Mortar and Pestle stays in the same place. Maybe is there a way for when the Potion is made the Mortar and Pestle gets removed and adds a new one with the same tag? Much Kudos, Fronz |