![]() |
putting cooldown on scrolls - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: putting cooldown on scrolls (/Thread-putting-cooldown-on-scrolls) |
RE: putting cooldown on scrolls - Khaos - 02-19-2016 09:39 AM Code: on=@SpellCast Code: if (<argo.type> == t_scroll) // checks to be sure a scroll is being used. What errors are you getting? And do you have anything else affecting @SpellCast in another script. Just the original you had @SpellCast trigger twice in ONE script. RE: putting cooldown on scrolls - dunnetott - 02-19-2016 10:10 AM on=@SpellCast if (<argo.type> == t_spellbook) // Make sure the spell is being cast from a spellbook, if (<argn1> == 0||25||26||30) // Spell numbers which your script omitted, which led me to believe you didn't want them used smsg You do not know how that magic works. return 1 endif endif The left out spells was a mistake on my part Arch Mage is supposed to be abel to cast all spells so i might not even need the spell restrictions at all ![]() Anyway im getting this error in the console when i use the scroll in question 01:07:ERROR:(sphere_skills.scp,1651)Undefined symbol 'layer_memory' if you would like we have a dropbox and a github which you could check out if there is something you want to make sure im not fucking up? and im sorry for my newbie questions just picked up sphere again after 12 years away from Ultima Online so all my old knowledge is pretty much gone. RE: putting cooldown on scrolls - Khaos - 02-19-2016 11:35 AM Code: [SKILLCLASS 23] Code: [ITEMDEF i_memory_scroll_cooldown] There! That was actually MY mistake. I have a backwards compat for layer_memory. It made more sense to call it that than layer_special in my own code. ^_^ Took out your restrictions. RE: putting cooldown on scrolls - dunnetott - 02-19-2016 12:06 PM Thanks thee great one, i will test this script. My humble servants and I also posted this link in the description i send thy http://forum.spherecommunity.net/Thread-New-RP-server-looking-for-a-scripter Hmm its still not working and now im not getting errors in the console anymore. RE: putting cooldown on scrolls - Khaos - 02-19-2016 12:20 PM Well, I hope this works this time, as it should. It was just you don't have my spheredefs.scp file with all of my personal changes. Again, very sorry that happened!!! ^_^ Need to keep in mind sphere isn't set up as logical as I try to make things at times in the base packs. Hehee. Aww, thanks for sharing that link, but playing is not my thing. Just programming and designing it all. ^_^ Used to play a long time ago, but once you get into this end as deep as some of us are... The joys in playing seem to be lost. At least for myself that is. RE: putting cooldown on scrolls - dunnetott - 02-19-2016 12:29 PM well, we are searching for help that you seem to provide with excellence , if you want to help you can ^_^ we really appreciate the help anyhow , just for scripting if you want. Well at the moment the console are not outputting any errors when i cast the scroll now atleast but im still not receiving any coold down on it. ![]() RE: putting cooldown on scrolls - Khaos - 02-19-2016 01:01 PM The cool down is only 5 and 7 on those scrolls if I remember right, make them a bit longer and test, as the casting time might be close to those time spans. ![]() If there are no errors, it should be working right now. Another option is to take the @SpellCast code and remove it. Then make this: Code: [typedef t_scroll] Edited the top code as well. I forgot to switch a layer_memory to layer_special Try the code I posted before this with the new edit and change the timers to new.timer = 7 and new.timer = 7 to new.timer = 12. If that doesn't work. Let me know. Also, you could try this recent code and remove everything in @SpellCast Do you have anything else in your scripts using @SpellCast?! If so, you might want to move all of the code into the main @SpellCast on the skillclass, just be sure to remove any extra @SpellCast triggers when you do so. RE: putting cooldown on scrolls - dunnetott - 02-19-2016 08:58 PM the only place in the code where on=@spellcast is used is under other skillclasses that shouldent be a problem right since its diffrent codes? or am i wrong about that? yeah we put the time on 30 yesterday when you replied to see if that was the issue still no cooldown or errors tho. im going to try the new code and see if that method works. nothing works tried everything you told me and there still are no cooldown am i doing something horrible wrong? tested so everything loads into the server and i can spwn the memory scroll so that should be there. the skillclass im using is correct, tested with the equipment restriction to make sure i was in right skillclass. restarted the server a few times. tried going out of .gm and .invul tried make a pure player character. tried to manualy craft the scroll in game instead of spawning it in. There are no errors in the console either not when the server is booting or when the scroll is being used. This is all code i have revolving the scroll cooldown (I commented out the scrollcooldown script under skillclass to test the new code you provided.) still no cooldown either. Spoiler (Click to View) Code: [Spell 51] here is a link to our github: https://github.com/FiveEYZ/SphereShadowRealm RE: putting cooldown on scrolls - Khaos - 02-20-2016 01:42 PM Set the server into debug mode and grab me the information from that when you attempt to try this. By the looks of things, it should be working. Going to go into your github and take a look and see if I can find anything else calling @SpellCast. Because it feels like something else is overwriting the trigger, especially if you are not getting any errors in casting, triggers, or memory item creation. The code is no different than what anyone else has tried giving you, just a bit cleaner. Try this as well Code: [typedef t_scroll] Also, when you dclick the scroll. Use .EDIT and target whoever is doing it. Look for the memory item of i_memory_scroll_cooldown and make sure it is getting added to the character using the scroll. Then double check the timer. shadowrealmdefs.scp Not sure how you can test anything when you have the entire t_scroll section of code commented out. That would be a huge reason it won't work. Also, you don't need to comment out all those lines when you want to temp remove something. Just change [typedef t_scroll] to [comment typedef t_scroll] RE: putting cooldown on scrolls - dunnetott - 02-20-2016 10:42 PM I commentet out t_scroll to try something else that didnt work either ![]() just did owerwrite the old t_scroll with the one you provided now and did cast flame strike with the scroll did edit didnt see memory scroll(moused over the menu since it has no icon) nothing i did just dclick the scroll and .edit still nothing yeah we are not getting any errors in the console at all so i figure it would work to and ive been looking through the code but have seen any @spellcast that would interfere with that code. i can add the memory scroll manually in the game so that script is loaded. |