Jump to content

Hijirikawa

Members
  • Posts

    193
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Hijirikawa

  1. -	script	asdfjkl	-1,{
    for(.@i = 0; .@i < getarraysize(.ask); .@i++){
    	if(countitem(.ask[.@i]) > 5){
    		.@found = .ask[.@i];
    		break;
    	}
    }
    if(!.@found) end;
    delitem .ask[.@i],5;
    getitem .give,1;
    OnInit:
    	setarray .ask,501,502;
    	.give = 505;
    end;
    }

    No idea if it works, but it should, i guess.

  2. 4 hours ago, Royr said:

    Try this:

    
    -	script	F_PVPRecovery	-1,{
    	end;
    OnPCDieEvent:
    	.@map$ = strcharinfo(3);
    	.@nme$ = strcharinfo(0);
    	if( .@map$ == "pvp_y_1-2" ) {
    		for( .@s = 5; .@s >= 0; .@s-- ) {
    			message .@nme$ ,"You will respawn in  "+.@s+" second"+ ( .@s > 1 ? "s" : "") +".";
    			sleep2 1000;
    		}
    		recovery 0;
    		warp .@map$,0,0;
    	}
    	end;
    }

     

    Isn't this basically the same thing? Lmao, anyways either will do.
     

    5 hours ago, melv0 said:

    change :

     

    
    ONPCDieEvent:

    to

    OnPCDieEvent

    ^ Change the event label to what this guy says, sorry, my mistake.

    • Love 1
  3. Untested.

    ONPCDieEvent:
    	.@map$ = strcharinfo(3);
    	if(.@map$ == "pvp_y_1-2"){
    		for(.@i = 5; .@i < 1; .@i--){
    			message strcharinfo(0),"You will respawn in "+.@i;
    			sleep2 1000;
    		}
    		recovery 0;
    		warp .@map$,0,0;
    	}
    end;

    More flexible

    ONPCDieEvent:
    	.@map$ = strcharinfo(3);
    	for(.@i = 0; .@i < getarraysize(.map$); .@i++){
    		if(.@map$ == .map$){
    			for(.@y = 5; .@y < 1; .@y--){
    				message strcharinfo(0),"You will respawn in "+.@y;
    				sleep2 1000;
    			}
    			recovery 0;
    			warp .@map$,0,0;
    		}
    	}
    end;
    
    OnInit:
    	setarray .map$, "pvp_y_1-2","guild_vs2","guild_vs3";
    end;

     

  4. -	script	LvlUpLimit	-1,{
    OnPCBaseLvUpEvent:
    	for(.@i = 0; .@i < getarraysize(.lvlup_limit); .@i++){
    		if(BaseLevel >= .lvlup_limit[.@i]){
    			if(quest_var != .quest_var[.@i]){
    				BaseLevel =- 1;
    				showscript "You need to complete quest...";
    				end;
    			}
    		}
    	}
    end;
    OnInit:
    	setarray .lvlup_limit, 10,15,20,25,30;
    	setarray .quest_var,1,2,3,4,5;
    end;
    }

    Two things.

    1. I'm rusty, I don't know half of what I'm typing.

    2. No clue if it works as intended. Just go right ahead and test.

  5. Why do you have to put 

    		if( .@count != .count ) {
    			.count = .@count;
    			delwaitingroom;
    			waitingroom "PVP Room ["+.@count+"]",0;
    		}

    Pretty much just the same as what I've suggested, but just takes an extra IF statement to get what you needed lmao.

    OnInit:
    	freeloop(1);
    	while( 1 ){
    		.@count = getmapusers("guild_vs3");
    		waitingroom "PVP Room ["+.@count+"]",0;
    		sleep 2000;
    		delwaitingroom;
    	}
    	freeloop(0);
    end;

    You don't really need the IF statement there.

  6. Took a look at their reset.php from their repo link~

    There is no sign of any prepared statements or any input validation. Basically this certain function on their website is a vulnerability.

    Whatever query you input doesnt get cleaned out, going directly into the server and is very dangerous.

    I don't have the best PHP knowledge, but I know a vulnerable script when I see one.

    The solution would have been quite easy and having prepared statements could have made it a lot harder to hack.

    Unless they give provide a solution to this issue, I highly suggest not to use their services until they secure their files. As Zigara has expressed, he can help in fixing this so I hope they will do something.

    P.S: I'm not sure if they closed down their Discord channel, because it has disappeared from my joined channels.

    • Upvote 2
  7. 15 hours ago, Technoken said:

    Try 

    
    prontera,147,196,5	script	PVP Room	403,{
            warp "guild_vs3",0,0;
            announce ""+strcharinfo(0)+" entered the PVP Room",bc_all;
            end;
    
    OnInit:
    	.count = 0;
    	while( 1 ){
    		.@count = getmapusers("guild_vs3");
    		if( .@count != .count ) {
    			.count = .@count;
    			delwaitingroom;
    			waitingroom "PVP Room ["+.@count+"]";
    		}
    	sleep 1000;
    	}
    	end;
    }
    guild_vs3	mapflag	nowarpto
    guild_vs3	mapflag	nowarp
    guild_vs3	mapflag	noreturn

     

    You will produce errors, put freeloop(1) and freeloop(0) to make infinite loop error to go away.

    Im only on mobile so a simplier way to do this is

    .@map$ = "guild_vs3";

    freeloop(1);

    while(1){

    .@count = getmapuser(.@map$);

    waitingroom "[ "+.@count+" ] PVP Room",0;

    sleep 2000;

    delwaitingroom;

    }

  8. Change all your close statements to end;

     

    You should only use close; when there's a mes statement somewhere to avoid that kind of error. In this case, you aren't using any mes, so don't use close;

    • Upvote 1
  9. Added Novice Tutorial as well as uploaded an improved version of the Gacha Video.

    Gacha

    • Improved cutins
    • Improved randomization so it wouldn't be too obvious you won already
    • Some cutins are just place holders
    • Some cards are just place holders (Porings)

    Novice Tutorial

    • Still lacking one more "Stylish" instance before the airship
    • Still lacking proper rewards for each tutorial completion
    • Needs little more life probably
  10. prontera,164,173,4	script	Novice Enchantress	521,{
    
    if(Weight > MaxWeight / 2) end;
    
    if( Class != 0){ end; }
    
    mes "[ ^FF0000Novice Enchantress^000000 ]";
    mes "Welcome to ^FF0000RO NAME HERE^000000";
    mes "I am here to assist you.";
    mes "Choose your class and join the adventure.";
    next;
    	.@i = select( .Menu$ ) - 1;
    	if( select( "Change to "+jobname( .JobList[.@i] )+"?:Cancel" ) == 1 ){
    		jobchange .JobList[.@i];
    		BaseLevel = .BaseLevel;
    		JobLevel = .JobLevel;
    		resetskill;
    		resetstatus;
    		set SkillPoint, 0;
    		set SkillPoint, 118; //How many skill points do you want your players to have
    		mes "[ ^FF0000Novice Enchantress^000000 ]";
    		mes "Welcome to RO NAME HERE.";
    		close2;
    		if(!#freebies){
    			switch(Class){
    				case 4008: //knight
    					getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade
    					getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike
    				break;
    				case 4009: //High Priest
    					getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod
    				break;
    				case 4010: //High Wizard
    					getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod
    				break;
    				case 4011: //Whitesmith
    					getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe
    				break;
    				case 4012: //Sniper
    					getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow
    				break;
    				case 4013: //Assassin Cross
    					getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche
    					getitembound2 1264,2,1,10,0,0,0,0,0,1; //specialty jur
    				break;
    				case 4015: //Paladin
    					getitembound2 1408,2,1,10,0,0,0,0,0,1; //pike
    				break;
    				case 4016: //Champion
    					getitembound2 1505,2,1,10,0,0,0,0,0,1; //mace
    				break;
    				case 4017: //Professor
    					getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod
    				break;
    				case 4018: //Stalker
    					getitembound2 1108,1,1,10,0,0,0,0,0,1; //blade
    					getitembound2 1208,1,1,10,0,0,0,0,0,1; //main gauche
    					getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow
    				break;
    				case 4019: //Creator
    					getitembound2 1302,2,1,10,0,0,0,0,0,1; //axe
    				break;
    				case 4020: //Bard
    					getitembound2 1902,2,1,10,0,0,0,0,0,1; //violin
    					getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow
    				break;
    				case 4021: //Gypsy
    					getitembound2 1951,2,1,10,0,0,0,0,0,1; //rope
    					getitembound2 1705,2,1,10,0,0,0,0,0,1; //composite bow
    				break;
    				case 23: //Super Novice
    					getitembound2 1602,2,1,10,0,0,0,0,0,1; //rod
    					getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche
    					getitembound2 1108,2,1,10,0,0,0,0,0,1; //blade
    				break;
    				case 24: //Gunslinger
    					getitembound2 13105,2,1,10,0,0,0,0,0,1; //garrison
    				break;
    				case 25: //Ninja
    					getitembound2 1208,2,1,10,0,0,0,0,0,1; //main gauche
    					getitembound2 13302,2,1,10,0,0,0,0,0,1;
    				break;
    			}
    		set #freebies,1;
    		}
    	}
    end;
    
    OnInit:
    
    waitingroom "Jobchanger",0;
    
    setarray .JobList[0],4008,4009,4010,4011,4012,4013,4015,4016,4017,4018,4019,4020,4021,23,24,25; // class that player can choose from, refer to @jobchange in-game for the numbers
    .BaseLevel = 99; //max base level of your server
    .JobLevel = 70; //max job level of your server
    
    .@size = getarraysize( .JobList );
    for( .@i = 0; .@i < .@size; .@i++ )
    	.Menu$ = .Menu$ + jobname( .JobList[.@i] )+":";
    end;
    
    }
    

    Study how the script looks like, this one should be really easy to understand.

  11. Send me a badge too please. Also +1 to Skorm's idea about the community scripting event. I'll probably lose out, but I do want to test out stuff here and there and see how it works, so yeah, that would favor those who are still learning and those who already got it in the bag.

    • Upvote 1
  12. Oh thanks for the heads up. I'll check that part then, I haven't really looked at that NPC at all.

    So I took a look at it, I believe my best bet would be to run a loop and check if the character is on the same map as to where the monster was killed, if not, he will be taken off the list of members who could receive the reward whilst offline members will also be treated the same way.

    I suppose using getpartymember should be used, though do I need to copy the array to another array, or just leave it as is and just edit it as I see fit? perhaps copying it into a temporary array and making that temporary array my main array to base it will be the best way just to avoid discrepancies because I have no idea if that party array might get changed or something later on in the script.

  13. I'm trying to make a script wherein an item is randomly given to a person inside a party, however, I have no idea  as to how to remove the person from the list if he's offline or if he's not in the same map as the person who killed the mob, if any small snippet or hint is given, I would really appreciate it.

    Thanks in advance.

    I had an experiement before and came up with this, but I don't think it's really that good, nor does it exclude offline members or members outside of the map.

     

    		getpartymember .@partyid,2;
    		.@rand = rand($@partymembercount);
    		.@getsloot = $@partymemberaid[.@rand];
    		getpartymember .@partyid,0;
    		.@getname$ = $@partymembername$[.@rand];
    		dispbottom "Loot has been assigned to: "+$@partymembername$[.@rand];
            detachrid;
            attachrid(.@getsloot);
    		.@cid = getcharid(0,.@getname$);
            if(strcharinfo(3,.@cid) != .@map_name$){
    			dispbottom "You failed to get the item because you are not in the same map as your party members.";
    			end;
    		}

     

  14. Hello guys, Cyan Hijirikawa here, I created this thread to post some show cases of the work done inside MIDICity RO. Note, that some of these might be available for free release soon, so just wait for it on the other thread for MIDICIty Script Collections~

    Note: This thread will slowly be updated as soon as new features are ready to be laid bare for the public to see.
    Note: Some of these features may having some resources missing but is 100% functioning script-wise.

    1. LoveLive! Gachapon System

    This system has been inspired by @Emistry Card Recycler added with personal touches of my own.

    @Cydh for the awesome suggestion of adding this feature into MIDICity RO.

    Update; 

     

    2. Chain Chronicles Gachapon System

    Coming soon

    3. Mystic Messenger Gachapon System

    Coming soon

    4. Novice Tutorial

    5. Hero's Grave Instance [ Low level ]

    Coming soon

    6. Chaos at the Cross Road Instance [ Novice ]

    Coming soon

    7. Sea Giant's Cave Instance [ Intermediate ]

    Coming soon

    8. Bear's Hideout Instance [ Intermediate ]

    Coming soon

    and more~

    • Upvote 3
×
×
  • Create New...