Custom spells and rune_item - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Custom spells and rune_item (/Thread-Custom-spells-and-rune-item) |
Custom spells and rune_item - karma - 01-23-2016 06:19 AM Take the case i'm scripting a new invisibility spell. I want it to equip i_rune_invisibility as a memory. How can i do it? Setting proper RUNE_ITEM, DURATION and LAYER don't make the spell create or equip the item. Also, the i_rune_invisibility has LAYER=0 and TYPE=t_spellicon, i can change the type to t_spell but not the layer, so i can't equip it. Funny thing is that the i_rune_invisibility created by the hardcoded spell s_invisibility has LAYER=39 (the one i set as spell's layer). RE: Custom spells and rune_item - Kanibal - 01-23-2016 06:32 AM Code: [ITEMDEF i_rune_invisibility] RE: Custom spells and rune_item - karma - 01-23-2016 07:41 AM Why would i redefine that item? Also i'm not sure i can do it, i can instead edit the script of i_rune_invisibility, or change after creation the type to t_eq_script. By the way, i don't want to change the script, if possible, i am interested rather in making the thing work like the hardcoded one without changing anything, i'm pretty sure i'm missing something. RE: Custom spells and rune_item - karma - 01-23-2016 06:25 PM Solved by doing this: Code: SERV.NEWITEM i_rune_invisibility Anyways, i'm still wondering how can i make it work with RUNE_ITEM,DURATION and LAYER. RE: Custom spells and rune_item - Khaos - 02-19-2016 12:27 PM Now sure if Layer property is RW off the top of my head. You might just have to change the base script or replicate it and do your own layer in the main definition. Code: [itemdef i_rune_new_invis] Let me know what is going on. If I am wrong and layer is indeed changeable in game (I don't think it is), it could be the spell code is forcing a layer change (I doubt it though). RE: Custom spells and rune_item - karma - 02-19-2016 06:49 PM In game it isn't changeable, but the code i wrote works, so maybe you can change it before the positioning in the world. RE: Custom spells and rune_item - Khaos - 02-19-2016 07:53 PM Yeah, it is as I thought then. Layer's aren't RW in game, just R. Which makes sense. Super happy you figured this out and have it working. ^_^ Always trying to help when/where I can. |