Jump to content

gekigengar

Members
  • Posts

    174
  • Joined

  • Last visited

Posts posted by gekigengar

  1. Hello, I apologize if such method existed, but I cannot find anything searching on the forums.

    Any ways to disable Bank/RODEX?

    Or at least on certain maps like Jail/Certain maps?

    There are a lot of item restriction that can be bypassed through RODEX/Bank..

    Which caused a lot of my custom content to be broken.

    People bypassing NPC checks to certain areas with restricted items through RODEX mail. (Such as no bringing Yggberry to pvp room, an entrance NPC could check, but inside, people can receive mails containing Ygg berry)

    Or offending players sending out equipment out of jail through Rodex..

  2. On 11/15/2012 at 6:11 AM, Emistry said:

    you can try something like this..

    with some minor trick it should be possible to achieve what you want...

    Hello, sorry for the Necro, I am in need of something similar.

    But the original link is dead.

    What trick is this referring to?

  3. On 8/6/2017 at 5:16 PM, Kinx said:
    
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using ErrorManager;
    using GRF.FileFormats.ActFormat;
    using GRF.FileFormats.SprFormat;
    using GRF.FileFormats.PalFormat;
    using GRF.Image;
    using GRF.Image.Decoders;
    using GRF.Graphics;
    using GrfToWpfBridge;
    using TokeiLibrary;
    using TokeiLibrary.WPF;
    using Action = GRF.FileFormats.ActFormat.Action;
    using Frame = GRF.FileFormats.ActFormat.Frame;
    using Point = System.Windows.Point;
    
    namespace Scripts {
        public class Script : IActScript {
    		public object DisplayName {
    			get { return "MyCustomScript"; }
    		}
    		
    		public string Group {
    			get { return "Scripts"; }
    		}
    		
    		public string InputGesture {
    			get { return null; }
    		}
    		
    		public string Image {
    			get { return null; }
    		}
    		
    		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			if (act == null) return;
    			
    			try {
    				act.Commands.Begin();
    				act.Commands.Backup(_ => {
    					act.SetColor("#99F80909");
    				}, "MyCustomScript", true);
    			}
    			catch (Exception err) {
    				act.Commands.CancelEdit();
    				ErrorHandler.HandleException(err, ErrorLevel.Warning);
    			}
    			finally {
    				act.Commands.End();
    				act.InvalidateVisual();
    				act.InvalidateSpriteVisual();
    			}
    		}
    		
    		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			return act != null;
    		}
    	}
    }

    use Scripts, line 49 is act.SetColor("#99F80909"); Change it any way.

    Thank you so much!

    It works brilliantly!

    Saves a ton of time tinting sprites :wub:

    Any way I can use the color picker for this though? Instead of defining the color string in the script itself.

    On 8/8/2017 at 1:56 AM, Tokei said:

    Copy and paste this file to Scripts > Open scripts folder (name it "SetColor.cs"):

    
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using ErrorManager;
    using GRF.FileFormats.ActFormat;
    using GRF.FileFormats.SprFormat;
    using GRF.FileFormats.PalFormat;
    using GRF.Image;
    using GRF.Image.Decoders;
    using GRF.Graphics;
    using GrfToWpfBridge;
    using TokeiLibrary;
    using TokeiLibrary.WPF;
    using Action = GRF.FileFormats.ActFormat.Action;
    using Frame = GRF.FileFormats.ActFormat.Frame;
    using Point = System.Windows.Point;
    
    namespace Scripts {
        public class Script : IActScript {
    		public object DisplayName {
    			get { return "Change all layer color"; }
    		}
    		
    		public string Group {
    			get { return "Scripts"; }
    		}
    		
    		public string InputGesture {
    			get { return null; }
    		}
    		
    		public string Image {
    			get { return null; }
    		}
    		
    		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			if (act == null) return;
    			
    			var frame = act[selectedActionIndex, selectedFrameIndex];
    			
    			GrfColor startColor;
    			
    			if (frame.Layers.Count == 0) {
    				startColor = GrfColor.White;
    			}
    			else {
    				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
    			}
    			
    			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
    			picker.Owner = WpfUtilities.TopWindow;
    			picker.ShowDialog();
    			
    			if (picker.DialogResult) {
    				try {
    					act.Commands.Begin();
    					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
    					act.Commands.SetColor(newColor);
    				}
    				catch (Exception err) {
    					act.Commands.CancelEdit();
    					ErrorHandler.HandleException(err, ErrorLevel.Warning);
    				}
    				finally {
    					act.Commands.End();
    					act.InvalidateVisual();
    				}
    			}
    		}
    		
    		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			return act != null;
    		}
    	}
    }

    Then you can use Scripts > Change all layer color. I really should update Act Editor @@...

    Thanks a lot Tokei!

    For both the answer and for developing Act Editor!

    Oh, meanwhile, if you are planning to update it..

    There are a lot of bugs in the Palette Editor.

    Sometimes selecting a gradient palette, and pasting ARGB color does not update the palette. (Unless I first move the color picker around)

    And the Undo tends to revert to the wrong colors.

    I also have a suggestion for the ability to assign which area of the sprite will use which part of the palette.

    (Sometimes I need a quick fix to those pesky nose color palettes!)

    This might not be the place to report bugs, but I am not sure where to report.

    Other than that, thanks a lot :D

    ------------------------------------------------------

    EDIT: Edited the script, added the ability to preview the color in editor following the examples from other scripts.

    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using ErrorManager;
    using GRF.FileFormats.ActFormat;
    using GRF.FileFormats.SprFormat;
    using GRF.FileFormats.PalFormat;
    using GRF.Image;
    using GRF.Image.Decoders;
    using GRF.Graphics;
    using GrfToWpfBridge;
    using TokeiLibrary;
    using TokeiLibrary.WPF;
    using Action = GRF.FileFormats.ActFormat.Action;
    using Frame = GRF.FileFormats.ActFormat.Frame;
    using Point = System.Windows.Point;
    
    namespace Scripts {
        public class Script : IActScript {
    		public object DisplayName {
    			get { return "Fill Color"; }
    		}
    		
    		public string Group {
    			get { return "Scripts"; }
    		}
    		
    		public string InputGesture {
    			get { return "Ctrl-Shift-N"; }
    		}
    		
    		public string Image {
    			get { return "pal.png"; }
    		}
    		
    		public void Execute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			if (act == null) return;
    			
    			var frame = act[selectedActionIndex, selectedFrameIndex];
    			
    			GrfColor startColor;
    			
    			if (frame.Layers.Count == 0) {
    				startColor = GrfColor.White;
    			}
    			else {
    				startColor = act[selectedActionIndex, selectedFrameIndex, 0].Color;
    			}
    			
    			ColorPicker.PickerDialog picker = new ColorPicker.PickerDialog(startColor.ToColor(), ColorPicker.Core.ColorMode.Hue);
    			picker.Owner = WpfUtilities.TopWindow;
    			
    			picker.PickerControl.PreviewColorChanged += (s, color) => _previewUpdate(act, color.ToGrfColor());
    			picker.PickerControl.ColorChanged += (s, color) => _previewUpdate(act, color.ToGrfColor());
    				
    			picker.ShowDialog();
    			
    			act.Commands.SetColor(startColor);
    			
    			if (picker.DialogResult) {
    				try {
    					act.Commands.Begin();
    					GrfColor newColor = picker.PickerControl.SelectedColor.ToGrfColor();
    					act.Commands.SetColor(newColor);
    				}
    				catch (Exception err) {
    					act.Commands.CancelEdit();
    					ErrorHandler.HandleException(err, ErrorLevel.Warning);
    				}
    				finally {
    					act.Commands.End();
    					act.InvalidateVisual();
    				}
    			}
    		}
    		
    		public bool CanExecute(Act act, int selectedActionIndex, int selectedFrameIndex, int[] selectedLayerIndexes) {
    			return act != null;
    		}
    		
    		private void _previewUpdate(Act act, GrfColor color) {
    			act.Commands.SetColor(color);
    			
    			act.InvalidateVisual();
    		}
    	}
    }

    I hope I am doing this right, just sharing for people who is looking for the same script :D

  4. I need help for this Act Editor.

    Hello, I want to be able to tint the entire mob layer color without having to go frame by frame.

    Currently, CTRL-SHIFT-W (Replace color script) does just that, but only for that 1 single frame.

    I wanted to replace color for the entire frame in the sprite for a quick mob tinting. (For all animation, and all frames).

    Any help?

  5. The tool windows aren't working on mine, and I am getting a lot of errors.

    (Something also happened to upper right quarter of the screen)

    Anyone knows how to fix?

    screens.png

     

    EDIT : For everyone with the same problem, here is why.

    Just talked to Borf, he said its because the shaders currently does not support Intel graphic cards.

    Perhaps it will soon be compatible with Intel graphic cards.

  6. 12 hours ago, Nitrous said:

    This is the part of the code that's the problem:

    
    struct instance_db *db = instance_searchname_db(name);
    
    nullpo_retr(-1, db);

    The name you pass into instance_create is not being found in the instance database.

    EDIT: Looking further into this, the entry in instance_db.txt is incorrect. The correct format is:

    
    // ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,Map3,...,Map255

     

    Aside from the incorrect entry, it seems like inserting only on import/instance_db wouldn't do anything.

    I have to update my re/instance_db to get it working.

    (Not sure if this is an intended behavior)

    Thanks!

  7. Hello, I am trying to create an instance.

    .@instance$ = "Crossroad Dimension";
    .@create = instance_create(.@instance$);
    if (.@create < 0) 
    {
      mes "Error creating instance :";
      switch (.@create) 
      {
        case -1: mes "Invalid type."; break;
        case -2: mes "Party not found."; break;
        case -3: mes "Instance already existed."; break;
        case -4: mes "No free instance available."; break;
      }
    }

    Right now its giving me the Invalid Type error.

    I have added my instance at Instance_db

    18,Crossroad Dimension,120,cross_i,88,208,cross_i

    And my map existed on map_index

    cross_i

    and maps_athena

    map: cross_i

    The mapserver is giving me a strange error.

    --- nullpo info ---------------------------
    instance.c:370: in func 'instance_create'

    Anyone knows what went wrong?

  8. On 7/15/2017 at 7:22 PM, Adel said:

    Try starting from 3899

    	JT_RR_ARCLOUSE = 3787,
    	JT_RR_CRAMP = 3788,
    	JT_WATERMELON_34 = 3983,
    	JT_WATERMELON_35 = 3984,

    That is available, but it wouldn't fit my 400 custom mobs. (3983 - 3899 = 84)

    (Most I can get is 195 sadly) (3983 - 3788 = 195)

    And I felt like that space will be taken soon in the next episode.

    Thank you so much for helping anyways!

    Since I don't know if its possible to modify my client to support more mob views on certain ID,

    I will have to wait for the next few episode to fit my mobs when they make new available spaces for themselves.

  9. 14 hours ago, Rynbef said:

    Ive started at 3700 and added about 200 mobs.

    Rynbef~

    It seems like 3700 range is taken?

    	JT_QE_PORING = 3721,
    	JT_QE_POPORING = 3722,
    	JT_QE_DROPS = 3723,
    	JT_QE_LUNATIC = 3724,
    	JT_QE_WILOW = 3725,
    	JT_QE_PICKY = 3726,
    	JT_QE_PICKY_ = 3727,
    	JT_QE_ZOMBIE = 3728,
    	JT_QE_POISON_SPORE = 3729,
    	JT_COWRAIDERS1 = 3736,
    	JT_COWRAIDERS2 = 3737,
    	JT_COWRAIDERS3 = 3738,
    	JT_COYOTE = 3739,
    	JT_GASTER = 3740,
    	JT_MECHASPIDER = 3741,
    	JT_PURPLESTONE = 3742,
    	JT_SEAANEMONE = 3743,
    	JT_G_COWRAIDERS1 = 3744,
    	JT_G_COWRAIDERS2 = 3745,
    	JT_G_COWRAIDERS3 = 3746,
    	JT_E_COWRAIDERS1 = 3747,
    	JT_E_COWRAIDERS2 = 3748,
    	JT_E_COWRAIDERS3 = 3749,
    	JT_RR_ARCLOUSE = 3787,
    	JT_RR_CRAMP = 3788,

     

  10. My mobs used to take 3601 to 3998 mob IDs.

    After I updated the server, those IDs are now taken by official mobs. (There were only 3100 mobs back when I added the custom mobs)

    4000 to 6053 are taken for something else, and 4k to 5k are reserved for player clones.

    I googled, and the answers are all outdated, so I think its time to discuss this again.

    https://rathena.org/board/topic/103989-adding-custom-mob/

    (The link above suggest about 3400 to 4000, which is now already taken by official mobs)

    And as far as I know, mobs with 6k+ IDs won't be read properly by the client (They will be shown as porings).

    http://herc.ws/board/topic/1782-custom-mob-become-poring/

    There are some special official event mobs however, that already took place on 25000 - 25017.

    But I am not sure which IDs are available for use without clashing/displayed as poring.

    Question : what mob IDs do you use for your private server?

    I currently have 400 custom mobs, what ID range should I fit them into?

    And currently a lot of my script are tangled with mob ID, I am willing to shift them one by one.

    But I think rAthena should have reserved ID somewhere around 80k to prevent something like this in the future?

    There are reports on these issue already.

    https://github.com/rathena/rathena/issues/1253

  11. Hello, I have a script by AnnieRuru from my 2013 - 2014 server.

    It used to work perfectly, until I decided to update my rAthena to the latest (From 2013/2014)

    BUILDIN_FUNC(setdir) {
    	TBL_PC *sd;
    	if ( script_hasdata(st,4) ) {
    		if ( data_isstring( script_getdata(st,4) ) )
    			sd = map_nick2sd( script_getstr(st,4),false );
    		else
    			sd = map_id2sd( script_getnum(st,4) );
    	} else
    		sd = script_rid2sd(st);
    	if ( sd ) {
    		int value = 0;
    		if ( script_hasdata(st,3) ) {
    			value = script_getnum(st,3);
    			if ( value < 0 || value > 2 )
    				value = 0;
    		}
    		pc_setdir( sd, script_getnum(st,2), value );
    		clif_changed_dir( &sd->bl, AREA );
    	}
    	return SCRIPT_CMD_SUCCESS;
    }
    
    BUILDIN_FUNC(checkdir) {
    	TBL_PC *sd;
    	if ( script_hasdata(st,3) ) {
    		if ( data_isstring( script_getdata(st,3) ) )
    			sd = map_nick2sd( script_getstr(st,3),false );
    		else
    			sd = map_id2sd( script_getnum(st,3) );
    	} else
    		sd = script_rid2sd(st);
    	if ( sd ) {
    		int value = 0;
    		if ( script_hasdata(st,2) )
    			value = script_getnum(st,2);
    		script_pushint( st, value > 0 ? sd->head_dir : sd->ud.dir );
    	}
    	return SCRIPT_CMD_SUCCESS;
    }

    First it gave me an error during compilation for map_nick2sd( script_getstr(st,4));

    Looking into the changes, I noticed there is now a feature for incomplete map names, so I put in ", false" for the 2nd parameter.

    The compiler no longer gave me an error, and mapserver runs well, until made an NPC use the script to set a character's direction.

    setdir DIR_SOUTH;

    The mapserver crashed immediately.

    How do I get this to work?

  12. I noticed that mercenaries using mob sprite (Not the mercenary version) changes the cursor and can be targeted as an attack like normal mobs (Though it does nothing).

     

    Is this something I can set from the LUA files? I want it to be treated just like other mercenaries.

     

    If so, where?

  13. its nice to know that KRO is still making progress. it makes my Childhood Memories keep running ~ until the day I die.

     

    Really? I'd rather not have them desperately milking my well beloved franchise to its death for its former glory.

     

    (Talking about the certain web browser RO, a certain just another generic city builder mobile game, and some half assed lazy-made MMORPG wannabe valkyrie)

     

    Renewal changes RO into the typical WoW clone. (Or even worse)

     

    Newer skills are just old skills re-modified..

     

    Wow, I couldn't wait to expect the amazing things of what's to come!

  14. The composition distribution is bad, its too spacy above, and its too cramped on the corners, that goes the same with the colorings.

     

    Same fonts on everywhere made it looks kind of cheap. (Like the A in the 'A' ri 'A'), both uses the same font with no variation.

     

    But that all, depends on taste of each person :P

×
×
  • Create New...