Jump to content

n0tttt

Members
  • Posts

    303
  • Joined

  • Days Won

    12

Posts posted by n0tttt

  1. Change:

    	if (.@to_cls == Job_Novice_High && .LastJob)
    		lastJob = Class; // Saves the lastJob for rebirth

    with:

    	if (.@to_cls == Job_Novice_High && .LastJob) {
    		lastJob = Class; // Saves the lastJob for rebirth
    		setarray .@item[1], rand(40030, 40035), rand(40020, 40025);
    		mes "Do you prefer race or equipments?";
    		getitem .@item[select("Race","Equipment"), 1;
    	}

     

  2. Replace the Can_Change_Third function with this:

    function	Can_Change_Third	{
    	// To change to third class you either need to be:
    	// * Second Class
    	// * Transcendent Second Class
    	// * Baby Second Class
    	if( !.ThirdClass )
    		return false; // Third job change disabled
    	if( !(eaclass()&EAJL_UPPER) )
    		return false; // Not rebirth.
    	if( !(eaclass()&EAJL_2) )
    		return false; // Not second Class
    	if( eaclass()&EAJL_THIRD )
    		return false; // Already Third Class
    	if( roclass(eaclass()|EAJL_THIRD) < 0 )
    		return false; // Job has no third Class
    	if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE )
    		return false; // Exp. Super Novice equals 3rd Cls, but has it's own case
    	if( Is_Baby() && (!.BabyClass || !.BabyThird) )
    		return false; // No Baby (Third) change allowed
    	return true;
    }

     

  3. You can delete the OnQueue and OnClock1200 label and then add this:

    OnMinute00:
    
    	setarray .@events[0], 
    			0, // 00:00
    			7, // 01:00 (cluckers)
    			0, // 02:00
    			0, // 03:00
    			0, // 04:00
    			0, // 05:00
    			0, // 06:00
    			0, // 07:00
    			0, // 08:00
    			0, // 09:00
    			0, // 10:00
    			0, // 11:00
    			0, // 12:00
    			0, // 13:00
    			1, // 14:00 (dices)
    			0, // 15:00
    			0, // 16:00
    			0, // 17:00
    			0, // 18:00
    			0, // 19:00
    			4, // 20:00 (guess the monster)
    			0, // 21:00
    			0, // 22:00
    			0; // 23:00
    
    	.@event = .@events[gettime(DT_HOUR)];
    	if(!.event_active) {
    		.event_active = .@event;
    		if(.maps$[.@event - 1] != "")
    			set_mapflags(.@event - 1);
    		donpcevent .events$[.@event - 1]+"::OnStart";
    	}
    	end;

    Then you config the events in the desired hours. The number of the events is:

            [1] = Dices.
            [2] = Find the Porings.
            [3] = Escape from the Bombrings.
            [4] = Guess the Monster.
            [5] = Pick the candy.
            [6] = Devil Square.
            [7] = Cluckers.

     

    I will edit the script to add a configuration about the event automatic modes in the future. I'm not in my house currently, so I couldn't test really well to make such a change.

  4. My Functions Collection


    Hello. I made these functions a lot time ago. I have a couple more but I think there are enough variations of them already.

    Well, here we go. The functions are:

    create_menu

    which_instance

    party_randomid

    party_getonline

    effect_xy

     

    For a list of examples and proper documentation please read the script! These things would look very ugly here.

     

    And, thanks to KingdomMT for the cute image I used.


    • Submitter
    • Submitted
      08/04/2017
    • Category
    • Video
    • Content Author
      n0tttt

     

    • Love 2
  5. I don't know if I'm doing something wrong, but I get this error trying to load anything (using 1.1.8.3, this didn't happen with 1.1.8.1).
     

    Quote

    --------------          Message          --------------
    Referencia a objeto no establecida como instancia de un objeto.
    --------------        Stack trace        --------------
       en GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
       en GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
       en SDE.View.SdeEditor._reloadDatabase(Boolean alreadyAsync)
       en SDE.View.SdeEditor.<ReloadDatabase>b__2()
       en GRF.Threading.GrfThread.<>c__DisplayClass4.<Start>b__3()
       en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       en System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       en System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       en System.Threading.ThreadHelper.ThreadStart()

    --------------         Exception         --------------
    System.NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.
       en SDE.Editor.Generic.Parsers.DbIOCheevo.Loader(DbDebugItem`1 debug, AbstractDb`1 db)
       en SDE.Editor.Generic.Core.AbstractDb`1._loadDb()
       en SDE.Editor.Generic.Core.AbstractDb`1.LoadDb()
       en SDE.Editor.Engines.DatabaseEngine.SdeDatabase.Reload(IProgress progress)
       en SDE.View.SdeEditor._reloadDatabase(Boolean alreadyAsync)
     

     

  6.     mes "[ Account Viewer ]";
        mes "          ";
        mes "^0000ff*Input Name*^000000";
        mes "       ";
        mes "       ";
        mes "^ff0000NOTE^000000 :";
        mes "Make sure to input the exact name of the player.";
        next;
        input .@n$;
        if ( query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+ escape_sql( .@n$ ) +"'", .@a_id ) ) {
            query_sql("SELECT `char_id`, `guild_id` FROM `char` WHERE `account_id` = '"+ .@a_id +"'", .@c_id, .@g_id );
            mes "[ Account Viewer ]";
            mes "          ";
            mes "^0000ff*Input Item-ID*^000000";
        mes "       ";
        mes "       ";
        mes "^ff0000NOTE^000000 :";
        mes "Make sure to input the correct item-ID. Type @ii + item name to know the ID.";
            next;
            input .@item;
            if( getitemname( .@item ) == "" || getitemname( .@item ) == "null" ) {
                mes "[ Account Viewer ]";
                mes "^ff0000Invalid Item-ID.";
                close;
            }
    	query_sql "SELECT sex FROM login WHERE account_id = "+.@a_id,.@sex$;
            for( set .@i,0; .@i < getarraysize( .@c_id ); set .@i,.@i+1 ) {
                query_sql( "SELECT SUM(`amount`) FROM `inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_inv );
                query_sql( "SELECT SUM(`amount`) FROM `cart_inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_cart );
                query_sql( "SELECT SUM(`amount`) FROM `guild_storage` WHERE `guild_id` = "+ .@g_id[.@i] +" AND `nameid` = "+ .@item, .@count_gsto );
                set .@inv,.@inv + .@count_inv + .@count_cart;
                set .@gsto,.@gsto + .@count_gsto;
            }
            query_sql( "SELECT SUM(`amount`) FROM `storage` WHERE `account_id` = "+ .@a_id +" AND `nameid` = "+ .@item, .@count_sto );
            set .@inv,.@inv + .@count_sto;
        }
        else {
            mes "[ Account Viewer ]";
            mes "^ff0000"+.@n$+" does not exist.";
            close;
        }
    mes "[ Account Viewer ]";
    mes "• ^777777Account's Storage ^00cc00CHECK^000000";
    mes "• ^777777Account's Inventory ^00cc00CHECK^000000";
    mes "• ^777777Account's Cart Inventory ^00cc00CHECK^000000";
    mes "-----------------------------------";
    mes "^ff0000"+.@n$+"^000000 "+(countitem( .@item > 1 ) ? "have":"has" )+" ^0000ff"+ .@inv +"x ^0000ff"+ getitemname( .@item ) +"^000000 "+((.@sex$ == "F")? "her":"his" )+" account.";

    Try this.

  7. Event Manager


    This is an event manager I made. The events are of public knowledge (there aren't many ways to do good events and these are the ones I found to be the best, at the moment I wrote up the script), and I inspired myself from them. Here's the list of events it has as of now. Have fun!
    I can add some events if you like to. I considered some myself (like MvP vs MvP) but they offered little gameplay experience to do so. I can reconsider though!

     

    Avaiaible events:

        - Dices.
        - Find the Porings.
        - Escape from the Bombrings.
        - Guess the Monster.
        - Pick the Candy.
        - Devil Square.
        - Cluckers.

    Features:

        - Easy addition of events.
        - Random queue system which players can check with @events command.
        - Automatic joining with @event command.
        - Can manually start & end events (forcing them to end).
        - Events can have a limited amount of players.
        - Events have a limited time to let players register before they start.
        - Configurable prizes.

     

    I must give credits to sandbox, Stolao, and AnnieRuru for all the events I found, Thank you guys!

    If you buy, you accept this:
    You cannot redistribute this, less as your own.
    You can modify it as you like, however, in order to receive proper support, you must tell me what you modified.


     

  8. Rotative PvP Room


    A PvP room which changes maps. Nothing else is required to the description, I guess.

     

    Features:

    - You can use @pvp command to enter the room. However, you can't use it if you're inside an instance of in middle of a battle.

    - Anti repeating system. You can avoid the same map being repeated again and again.

    - Some little effects when you're warped.


     

  9. Estás probando con un personaje femenino en el Act Editor. Busca el sprite de Assassin Cross hombre en el data.grf y úsalo como base. Ahí podrás ver, ya que recuerda a veces son diferentes los act para mujeres y hombres. O puedes probar el siguiente script e ir jugando con el valor:
     

    foreach (var anchor in act.GetAllFrames().SelectMany(p => p.Anchors)) {
        anchor.OffsetY -= 10;
    }

    Créditos a Tokeiburu (el mismo creador) que hizo ese script.

  10. To test the fastest you have to do this.

     

    	.@start=gettimetick(0);
    	<here your code>
    	.@time=gettimetick(0)-.@start;
        announce "It took "+.@time+" miliseconds.",bc_self;

    The best approach is the second one, since it doesn't need to loop through a list and just checks the mapname. You don't need OnInit in that case because you have only 1 check (is it a guild_vsx map?). You could optimize it even more with strcharinfo(3) instead of using getmapxy.

    If you want different maps and not a list which shares a common word in the name, you might use this:
     

    OnInit:
    	setarray .@maps$[0],"prontera","aldebaran","prt_fild05","geffen","custommap";
    	for(.@size=getarraysize(.@maps$);.@i.<.@size;.@i++)
    		if(getmapusers(.@maps$[.@i])!=-1)
    			setd ".map"+.@maps$[.@i],1;
    	end;
    
    OnPCLoadMapEvent:
    	if(getd(".map"+strcharinfo(3))){
    		...
    	}
    	end;
    }

     

×
×
  • Create New...