Jump to content

pajodex

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    26

Posts posted by pajodex

  1. On 8/18/2023 at 7:46 AM, Angel said:

    Could this system work with mapflags?

    I dont really get what you mean by this question... but it should be very possible.

     

    On 8/18/2023 at 7:46 AM, Angel said:

    How could someone outside the guilds check who is at war?

    They woudn't, if they missed the announcement. Players outside the guilds at war doesn't have any reason to know if they are at war.

     

  2. War Declaration System

     

    A system which allows guild leaders to declare a war against other guilds. You can only start attacking opposing guild when both guilds will declare each other as enemies. There will be an announcement when guild leaders sets a guild as an antagonist and another announcement saying that both guilds have agreed to declare war on each other.

    Once both guilds declared war, they can attack each other outside PVP, GvG, BG, Castle Maps, and Towns.. meaning on fields/dungeons only. This should add up some spice on guild vs guild match ups on a server.

    I'm open for some suggestions for improvement of this system!


    Cheers!

    [ Video: ] 

    Spoiler

     

     

    • Upvote 3
    • Love 1
    • Like 3
  3.  

    1 hour ago, micosanityyy said:

    I thought it was redundant too up until I realized players are sending messages inside the chat room thinking the original player of the clone are receiving their messages which beats the purpose of marketclone if the 2 players do not get to talk to each other because the other is thinking that the original player of the clone is not replying inside the chat room. Anyway it's just a suggestion based on the original concept of marketclone feature. I'm thankful for your free release bro 🙂

    You can alternately solve this problem by adding prefix on the spawned clone.
    Just edit this part :

     

    Spoiler

     

    Nvm, this might break the script...

     

    just do this instead,

    -	script	spawnclone	-1,{
    	if ( atoi(strnpcinfo(2)) == getcharid(0) ) {
    		switch(select("Edit Chatroom name","Edit Response message","Remove market clone")) {
    		case 1:
    			mes "Current Chatroom name : ^0000ff"+ .chatroomname$ +"^000000";
    			next;
    			select("Modify");
    			mes "Enter new Chatroom name:";
    			next;
    			input .@temp$;
    			mes "Confirm: ^0000ff"+ .@temp$ +"^000000?";
    			next;
    			select("Yes");
    			mes "Done!";
    			close2;
    			.chatroomname$ = .@temp$;
    			delwaitingroom;
    -			waitingroom .chatroomname$, 2, strnpcinfo(3)+"::OnMessage", 1;
    +			waitingroom .chatroomname$, 0;
    			break;
    		case 2:
    			mes "Current Response message : ^0000ff"+ .message$ +"^000000";
    			next;
    			select("Modify");
    			mes "Enter new response message:";
    			next;
    			input .@temp$;
    			mes "Confirm: ^0000ff"+ .@temp$ +"^000000?";
    			next;
    			select("Yes");
    			mes "Done!";
    			close2;
    			.message$ = strcharinfo(0)+": "+ .@temp$;
    			break;
    		case 3:
    			mes "Are you sure you want to remove your clone?";
    			next;
    			select("Yes");
    			mes "Removing your clone...";
    			close2;
    			@marketclone = false;
    			OnKillClone:
    			delwaitingroom;
    			disablenpc(strnpcinfo(3));
    			break;
    		}
    	}
    +	dispbottom .message$;
    	end;
    
    -OnMessage:
    -	chatmes .message$;
    -	end;
    
    OnSpawnClone:
    	query_sql( " SELECT `class`, `hair`, `hair_color`, `clothes_color`, `head_top`, `head_mid`, `head_bottom`, `sex` FROM `char` WHERE `char_id` = "+ .cid, .@class, .@hair, .@hair_color, .@clothes_color, .@head_top, .@head_mid, .@head_bottom, .@sex$ );
    	.GID =  getnpcid(0,.npc$);
    	setunitdata .GID, UNPC_CLASS, .@class;
    	setunitdata .GID, UNPC_HAIRSTYLE, .@hair;
    	setunitdata .GID, UNPC_HAIRCOLOR, .@hair_color;
    	setunitdata .GID, UNPC_CLOTHCOLOR, .@clothes_color;
    	setunitdata .GID, UNPC_HEADTOP, .@head_top;
    	setunitdata .GID, UNPC_HEADMIDDLE, .@head_mid;
    	setunitdata .GID, UNPC_HEADBOTTOM, .@head_bottom;
    	setunitdata .GID, UNPC_SEX, ((.@sex$ == "M")?1:0);
    	setunitdata .GID, UNPC_LOOKDIR, DIR_SOUTH;	
    -	waitingroom .chatroomname$, 2, strnpcinfo(3)+"::OnMessage", 1;
    +	waitingroom .chatroomname$, 0;
    	end;
    }
  4. 1 hour ago, micosanityyy said:

    Thank you for this. Suggestion, maybe you could make the pub a private pub instead and then the response message would be sent as a private message to a player who will be clicking on the private pub (chatroom name).

    This is already redundant to the current feature where when you enter the chat room, it will automatically post a message in the chat room... I don't see the need of redo-ing it. Anyways, this is a free release, anyone can make changes as needed.

  5. ---------------------------------------
    
    @loadnpc <path>
    
    Loads an NPC script by path.
    
    Example:
    @loadnpc npc/custom/jobmaster.txt
    
    ---------------------------------------
    
    @unloadnpc <npc name>
    
    Unloads an NPC.
    
    Example:
    @unloadnpc Job Master
    
    ---------------------------------------
    
    @unloadnpcfile <path>
    
    Unloads all NPCs in a file.
    
    Example:
    @unloadnpcfile npc/custom/jobmaster.txt
    
    ---------------------------------------
    
    @reloadnpcfile <path>
    
    Unloads and loads an NPC.
    Same as @unloadnpcfile and @loadnpc but ran as one command.
    
    Example:
    @reloadnpcfile npc/custom/jobmaster.txt
    
    ---------------------------------------

    You can literally read the doc folder regarding this.. doc/atcommands.txt

  6. 3 hours ago, luizinhomt said:

    Is it possible to make this clone use healing buff skill? it is possible to configure which class to clone which buff it gives to do like a battle assistant I can pay for that sorry my english

    This clone is not intended for that. That is a totally different topic. You can try to make a custom pet that looks like a player and give it actions to support the players...I think that's the closest thing you can get from your request. You dont need to pay anyone for that.

    • Like 1
  7. Market Clone (No SRC modification needed)


    This is exactly the same concept as the original file by Annieruru/Dastgir which is found on this post : 

     

    @marketclone - creates a clone of your self as if you are making a chatroom.

    @marketkill - removes the clone you spawned.

     

    Yes, there is no need for SRC modification. This is purely done script wise but this will only work for latest server files. Any server files later than October 2, 2022 shouldn't have any troubles running this script. Otherwise, you are required to apply this commit: https://github.com/rathena/rathena/commit/9c2576f47ac12f54738bc714b858fde3a9d6315b to work.

    Any issues regarding the script, leave me a message or tag me on the support page of this script. If there is any good suggestions for improvements 

    I do wont give support if compatibility is the issue. Compatibility is your responsibility. Use at your own risk.


    • Submitter
    • Submitted
      06/22/23
    • Category
    • Video
    • Content Author
      pajodex, Annieruru, Dastgir, Napster

     

    • MVP 1
    • Like 3
  8. If you haven't tried yet, make sure the vending spots are more than 3/4 cells away to avoid getting this error. (AFAIK)..
    Else, change the settings in conf/battle/player.conf
     

    // Minimum distance a vending/chat room must be from a NPC in order to be placed.
    // Default: 3 (0: disabled).
    min_npc_vendchat_distance: 3

    Edit:

    I think this is a mapflag thing, make sure vending is allowed on this map.

    • MVP 1
  9. -	script	buff_cmd	-1,{
    OnInit:
    	bindatcmd "buff", strnpcinfo(0)+"::OnCommand";
    	end;
    
    OnCommand:
    	.@price = 1000000; // 1m per buff
    	if ( getmapflag(strcharinfo(3),MF_PVP) || getmapflag(strcharinfo(3),MF_BATTLEGROUND) ||  getmapflag(strcharinfo(3),MF_GVG) ) {
    		mes "Doesnt work on PVP/BG/WOE maps";
    		close;
    	}
    	if ( Zeny < .@price ) {
    		mes "You need "+F_InsertComma(.@price)+"z.";
    		close;
    	}
    	if ( select("Buff Me!","Dont buff me!")==2 ) {
    		mes "Ok";
    		close;
    	}
    	Zeny -= .@price;
    
    	// This will bestow the effect of Level 10 Blessing.
    	sc_start SC_BLESSING,240000,10;
    
    	mes "done!";
    	close'
    }

    Untested.

  10. 10 hours ago, hendra814 said:
    if( strcharinfo(3) == "1@tower" ) end;
    else if ( strcharinfo(3) == "2@tower" ) end;
    else if ( strcharinfo(3) == "3@tower" ) end;
    else if ( strcharinfo(3) == "4@tower" ) end;
    else if ( strcharinfo(3) == "5@tower" ) end;
    else if ( strcharinfo(3) == "1@nyd" ) end;
    else if ( strcharinfo(3) == "2@nyd" ) end;
    else if ( strcharinfo(3) == "1@orcs" ) end;
    else if ( strcharinfo(3) == "2@orcs" ) end;
    else if ( strcharinfo(3) == "1@cata" ) end;
    else if ( strcharinfo(3) == "2@cata" ) end;
    else if ( strcharinfo(3) == "1@spa" ) end;
    else if ( strcharinfo(3) == "1@lhz" ) end;
    else if ( strcharinfo(3) == "1@sara" ) end;
    else if ( strcharinfo(3) == "1@gl_k" ) end;
    else if ( strcharinfo(3) == "2@gl_k" ) end;
    else if ( strcharinfo(3) == "1@cash" ) end;
    else if ( strcharinfo(3) == "1@pump" ) end;
    else if ( strcharinfo(3) == "2@pump" ) end;
    else if ( strcharinfo(3) == "1@xm_d" ) end;
    else if ( strcharinfo(3) == "1@mist" ) end;
    else if ( strcharinfo(3) == "1@ecl" ) end;
    else if ( strcharinfo(3) == "1@ma_c" ) end;
    else if ( strcharinfo(3) == "1@ma_h" ) end;
    else if ( strcharinfo(3) == "1@ma_b" ) end;

    instead of this, try to use this :
     

    if ( instance_id(IM_PARTY) || instance_id(IM_CHAR) ) end;

     

  11. It seems like you are using a custom Endless tower. Just as example, I will use the official endless tower script.

    1@tower,29,365,1	script	#1F Controller	844,{
    	end;
    
    OnInstanceInit:
    	callfunc "F_Tower_Monster",
    		1,
    		instance_mapname("1@tower"),
    		instance_npcname("#1F Controller")+"::OnMyMobDead"; // This is the function calling the death event of the monster..
    	end;
    
    OnMyMobDead: // This one should trigger.
    	set .@map$, instance_mapname("1@tower");
    	set .@mob_dead_num,mobcount(.@map$,instance_npcname("#1F Controller")+"::OnMyMobDead");
    
    	/* ***************************************************
    		This is where you can add your script posted above
    		I modified it abit so it wont stop the script
    		from functioning.
    	   *************************************************** */
    	if ( killedrid == 31000 ) {
            if ( getcharid(1) ) {
                getpartymember getcharid(1), 1;
                getpartymember getcharid(1), 2;
                for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
                    if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { // what happens if someone in the party member is offline =/
                        .@partymemberaid[.@c] = $@partymemberaid[.@i];
                        .@c++;
                    }
                }
                if (rand(100) < 10)
                    getitem F_Rand(45006,45007,45008,45009,45010,45011), 1, .@partymemberaid[ rand( .@c ) ];
                announce "Party ["+ strcharinfo(1) +"] ha matado "+ getmonsterinfo( killedrid, MOB_NAME ) +" en "+ strcharinfo(3), 0;
            } else {
                if (rand(100) < 10)
                    getitem F_Rand(45006,45007,45008,45009,45010,45011), 1;
                announce "El jugador ["+ strcharinfo(0) +"] ha matado "+ getmonsterinfo( killedrid, MOB_NAME ) +" en "+ strcharinfo(3), 0;
            }
        }
    
    	if (.@mob_dead_num < 1) {
    		initnpctimer;
    		//SetItemPartyInMap in_102floor 1
    	} else
    		mapannounce .@map$, "Remaining Monsters on the 1st Level - "+.@mob_dead_num,bc_map,"0x00ff99";
    	end;
    
    OnTimer5000:
    	mapannounce instance_mapname("1@tower"), "All Monsters on the 1st Level have been defeated.",bc_map,"0xffff00";
    	donpcevent instance_npcname("1FGate102tower")+"::OnEnable";
    	stopnpctimer;
    	end;
    }

     

  12. are you referring to me? Check my suggestion closely.

     

    PS: Keep this part like this..

    ( .@party_id && .@has_instance )? "Enter the dungeon": "",

     

    PPS: If you are still confused, it should look like this
     

    			mes "Confirmed the party has been made. Would you like to reserve entrance to the Endless Tower?";
    			next;			
    			switch(select(
    			( .@party_id && .@is_leader && !.@has_instance )? "Generate dungeon "+.@md_name$: "",
    			( .@party_id && .@has_instance )? "Enter the dungeon": "",
    			"Return to Alberta","Cancel")){

     

  13. 10 hours ago, Eyhra said:

    Hello, I have problems with my script when I add it, it gives me the following error

     

    [SQL]: DB error - Data too long for column 'name_card' at row 1
    [Debug]: at C:\rathena\src\map\script.cpp:17729 - INSERT INTO `item_log_mvps_cards` (id_card,name_card,localizacion,account_id) VALUES (4241,'Arc Angeling Card','[Storage]Academy Completion Hat[5407]',2000000)
    [Warning]: Script command 'query_sql' returned failure.
    [Debug]: Source (NPC): MVPCARDLOG2 (invisible/not on a map)
    [Debug]: Source (NPC): MVPCARDLOG2 is located in: npc/eyhra/MvpLog.txt

    MvpLog.txt 4.71 kB · 2 downloads

    change the sql data value of `name_card` to something longer like VARCHAR(30) so it can store 30 characters... may be you accidentally set it to 11 or less

    • Love 1
  14. I think storing it on a separate sql table would save you the hassle...
    or you can do something like this for ascending order :

     

    prontera,151,174,0	script	Arrange Array	100,{
    	setarray .@testarray, 1, 5, 3, 4, 9;
    	.@size = getarraysize(.@testarray);
    	freeloop(1);
    	for ( .@i = 0; .@i < .@size; .@i++ ) {
    		for ( .@j = (.@i+1); .@j < .@size; .@j++ ) {
    			if ( .@testarray[.@i] > .@testarray[.@j] ) { // Reverse the calculation to descend the order
    				.@temp = .@testarray[.@i];
    				.@testarray[.@i] = .@testarray[.@j];
    				.@testarray[.@j] = .@temp;
    			}
    		}
    	}
    	freeloop(0);
    	mes "Check :";
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		mes "Test "+ .@testarray[.@i];
    	close;
    
    }

     

×
×
  • Create New...