![]() |
Act on base function REPAIR - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Act on base function REPAIR (/Thread-Act-on-base-function-REPAIR) |
Act on base function REPAIR - Rizz - 03-01-2014 09:00 AM Is possible to act on this function? I saw that when you repair some items, i.e. blacksmith, it takes the same amount of ingots whether you have to repair 1hits or more. Can i change it somewhere (maybe items related proprieties) or i need to create a replacement one? RE: Act on base function REPAIR - Ben - 03-01-2014 12:25 PM Best way is to override the repair function. This is an example of an old script I had on my shard of a custom repair function. I had replaced the repair function with repairfix in the blacksmith menu, but there are other ways to do that now like overriding the repair function with the CommandTrigger INI setting, and this can definitely be updated ![]() Code: [FUNCTION REPAIRFIX] RE: Act on base function REPAIR - Rizz - 03-01-2014 11:07 PM Hey thx a lot for your answer! CommandTrigger will also replace a specific function written in the scripts? i.e. PHP Code: ON=i_ANVIL Repair // pretty much anyone can attempt to repair. or it just works for in game commands only? RE: Act on base function REPAIR - Ben - 03-01-2014 11:30 PM ok CommandTrigger will only change ingame commands... bust I just remembered that if you name your function the same as another one, it will override it, even if that function is hardcoded. so you can do a [FUNCTION repair] and it will replace the hardcoded one. |