Forge: check if smelt an ore fails or not - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Forge: check if smelt an ore fails or not (/Thread-Forge-check-if-smelt-an-ore-fails-or-not) |
Forge: check if smelt an ore fails or not - Rizz - 09-08-2015 02:28 AM How can I make a check to know if I get a success when I try to smelt an ore inot a ingot? RE: Forge: check if smelt an ore fails or not - escribano - 09-08-2015 05:15 AM Rizz, i really don't know if sphere by default do this... I've re-script the entire craft system (packets, skillmenus, improvements, etc..) to adapt it to my shard, in my script i can handle that by default. What im sure you can do is re-script the "smelting system", just override the typedef t_ore and create your custom smelting system on the @DClick trigger 1) Inside the trigger @DClick, look for a t_forge closer to the player 2) See if ores is inside the backpack (if you want to block players smelting ore from ground) 3) Decide if you want to smell ore-by-ore or the entire amount 4) Face the player to the forge and trigger the animation and sound of smelting 5) You can do some aditional effects on the forge if you want 6) Make the if/else that will handle if the player have smelted right or failed. 7) Trigger an function that will "consume" the ores and give back the player the amount of ingots (it the player smelts right) 8) The system also need to give to the player skill sometimes, you can use the skillgain function to do that 9) Show the desired sysmessages or notices (some people like notices, i dunno why) Seems hard.. but it's not RE: Forge: check if smelt an ore fails or not - Rizz - 09-08-2015 12:44 PM Ahahahah I knew it XD Bcuz for now I didn't re-write all the smelting system, I just put some code to improve it but I noticed a bug when you fail at smelting. Hope I could use the ACTDIFF somewhere XD |