Jump to content

Talon

Members
  • Posts

    78
  • Joined

  • Last visited

Posts posted by Talon

  1. So I can see there's battle.conf in the import folder, but what about exp.conf, party.conf and etc..?

    Just wanted to know if I can add my own 'something.conf' so I can do git update in the future without messing up my conf documents?

  2. Hi guys, I'm trying to create an automated racing event for my server. However I need help about movement speed. Not sure how do we set all players to the same movement speed once they talked to the npc?.. and then set to default when event is finished. Is it possible? 

  3. I was using that, but I got this, new line = after a mob's died. It has so many loops o.o

    Now every monsters can obtained a drop too...

     

     

    gOaBrFY.png

     

    Here's the code

    -	script	Sample	-1,{
    OnNPCKillEvent:
    for( .@i = 0; .@i < .mob_size; .@i++ )
    	if( killedrid == .mob_id[.@i] ){
    					getitem 512,1;
    			} else { dispbottom "No Drops"; }
    end;
    
    OnInit:
    setarray .mob_id[0],1085,1084,1079,1080,1078,1083,1082,1081,1097;
    .mob_size = getarraysize( .mob_id );
    end;
    }
    

    I used else because I'm worried if there's infinite loops.. Or I can't use else for it?

  4. -	script	Sample	-1,{
    OnNPCKillEvent:
    //for( .@i = 0; .@i < .mob_size; .@i++ )
    	if( killedrid == .mob_size ){
    					getitem 512,1;
    			}
    end;
    
    OnInit:
    setarray .mob_id[0],1002,1004,1005;
    .mob_size = getarraysize( .mob_id );
    end;
    }
    

    Trying to get monsters' id using getarraysize, but tested like 2 hours, I did change lots of different codes but nothing's working  /wah   Someone please help me :3

  5. set .@partyid,getcharid(1);
    	set .@mob_base_exp,(( getmonsterinfo( killedrid,MOB_BASEEXP ) / 100 ) * .rotd_exp_bonus );
    	set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus );
    	if( .@partyid ){
    		set .@aid,getcharid(3);
    		set .@baselevel,BaseLevel;
    		set .@map$,strcharinfo(3);
    		getpartymember .@partyid,1;
    		getpartymember .@partyid,2;
    		while( .@i < $@partymembercount ){
    			if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) )
    				if( attachrid( $@partymemberaid[.@i] ) )
    					if( strcharinfo(3) == .@map$ && ( BaseLevel - .@baselevel ) <= .party_level_range && ( BaseLevel - .@baselevel ) >= ~.party_level_range ){	
    						set BaseExp,( BaseExp + .@mob_base_exp );
    						set JobExp,( JobExp + .@mob_job_exp );
    						dispbottom "[ROTD Party] : "+.@mob_base_exp+" EXP";
    					}
    			set .@i,.@i + 1;
    		}
    		attachrid( .@aid );
    	}else{
    		set BaseExp,( BaseExp + .@mob_base_exp );
    		set JobExp,( JobExp + .@mob_job_exp );
    		dispbottom "[ROTD SOLO] : "+.@mob_base_exp+" EXP";
    	}
    	if( rand( 100 ) < .rotd_item_rate && .rotd_zeny ) 
    		set Zeny,Zeny + rand( .rotd_zeny );
    	if( rand( 100 ) < .rotd_item_rate && .rotd_item_amount ) 
    		getitem .rotd_item_id,rand( .rotd_item_amount ),.@aid;
    

    Trying to find out how to get how many party members are in a party, then divide the experience rates;

    Was trying to do   if ( $@partymembercount > 2 ){ set .@mob_job_exp,(( getmonsterinfo( killedrid,MOB_JOBEXP ) / 100 ) * .rotd_exp_bonus / 2 ); }

    ...But I guess $@partymembercount isn't the code to get how many members in a party tho  /hum Anyone can help me a bit in this?.. Thanks~!

  6. 	mes "^FF0000[Billing List]^000000";
    	mes "----------------------------";
    	for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )
    			mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";
    	mes "----------------------------";
    // ADDED //
    	if (!checkweight2(@bought_nameid,@bought_quantity)) {
    		mes "^FF0000You are currently over-weighted.^000000";
    		mes "^FF0000Please store some items before you do purchases...^000000";
    		close;
    		} else {
    		goto L_getpassed;
    	}
    // ADDED //
    	L_getpassed:
    	if( getitemname( atoi( @Currency$ ) ) != "null" )
    

    Hi Emistry I suggest you add this weightcheck for your exchanger =)

  7. Thank you guys  /lv  I feel loved. It took me more than 5 hours to figured out yesterday, here's the scripts I've used.

    if (getd(".using"+strnpcinfo(2))){
    	message strcharinfo(0), "Using..";
    	end;
    }
    
    // When fishing
    setd ".using"+strnpcinfo(2), 1;
    attachnpctimer;
    initnpctimer;
    
    // After a successful fish
    
    setd ".using"+strnpcinfo(2),0;
    stopnpctimer;
    
    
    // And added something I didn't even know what it was.. but it does the job actually xDD, thanks for the tips, after combining them, it works somehow lol!...
    
    OnTimer2000:
    if (getd(".using"+strnpcinfo(2))){
    setd ".using"+strnpcinfo(2),0;
    stopnpctimer;
    detachnpctimer;
    }
    end;
    
    OnPCLogoutEvent:
    if (getd(".using"+strnpcinfo(2))){
    setd ".using"+strnpcinfo(2),0;
    }
    end;
     
    OnInit:
    setd ".using"+strnpcinfo(2),0;
    end;
    
    

    /ic  /ic  /ic  Many thanks!   /lv  /lv  /lv

     

    Thanks to: Emistry, Skorm, Zell, Euphy and who helped me!

    • Upvote 1
  8. why don't you do pcblockmove to the player currently talking to npc ?

    I've tried pbblockmove won't work on progressbar, it will cancel the progress...

     

     

    or maybe some trick like this ?? 

    to avoid npc being occupied by 1 players just in case if they loged out accidently.

    
    if ( getd( ".npc_"+getnpcid() ) ) {
    	mes "NPC is busy now.";
    }
    else {
    	setd( ".npc_"+getnpcid() ),getcharid(3);
    	initnpctimer;
    	mes "You using me.";
    	progressbar "0xFFFFFF",5;
    	mes "Done";
    	setd( ".npc_"+getnpcid() ),0;
    	stopnpctimer;
    }
    close;
    
    OnTimer1000:
    	.@is_occupied = getd( ".npc_"+getnpcid() );
    	if ( .@is_occupied && .@is_occupied == playerattached() ) {
    		initnpctimer;
    	}
    	else {
    OnTimerQuit:
    		stopnpctimer;
    		setd( ".npc_"+getnpcid() ),0;
    	}
    	end;
    	
     

    i didnt test the script.

    Something went wrong on this, copied from cmd

    script error on npc/custom/fishing_test_v1.txt line 2

        parse_callfunc: not enough arguments, expected ','
         1 : {
    *    2 : if ( getd( ".npc_"+getnpcid(')' ) ) {
         3 :        mes "NPC is busy now.";
     
     

     

     

    I need help on a script that limits only one person talk to the npc once it's been using [progress bar casting], it's for my fishing game, but I'm not sure how can I make it works.. I've tried.. 

     

    if (.using != 1){

    set .using, 1;

     

    it works when someone's talking to it, ...but this stopped all the duplicated NPCs once someone's using... and if the person walk away during un-finish progress, the NPC itself will be stopped functioning... So... I'm looking for a better scripts/ codes for this...  /ic

    Please give me some tips if you have the knowledge for this?  /pat  Maybe strcharinfo(0), setnpctimer (getnpctimer(0) -15000); ??

     

    I don't know if this will work, cause I dont remeber if when PcLogout remember still the @

     
    if(@spoke==1){
    end;
    }
    if($spoke==1;){
    mes "Only one person can talk with me!";
    }else{
    set @spoke,1;
    set $spoke,1;
    progressbar "0xFF0000",5;
    sleep2 5000;
    set $spoke,0;
    set @spoke,0;
    dispbottom "Fished!";
    end;
    }
    end;
     
    OnPCLogoutEvent:
    if(@spoke==1){
    set spoke,0;
    set $spoke,0;
    }
    end;
     
    OnInit:
    set $spoke,0;
    end;
    

    This one almost works, but progress bar will stop once the char walked away, I've tried with pcblockmove getcharid(3),1; it won't be able to move around but when I click away, progressbar stopped working. Char has to relog to fix...

     

    Thanks for the replies guys, I'm still looking for solution /ic  

  9. Thanks for the replies guys, I'm still having issue on this, I've tested myself, this script still stopped the NPC being talkable when player cancelled the talk during progress bar loading...?

     

    This can also be done with an array. Up to 128 npcs.

    prontera,100,100,5	script	Fishing#0	100,{
    	.@a = atoi( strnpcinfo(2) );
    	if( .init[ .@a ] ) end;
    	.init[ .@a ] = 1;
    	progressbar "0xFF0000",5;
    	getitem 501,1;
    	.init[ .@a ] = 0;
    }
    
    prontera,101,100,5	duplicate(Fishing#0)	Fishing#1	100
    prontera,102,100,5	duplicate(Fishing#0)	Fishing#2	100
    prontera,103,100,5	duplicate(Fishing#0)	Fishing#3	100
    

    Maybe a set timer will help this? Any idea? Sorry I'm still a learner :(

  10. movenpc "npcname",x,y;
    

    just do some calculation to calculate random xy for your location.

     

    * i remember i did reply a topic not long ago, it's about moving npc to random coordinate too. try search.

     

     

    Yea, I already found your post, it's very helpful... /ok  but I got another problem now   /ic

×
×
  • Create New...