![]() |
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) |
Need help in general Scripting - Fronz - 04-21-2016 10:24 AM I'm currently developing a server on v0.56b and it's very very close to be finished. Just need to polish some stuff. Problem is my scripting skills are limited. I've managed to solve most errors on console with no problem, but I still get a few ones that are very annoying that I don't understand. I need someone that can help me with fixing some errors and on improving the server. I'm not asking for someone to make me scripts. If you want to add scripts and if I think it fits, please be my guest. I just want some help on how to run a healthy sphere. Much Love, Fronz. RE: Need help in general Scripting - Criminal - 04-21-2016 03:49 PM just post what scripts are giving errors RE: Need help in general Scripting - Fronz - 04-23-2016 12:03 AM Is it possible to make an AREA that you can't attack other players but you can attack Monsters? Also is it possible to make an AREA that is a SAFE ZONE but you can still raise skills in it? If the first one is possible no need to do the second one. How do I set an item not to decay? Some items when you do .set timer -1 to them after a world save or some time they decay. Example: ERROR:UID=0438b8bd6, id=01070 'training dummy', Invalid code=2236 (Item flagged as decay but without timer set) Thanks, Fronz. RE: Need help in general Scripting - Criminal - 04-23-2016 07:24 AM [AREADEF arena1] NAME=arena1 GROUP=arena1 P=123,123,1,0 RECT=123,123,321,321,0 FLAGS=region_flag_nopvp http://wiki.sphere.torfo.org/index.php/AREADEF RE: Need help in general Scripting - Criminal - 04-23-2016 05:30 PM about the timer thing it is because the training dummy has the attr attr_decay RE: Need help in general Scripting - Fronz - 04-23-2016 11:41 PM The "region_flag_no_pvp" was the first thing I did. It doesn't work. If I do that, besides not being able to attack other players I can't attack any other mob. It just doesn't attack anything. Currently the flags I have are FLAGS=region_flag_nobuilding|region_antimagic_recall_in|region_antimagic_recall_out|region_antimagic_gate|region_flag_no_pvp The item thing yeah, might be that. Gonna reset the attributes before putting an item down. Kudos, Fronz. RE: Need help in general Scripting - Criminal - 04-24-2016 01:46 AM make an event in the area @hittry if (<src.isplayer>) sysmessage you can't attack players return 1 endif RE: Need help in general Scripting - Fronz - 04-24-2016 03:21 AM Okey! It works for the Combat Attack. I'm trying to do for the spellcast, but I'm missing something. [REGIONTYPE r_newbiedungeon] ON=@ENTER SRC.EVENTS=+e_dungeonnewbie SRC.EVENTS=+e_dungeonnewbie2 ON=@EXIT SRC.EVENTS=-e_dungeonnewbie SRC.EVENTS=-e_dungeonnewbie2 [EVENTS e_dungeonnewbie] On=@hittry if (<src.isplayer>) sysmessage you can't attack players return 1 endif [EVENTS e_dungeonnewbie2] On=@SpellCast if (<src.isplayer>) sysmessage you can't attack players return 1 endif On the SpellCast, I can't attack players with spells but I can't also attack monsters. Shouldn't the src.isplayer on the SpellCast work like it works with hittry? Love, Fronz. RE: Need help in general Scripting - Criminal - 04-24-2016 06:31 AM @SpellEffect if (<src.isplayer>) src.sysmessage you can't attack players return 1 endif Check in wiki the tiggers http://wiki.sphere.torfo.org/index.php/@SpellEffect Like: The following object references are explicitly available for this trigger: Name Description ARGO The item used to cast the spell (e.g. a wand or scroll). I The character or item being hit by the spell. SRC The character responsible for the spell. @spelleffect fire when you recive any spell, so SRC is who cast the spell, then you check if isplayer and prevent damage with return 1 RE: Need help in general Scripting - Fronz - 04-24-2016 09:25 AM Aye! It works. Thanks man! I'll keep this thread alive to keep asking stuff. Cheers, Fronz. |