Jump to content

ThyroDree

Members
  • Content Count

    556
  • Joined

  • Last visited

Posts posted by ThyroDree


  1. 10 hours ago, meko said:

    mesf(format, ...param) is just a shorthand for mes(sprintf(format, ...param)) so you don't have to use both mesf() and sprintf().

    You can find the documentation in doc/script_commands.txt: mesf(), sprintf()
     

    Replace this line:

    mes "^FF0000Your Latest Record^000000: "+.@s+"."+.@ms+" Seconds.";

    
    mes "^FF0000Your Latest Record^000000: "+.@s+"."+.@ms+" Seconds.";

    With this line:

    mesf("^FF0000Your Latest Record^000000: %d.%03d Seconds.", .@s, .@ms);

    
    mesf("^FF0000Your Latest Record^000000: %d.%03d Seconds.", .@s, .@ms);

     


    Replace this line:

    mes "^0000FFTime Taken^000000: [ "+.@emp_s+"."+.@emp_ms+" Sec. ]";

    
    mes "^0000FFTime Taken^000000: [ "+.@emp_s+"."+.@emp_ms+" Sec. ]";

    With this line:

    mesf("^0000FFTime Taken^000000: [ %d.%03d Sec. ]", .@emp_s, .@emp_ms);

    
    mesf("^0000FFTime Taken^000000: [ %d.%03d Sec. ]", .@emp_s, .@emp_ms);

     

     

    For the areaannounce() lines you can use sprintf(), like this:

    areaannounce("map name", .x1, .y1, .x2, .y2, sprintf("Your time is %dm %02ds %03dms", .m, .s, .ms), bc_area);

    
    areaannounce("map name", .x1, .y1, .x2, .y2, sprintf("Your time is %dm %02ds %03dms", .m, .s, .ms), bc_area);

     

    Thank you will check on this.


  2. 50 minutes ago, meko said:

    By two more zeroes do you mean zero-padding so that the numbers are in the same format, like 008 (always the same width)?

    You can do zero-padding with sprintf() like so:

    sprintf("%03d", 5); // 005

    
    sprintf("%03d", 5); // 005

    so you would use it like this:

    mesf("^0000FFTime Taken^000000: [ %d.%03d Sec. ]", @emp_s, @emp_ms); // this would print, for example: Time taken: [ 5.095 Sec.]

    
    mesf("^0000FFTime Taken^000000: [ %d.%03d Sec. ]", @emp_s, @emp_ms);
    // this would print, for example: Time taken: [ 5.095 Sec.]

     

    Yes adding more zeroes, like that. How can i use the sprintf and mesf to work in this script. I tried adding it to the script. Also searched for sprintf and mesf at herc.ws


  3. Hello how can I add 2 more zeroes to ms? also can add 5 top breakers not only the fastest one?

    heres the script im using..

    //===== rAthena Script =======================================
    //= Emperium Break Room
    //===== By: ==================================================
    //= Masao
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena SVN
    //===== Description: =========================================
    //= An little Emperium Break Room NPC in which you can test your
    //= strength and speed against Emperiums.
    //===== Additional Comments: =================================
    //= 1.0 First Version. [Masao]
    //============================================================
    prontera,145,173,5	script	Emperium Breaker	4_GEFFEN_14,{ 
    
        set .@emp_time,$empbrk_record;
    	set .@emp_m,.@emp_time / 60000;
    	set .@emp_s,.@emp_time / 1000;
    	set .@emp_ms,.@emp_time / 10000;
        set .@time,empbrk_record;
    	set .@m,.@time / 60000;
    	set .@s,.@time / 1000;
    	set .@ms,.@time / 10000;
    	mes "[ ^FF0000Emperium Breaker^000000 ]";;
        	mes "^FF0000Your Latest Record^000000: "+.@s+"."+.@ms+" Seconds.";
    	mes "^FF0000Top Breaker^000000: "+$empbrk_master$+"";
    	mes "^0000FFTime Taken^000000: [ "+.@emp_s+"."+.@emp_ms+" Sec. ]";
    	next;
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "Would you like to try to set a new record?";
    	next;
    	if (getgmlevel() >= 20) {
    		menu "Standard Menu",-,"Reset",L_RO,"Reset Rooms",L_RR,"Cancel",L_C;
    
    		menu "Yes",-,"No",L_C,"Reset",L_R;
    	} else {
    		menu "Yes",-,"No",L_C,"Reset",L_R;
    	}
    	cleararray .arena$[0],"",4;
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	if (getareausers("pvp_n_4-5",94,128,105,139)){
    		mes "Emperium Room 1: ^FF0000 Busy^000000";
    	}else{
    		mes "Emperium Room 1: ^00A000 Free^000000";
    		set .arena$[0],"Emperium Room 1";
    	}
    	if (getareausers("pvp_n_4-5",60,94,71,105)){
    		mes "Emperium Room 2: ^FF0000 Busy^000000";
    	}else{
    		mes "Emperium Room 2: ^00A000 Free^000000";
    		set .arena$[1],"Emperium Room 2";
    	}
    	if (getareausers("pvp_n_4-5",94,60,105,71)){
    		mes "Emperium Room 3: ^FF0000 Busy^";
    	}else{
    		mes "Emperium Room 3: ^00A000 Free^000000";
    		set .arena$[2],"Emperium Room 3";
    	}
    	if (getareausers("pvp_n_4-5",128,94,139,105)){
    		mes "Emperium Room 4: ^FF0000 Busy^000000";
    	}else{
    		mes "Emperium Room 4: ^00A000 Free^000000";
    		set .arena$[3],"Emperium Room 4";
    	}
    	next;
    	switch (select(.arena$[0],.arena$[1],.arena$[2],.arena$[3],"Exit")){
    	case 1:
    		if (getareausers("pvp_n_4-5",60,94,71,105) == 0){
    			if($@empr_occupied[0] > 0){
    				mes "[Emperium Breaker]";
    				mes "This room is currently occupied, please try again later.";
    				close;
    			}
    			close2;
    			set $@empr_occupied[0],1;
    			set $@empbrk_charid[0],getcharid(0);
    			warp "pvp_n_4-5",99,128;
    			initnpctimer "EmpBrk#1";
    			sc_end SC_ALL;
    			end;
    		}
    		mes "[ ^FF0000Emperium Breaker^000000 ]";
    		mes "This room is currently occupied, please try again later.";
    		close;
        case 2:
    		if (getareausers("pvp_n_4-5",60,94,71,105) == 0){    
    			if($@empr_occupied[1] > 0){
    				mes "[ ^FF0000Emperium Breaker^000000 ]";
    				mes "This room is currently occupied, please try again later.";
    				close;
    			}
    			close2;
    			set $@empr_occupied[1],1;
    			set $@empbrk_charid[1],getcharid(0);
    			warp "pvp_n_4-5",68,99;
    			initnpctimer "EmpBrk#2";
    			sc_end SC_ALL;
    			end;
    		}
    		mes "[ ^FF0000Emperium Breaker^000000 ]";
    		mes "This room is currently occupied, please try again later.";
    		close;
        case 3:
    		if (getareausers("pvp_n_4-5",94,60,105,71) == 0){   
    			if($@empr_occupied[2] > 0){
    				mes "[ ^FF0000Emperium Breaker^000000 ]";
    				mes "This room is currently occupied, please try again later.";
    				close;
    			}
    			close2;
    			set $@empr_occupied[2],1;
    			set $@empbrk_charid[2],getcharid(0);
    			warp "pvp_n_4-5",100,68;
    			initnpctimer "EmpBrk#3";
    			sc_end SC_ALL;
    			end;
    		}
    		mes "[ ^FF0000Emperium Breaker^000000 ]";
    		mes "This room is currently occupied, please try again later.";
    		close;
        case 4:
    		if (getareausers("pvp_n_4-5",128,94,139,105) == 0){  
    			if($@empr_occupied[3] > 0){
    				mes "[ ^FF0000Emperium Breaker^000000 ]";
    				mes "This room is currently occupied, please try again later.";
    				close;
    			}
    			close2;
    			set $@empr_occupied[3],1;
    			set $@empbrk_charid[3],getcharid(0);
    			warp "pvp_n_4-5",130,99;
    			initnpctimer "EmpBrk#4";
    			sc_end SC_ALL;
    			end;
    		}
    		mes "[ ^FF0000Emperium Breaker^000000 ]";
    		mes "This room is currently occupied, please try again later.";
    		close;
    	case 5:
    		close;
        }
    
    L_RO:
        mes "[ ^FF0000Emperium Breaker^000000 ]";
        mes "Are you sure you want to reset the official record?";
    	next;
        menu "Yes",-,"No",L_C;
    
        set $empbrk_record,0;
        set $empbrk_master$,"";
    	close;
    
    L_R:
        mes "[ ^FF0000Emperium Breaker^000000 ]";
        mes "Are you sure you want to reset your record?";
    	next;
        menu "Yes",-,"No",L_C;
    
        set empbrk_record,0;
    	close;
    
    L_RR:
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "Rooms have been reset.";
    	cleararray $@empr_occupied[0],0,4;
    	close;
    
    L_C:
    	close;
    }
    
    -	script	EmpBrk#1	-1,{
    
    OnTimer5000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area;
    	end;
    
    OnTimer8000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area;
    	end;
    
    OnTimer9000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area;
    	end;
    
    OnTimer10000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area;
    	end;
    
    OnTimer11000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area;
    	end;
    
    OnTimer12000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area;
    	end;
    
    OnTimer13000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area;
    	monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#1::OnEmpBreak";
    	end;
    
    OnTimer600000:
    	warpchar "prontera",156,191,$@empbrk_charid[0];
    	killmonster "pvp_n_4-5","EmpBrk#1::OnEmpBreak";
    	set $@empr_occupied[0],0;
    	stopnpctimer;
    	end;
    
    OnEmpBreak:
    	stopnpctimer;
    	set .current_time,getnpctimer(0,"EmpBrk#1");
    	set .new_time,.current_time - 13000;
    	if (.new_time < empbrk_record || empbrk_record == 0)
    	{
    		areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area;
    		set empbrk_record,.new_time;
    	}
    	if (.new_time < $empbrk_record || $empbrk_record == 0)
    	{
    		announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all;
    		set $empbrk_record,.new_time;
    		set $empbrk_master$,strcharinfo(0); 
    	}
    	set .m,.new_time / 60000;
    	set .s,.new_time / 1000;
    	set .ms,.new_time / 10000;
    	if(.m < 0){
    		set .m,0;
    	}
    	if(.s < 0){
    		set .s,0;
    	}
    	set $@empr_occupied[0],0;
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area;
    	warpchar "prontera",156,191,$@empbrk_charid[0];
    	end;
    
    OnInit:
    	set .x1,94;
    	set .y1,128;
    	set .x2,105;
    	set .y2,139;
    	set .xe,100;
    	set .ye,134;
    	end;
    }
    
    pvp_n_4-5,99,125,0	script	EmpBrk#1_touch	FAKE_NPC,3,1,{
    
    OnTouch:
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "You cannot exit your square!";
    	close2;
    	warp "pvp_n_4-5",99,128;
    	end;
    }
    
    -	script	EmpBrk#2	-1,{
    
    OnTimer5000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area;
    	end;
    
    OnTimer8000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area;
    	end;
    
    OnTimer9000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area;
    	end;
    
    OnTimer10000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area;
    	end;
    
    OnTimer11000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area;
    	end;
    
    OnTimer12000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area;
    	end;
    
    OnTimer13000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area;
    	monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#2::OnEmpBreak";
    	end;
    
    OnTimer600000:
    	warpchar "prontera",156,191,$@empbrk_charid[1];
    	killmonster "pvp_n_4-5","EmpBrk#2::OnEmpBreak";
    	set $@empr_occupied[1],0;
    	stopnpctimer;
    	end;
    
    OnEmpBreak:
    	stopnpctimer;
    	set .current_time,getnpctimer(0,"EmpBrk#2");
    	set .new_time,.current_time - 13000;
    	if (.new_time < empbrk_record || empbrk_record == 0)
    	{
    		areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area;
    		set empbrk_record,.new_time;
    	}
    	if (.new_time < $empbrk_record || $empbrk_record == 0)
    	{
    		announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all;
    		set $empbrk_record,.new_time;
    		set $empbrk_master$,strcharinfo(0); 
    	}
    	set .m,.new_time / 60000;
    	set .s,.new_time / 1000;
    	set .ms,.new_time / 10000;
    	if(.m < 0){
    		set .m,0;
    	}
    	if(.s < 0){
    		set .s,0;
    	}
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area;
    	warpchar "prontera",156,191,$@empbrk_charid[1];
    	set $@empr_occupied[1],0;
    	end;
    
    OnInit:
    	set .x1,60;
    	set .y1,94;
    	set .x2,71;
    	set .y2,105;
    	set .xe,65;
    	set .ye,99;
    	end;
    }
    
    pvp_n_4-5,74,99,0	script	EmpBrk#2_touch	FAKE_NPC,1,3,{
    
    OnTouch:
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "You cannot exit your square!";
    	close2;
    	warp "pvp_n_4-5",68,99;
    	end;
    }
    
    -	script	EmpBrk#3	-1,{
    
    OnTimer5000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area;
    	end;
    
    OnTimer8000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area;
    	end;
    
    OnTimer9000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area;
    	end;
    
    OnTimer10000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area;
    	end;
    
    OnTimer11000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area;
    	end;
    
    OnTimer12000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area;
    	end;
    
    OnTimer13000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area;
    	monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#3::OnEmpBreak";
    	end;
    
    OnTimer600000:
    	warpchar "prontera",156,191,$@empbrk_charid[2];
    	killmonster "pvp_n_4-5","EmpBrk#3::OnEmpBreak";
    	set $@empr_occupied[2],0;
    	stopnpctimer;
    	end;
    
    OnEmpBreak:
    	stopnpctimer;
    	set .current_time,getnpctimer(0,"EmpBrk#3");
    	set .new_time,.current_time - 13000;
    	if (.new_time < empbrk_record || empbrk_record == 0)
    	{
    		areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area;
    		set empbrk_record,.new_time;
    	}
    	if (.new_time < $empbrk_record || $empbrk_record == 0)
    	{
    		announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all;
    		set $empbrk_record,.new_time;
    		set $empbrk_master$,strcharinfo(0); 
    	}
    	set .m,.new_time / 60000;
    	set .s,.new_time / 1000;
    	set .ms,.new_time / 10000;
    	if(.m < 0){
    		set .m,0;
    	}
    	if(.s < 0){
    		set .s,0;
    	}
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area;
    	warpchar "prontera",156,191,$@empbrk_charid[2];
    	set $@empr_occupied[2],0;
    	end;
    
    OnInit:
    	set .x1,94;
    	set .y1,60;
    	set .x2,105;
    	set .y2,71;
    	set .xe,99;
    	set .ye,65;
    	end;
    }
    
    pvp_n_4-5,100,74,0	script	EmpBrk#3_touch	FAKE_NPC,3,1,{
    
    OnTouch:
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "You cannot exit your square!";
    	close2;
    	warp "pvp_n_4-5",100,68;
    	end;
    }
    
    -	script	EmpBrk#4	-1,{
    
    OnTimer5000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Get ready to break the Emperium!",bc_area;
    	end;
    
    OnTimer8000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"5",bc_area;
    	end;
    
    OnTimer9000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"4",bc_area;
    	end;
    
    OnTimer10000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"3",bc_area;
    	end;
    
    OnTimer11000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"2",bc_area;
    	end;
    
    OnTimer12000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"1",bc_area;
    	end;
    
    OnTimer13000:
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"GO!!!",bc_area;
    	monster "pvp_n_4-5",.xe,.ye,"Emperium",EMPELIUM,1,"EmpBrk#4::OnEmpBreak";
    	end;
    
    OnTimer600000:
    	warpchar "prontera",156,191,$@empbrk_charid[3];
    	killmonster "pvp_n_4-5","EmpBrk#4::OnEmpBreak";
    	set $@empr_occupied[3],0;
    	stopnpctimer;
    	end;
    
    OnEmpBreak:
    	stopnpctimer;
    	set .current_time,getnpctimer(0,"EmpBrk#4");
    	set .new_time,.current_time - 13000;
    	if (.new_time < empbrk_record || empbrk_record == 0)
    	{
    		areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"New Own Record!!!",bc_area;
    		set empbrk_record,.new_time;
    	}
    	if (.new_time < $empbrk_record || $empbrk_record == 0)
    	{
    		announce strcharinfo(0)+" is now the new No. 1 Emperium Breaker!!",bc_all;
    		set $empbrk_record,.new_time;
    		set $empbrk_master$,strcharinfo(0); 
    	}
    	set .m,.new_time / 60000;
    	set .s,.new_time / 1000;
    	set .ms,.new_time / 10000;
    	if(.m < 0){
    		set .m,0;
    	}
    	if(.s < 0){
    		set .s,0;
    	}
    	areaannounce "pvp_n_4-5",.x1,.y1,.x2,.y2,"Your time is "+.m+"m "+.s+"s "+.ms+"ms",bc_area;
    	warpchar "prontera",156,191,$@empbrk_charid[3];
    	set $@empr_occupied[3],0;
    	end;
    
    OnInit:
    	set .x1,128;
    	set .y1,94;
    	set .x2,139;
    	set .y2,105;
    	set .xe,134;
    	set .ye,99;
    	end;
    }
    
    pvp_n_4-5,125,100,0	script	EmpBrk#4_touch	FAKE_NPC,1,3,{
    
    OnTouch:
    	mes "[ ^FF0000Emperium Breaker^000000 ]";
    	mes "You cannot exit your square!";
    	close2;
    	warp "pvp_n_4-5",130,99;
    	end;
    }
    
    pvp_n_4-5	mapflag	nowarp	20
    pvp_n_4-5	mapflag	nowarpto	20
    pvp_n_4-5	mapflag	notrade	20
    pvp_n_4-5	mapflag	nochat	20
    pvp_n_4-5	mapflag	nocommand	20
    pvp_n_4-5	mapflag	novending	20
    pvp_n_4-5	mapflag	gvg_castle	20
    pvp_n_4-5	mapflag	nobranch	20
    pvp_n_4-5	mapflag	noicewall	20
    pvp_n_4-5	mapflag	noloot	20
    pvp_n_4-5	mapflag	nomemo	20
    pvp_n_4-5	mapflag	nosave	20
    pvp_n_4-5	mapflag	noreturn	20
    pvp_n_4-5	mapflag	gvg	20
    
    
    //DUPLICATES  Emperium Breaker	4_M_JOB_ASSASSIN
    //payon,170,220,4	duplicate(Emperium Breaker)	Emperium Breaker#pay	4_M_JOB_ASSASSIN
    //gonryun,153,112,4	duplicate(Emperium Breaker)	Emperium Breaker#gon	4_M_JOB_ASSASSIN

     


  4. Hello! anyone can make this compatible to hercules?

    //===== rAthena Script =======================================
    //= Private MVP & Branch Room
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Allows players to rent an MVP room for personal use,
    //= or for a party or guild.
    //===== Additional Comments: =================================
    //= 1.0 First version, edited. [Euphy]
    //============================================================
    
    prontera,155,180,4	script	Private MVP Room	4_M_EIN_SOLDIER,{
    	mes "[Private MVP Room]";
    	mes "Please select a private MVP room.";
    	if ( getvariableofnpc( .rentcost, "MVP Summoner" ) )
    		mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "MVP Summoner" ) ) +" zeny.";
    	else
    		mes "You can only use the room for only "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes.";
    	mes " ";
    	for ( .@i = 1; .@i <= 8; .@i++ )
    		if ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) )
    			mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000";
    	next;
    	.@room = select(
    		"MVP Room 1 ["+ getmapusers("06guild_01") +"]",
    		"MVP Room 2 ["+ getmapusers("06guild_02") +"]",
    		"MVP Room 3 ["+ getmapusers("06guild_03") +"]",
    		"MVP Room 4 ["+ getmapusers("06guild_04") +"]",
    		"MVP Room 5 ["+ getmapusers("06guild_05") +"]",
    		"MVP Room 6 ["+ getmapusers("06guild_06") +"]",
    		"MVP Room 7 ["+ getmapusers("06guild_07") +"]",
    		"MVP Room 8 ["+ getmapusers("06guild_08") +"]");
    	if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
    		if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) {
    			warp "06guild_0"+ .@room, 0,0;
    			close;
    		} else {
    			mes "[Private MVP Room]";
    			mes "This room is reserved for ";
    			mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000.";
    			mes "Please select another.";
    			close;
    		}
    	}
    	mes "[Private MVP Room]";
    	mes "Reserve this room for...";
    	next;
    	set .@type, select( "For my party members", "For my guild members", "For personal account use" );
    	if ( !getcharid(.@type) ) {
    		mes "[Private MVP Room]";
    		mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+".";
    		close;
    	}
    	else if ( Zeny < getvariableofnpc( .rentcost, "MVP Summoner" ) ) {
    		mes "You don't have enough zeny to rent a room.";
    		close;
    	}
    	else if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
    		mes "[Private MVP Room]";
    		mes "I'm sorry, somebody else has already registered this room faster than you.";
    		close;
    	}
    	for ( .@i = 1; .@i <= 8; .@i++ ) {
    		if ( ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
    			mes "[Private MVP Room]";
    			mes "You already rented Room#"+ .@i +". Use that room instead.";
    			close;
    		}
    	}
    	set .type[.@room], .@type;
    	set .inuseid[.@room], getcharid(.@type);
    	set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type );
    	Zeny -= getvariableofnpc( .rentcost, "MVP Summoner" );
    	warp "06guild_0"+ .@room, 0,0;
    	killmonsterall "06guild_0"+ .@room;
    	donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap";
    	close;
    OnInit:
    	.color$[1] =  "^EE8800"; // party color
    	.color$[2] =  "^70CC11"; // guild color
    	.color$[3] =  "^0000FF"; // account color
    	end;
    }
    
    -	script	MVP Summoner	FAKE_NPC,{
    	mes "[MVP Summoner]";
    	mes "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 );
    	mes "Hi, what can I do for you?";
    	next;
    	switch ( select(.menu$) ) {
    	case 1:
    		mes "[MVP Summoner]";
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "I cannot offer heal service when there are monsters around.";
    			close;
    		}
    		sc_end SC_STONE;
    		sc_end SC_SLOWDOWN;
    		sc_end SC_FREEZE;
    		sc_end SC_SLEEP;
    		sc_end SC_CURSE;
    		sc_end SC_SILENCE;
    		sc_end SC_CONFUSION;
    		sc_end SC_BLIND;
    		sc_end SC_BLEEDING;
    		sc_end SC_DECREASEAGI;
    		sc_end SC_POISON;
    		sc_end SC_HALLUCINATION;
    		sc_end SC_STRIPWEAPON;
    		sc_end SC_STRIPARMOR;
    		sc_end SC_STRIPHELM;
    		sc_end SC_STRIPSHIELD;
    		sc_end SC_CHANGEUNDEAD;
    		sc_end SC_ORCISH;
    		sc_end SC_BERSERK;
    		sc_end SC_SKE;
    		sc_end SC_SWOO;
    		sc_end SC_SKA;
    		percentheal 100,100;
    		specialeffect(EF_HEAL2, AREA, playerattached());
    		mes "You are completely healed.";
    		close;
    	case 2:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "[MVP Summoner]";
    			mes "I cannot summon another MVP when there are monsters around.";
    			close;
    		} else if ( .mvpcost ) {
    			mes "[MVP Summoner]";
    			mes "The cost to summon an MVP is "+ callfunc( "F_InsertComma", .mvpcost ) +" zeny.";
    			next;
    			set .@menu, select(.mvpid_menu$) -1;
    			mes "[MVP Summoner]";
    			if ( Zeny < .mvpcost ) {
    				mes "You don't have enough zeny to summon an MVP.";
    				close;
    			}
    		} else {
    			set .@menu, select(.mvpid_menu$) -1;
    			mes "[MVP Summoner]";
    		}
    		mes "Please get ready.";
    		close2;
    		if ( Zeny < .mvpcost ) end;
    		Zeny -= .mvpcost;
    		monster "this", 0, 0, "--ja--", .mvpid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
    		end;
    	case 3:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "[MVP Summoner]";
    			mes "I cannot summon another mini-boss when there are monsters around.";
    			close;
    		} else if ( .bosscost ) {
    			mes "[MVP Summoner]";
    			mes "The cost to summon a mini-boss is "+ callfunc( "F_InsertComma", .bosscost ) +" zeny.";
    			next;
    			set .@menu, select(.bossid_menu$) -1;
    			mes "[MVP Summoner]";
    			if ( Zeny < .bosscost ) {
    				mes "You doesn't have enough zeny to summon a mini-boss.";
    				close;
    			}
    		} else {
    			set .@menu, select(.bossid_menu$) -1;
    			mes "[MVP Summoner]";
    		}
    		mes "Please get ready.";
    		close2;
    		if ( Zeny < .bosscost ) end;
    		Zeny -= .bosscost;
    		monster "this", 0, 0, "--ja--", .bossid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
    		end;
    	case 4:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) > 0 ) {
    			mes "[MVP Summoner]";
    			mes "I cannot offer this service when there are monsters around.";
    			close;
    		}
    		close2;
    		callshop "MVP room#branch", 1;
    		end;
    	case 5:
    		mes "[MVP Summoner]";
    		mes "Are you sure you want to leave this room?";
    		next;
    		if ( select( "Yes:No") == 1 )
    			warp .respawnmap$, .respawnx, .respawny;
    		close;
    	case 6:
    		mes "[MVP Summoner]";
    		if ( getmapusers( strcharinfo(3) ) > 1 ) {
    			mes "There are still some players in this room. Make sure you are the last member in this room to use this option.";
    			close;
    		}
    		mes "Are you sure you want to give up this room?";
    		if ( .rentcost )
    			mes "You will need to pay again to enter this room.";
    		next;
    		if ( select( "Yes", "No" ) == 2 ) close;
    		awake strnpcinfo(0);
    		end;
    	}
    	close;
    
    OnMobDead:
    	end;
    
    OnEnterMap:
    	.@id = atoi( strnpcinfo(2) );
    	.renttime[.@id] = gettimetick(2);
    	sleep .timeout * 60000;
    	mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	.renttime[.@id] = 0;
    	killmonsterall strnpcinfo(4);
    	end;
    
    OnInit:
    	if ( !getstrlen( strnpcinfo(2) ) ) {
    
    //	Config ---------------------------------------------------------------------------------------
    
    	// Room rental time, in minutes.
    	// When time runs out, all players inside the room will be kicked out.
    	// Do NOT set this to zero!
    	set .timeout, 60;
    
    	set .rentcost, 100000;	// Zeny cost for renting a room (0 = free)
    	set .mvpcost, 100000;	// Zeny cost to summon an MVP (0 = free)
    	set .bosscost, 50000;	// Zeny cost to summon a boss monster (0 = free)
    
    	//	Options setting inside MVP room
    	set .@menu[1], 1;	// Turn Heal option On/Off
    	set .@menu[2], 1;	// Turn MVP Summoning On/Off
    	set .@menu[3], 1;	// Turn Mini boss Summoning On/Off
    	set .@menu[4], 0;	// Sell items (branches) On/Off (see shop below, before the mapflags)
    
    	// Respawn point when players leave the room
    	set .respawnmap$, "prontera";
    	set .respawnx, 150;
    	set .respawny, 174;
    
    	setarray .mvpid[0],
    		1511,//	Amon Ra
    		1647,// Assassin Cross Eremes
    		1785,//	Atroce
    		1630,//	Bacsojin
    		1039,//	Baphomet
    		1874,//	Beelzebub
    		1272,//	Dark Lord
    		1719,//	Datale
    		1046,//	Doppelgangger
    		1389,//	Dracula
    		1112,//	Drake
    		1115,//	Eddga
    		1418,//	Evil Snake Lord
    		1871,//	Fallen Bishop
    		1252,//	Garm
    		1768,//	Gloom Under Night
    		1086,//	Golden Thief Bug
    		1885,//	Gopinich
    		1649,// High Priest Magaleta
    		1651,// High Wizard Katrinn
    		1832,//	Ifrit
    		1492,//	Incantation Samurai
    		1734,//	Kiel D-01
    		1251,//	Knight of Windstorm
    		1779,//	Ktullanux
    		1688,//	Lady Tanee
    		1646,// Lord Knight Seyren
    		1373,//	Lord of Death
    		1147,//	Maya
    		1059,//	Mistress
    		1150,//	Moonlight Flower
    		1087,//	Orc Hero
    		1190,//	Orc Lord
    		1038,//	Osiris
    		1157,//	Pharaoh
    		1159,//	Phreeoni
    		1623,//	RSX 0806
    		1650,// Sniper Shecil
    		1583,//	Tao Gunka
    		1708,//	Thanatos
    		1312,//	Turtle General
    		1751,//	Valkyrie Randgris
    		1685,// Vesper
    		1648,// Whitesmith Harword
    		1917,// Wounded Morroc
    		1658;//	Ygnizem
    
    	setarray .bossid[0],
    		1096,// Angeling
    		1388,// Archangeling
    		1795,// Bloody Knight
    		1830,// Bow Guardian
    		1839,// Byorgue
    		1309,// Cat O' Nine Tail
    		1283,// Chimera
    		1302,// Dark Illusion
    		1198,// Dark Priest
    		1582,// Deviling
    		1091,// Dragon Fly
    		1093,// Eclipse
    		1205,// Executioner
    		1783,// Galion
    		1592,// Gangster
    		1120,// Ghostring
    		1259,// Gryphon
    		1720,// Hydro
    		1090,// Mastering
    		1289,// Maya Purple
    		1262,// Mutant Dragon
    		1203,// Mysteltainn
    		1870,// Necromancer
    		1295,// Owl Baron
    		1829,// Sword Guardian
    		1204,// Tirfing
    		1089,// Toad
    		1092,// Vagabond Wolf
    		1765;// Valkyrie
    
    //	Config Ends ------------------------------------------------------------------------
    
    		if ( !.timeout ) set .timeout, 60;
    		.menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ;
    		.menu$ = .menu$ + ( .@menu[2] ? "Summon MVP" : "" ) +":";
    		.menu$ = .menu$ + ( .@menu[3] ? "Summon Mini-boss" : "" ) +":";
    		.menu$ = .menu$ + ( .@menu[4] ? "Buy branches" : "" ) +":";
    		.menu$ = .menu$ + "Leave this room:Give up this room";
    		if ( .@menu[2] ) {
    			.@size = getarraysize( .mvpid );
    			for ( .@i = 0; .@i < .@size; .@i++ )
    				.mvpid_menu$ = .mvpid_menu$ + getmonsterinfo( .mvpid[.@i], MOB_NAME ) +":";
    		}
    		if ( .@menu[3] ) {
    			.@size = getarraysize( .bossid );
    			for ( .@i = 0; .@i < .@size; .@i++ )
    				.bossid_menu$ = .bossid_menu$ + getmonsterinfo( .bossid[.@i], MOB_NAME ) +":";
    		}
    	}
    	else {
    		mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map;
    		mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	}
    	end;
    }
    
    -	shop	MVP room#branch2	FAKE_NPC,604:100000,12103:1000000
    
    06guild_01,49,49,4	duplicate(MVP Summoner)	Summoner#1	4_F_KAFRA2
    06guild_02,49,49,4	duplicate(MVP Summoner)	Summoner#2	4_F_KAFRA2
    06guild_03,49,49,4	duplicate(MVP Summoner)	Summoner#3	4_F_KAFRA2
    06guild_04,49,49,4	duplicate(MVP Summoner)	Summoner#4	4_F_KAFRA2
    06guild_05,49,49,4	duplicate(MVP Summoner)	Summoner#5	4_F_KAFRA2
    06guild_06,49,49,4	duplicate(MVP Summoner)	Summoner#6	4_F_KAFRA2
    06guild_07,49,49,4	duplicate(MVP Summoner)	Summoner#7	4_F_KAFRA2
    06guild_08,49,49,4	duplicate(MVP Summoner)	Summoner#8	4_F_KAFRA2
    
    06guild_01	mapflag	nowarpto
    06guild_02	mapflag	nowarpto
    06guild_03	mapflag	nowarpto
    06guild_04	mapflag	nowarpto
    06guild_05	mapflag	nowarpto
    06guild_06	mapflag	nowarpto
    06guild_07	mapflag	nowarpto
    06guild_08	mapflag	nowarpto
    06guild_01	mapflag	nomemo
    06guild_02	mapflag	nomemo
    06guild_03	mapflag	nomemo
    06guild_04	mapflag	nomemo
    06guild_05	mapflag	nomemo
    06guild_06	mapflag	nomemo
    06guild_07	mapflag	nomemo
    06guild_08	mapflag	nomemo
    06guild_01	mapflag	noteleport
    06guild_02	mapflag	noteleport
    06guild_03	mapflag	noteleport
    06guild_04	mapflag	noteleport
    06guild_05	mapflag	noteleport
    06guild_06	mapflag	noteleport
    06guild_07	mapflag	noteleport
    06guild_08	mapflag	noteleport
    06guild_01	mapflag	nosave	SavePoint
    06guild_02	mapflag	nosave	SavePoint
    06guild_03	mapflag	nosave	SavePoint
    06guild_04	mapflag	nosave	SavePoint
    06guild_05	mapflag	nosave	SavePoint
    06guild_06	mapflag	nosave	SavePoint
    06guild_07	mapflag	nosave	SavePoint
    06guild_08	mapflag	nosave	SavePoint
    06guild_01	mapflag	nopenalty
    06guild_02	mapflag	nopenalty
    06guild_03	mapflag	nopenalty
    06guild_04	mapflag	nopenalty
    06guild_05	mapflag	nopenalty
    06guild_06	mapflag	nopenalty
    06guild_07	mapflag	nopenalty
    06guild_08	mapflag	nopenalty

    getting alot of bug and error using this.

    1 error is like this [Debug]: mapindex_name2id: Map "" not found in index list!


  5. 11 hours ago, Tsuuu said:

    Search function: 

    OnAgitBreak:

    
    OnAgitBreak:


    Add below:

    .@GID = getcharid(CHAR_ID_GUILD); .@nick$ = strcharinfo(PC_NAME);

    
    .@GID = getcharid(CHAR_ID_GUILD);
    .@nick$ = strcharinfo(PC_NAME);


    After that just look for the part that advertises and exchange for:
     

    // Respawn the Emperium, and display new owners. sleep 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; sleep 7000; //Edit announce bellow announce "O Castelo [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] foi conquistado por [" + .@nick$ + "] da gloriosa guild [" + getguildname(.@GID) + "].",bc_all|bc_woe; end;

    
    // Respawn the Emperium, and display new owners.
    sleep 500; // Slow down script execution slightly.
    if( agitcheck() )
    	donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena";
    sleep 7000;
    //Edit announce bellow
    announce "O Castelo [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] foi conquistado por [" + .@nick$ + "] da gloriosa guild [" + getguildname(.@GID) + "].",bc_all|bc_woe; 
    end;


    works well for me like this...

    Thank you it works for me too!  but i have question im using Euphy WoE Controller and it has lines like this, do I need to change this lines too?

    function Disp_Owner {
    	set .@o, getcastledata(getarg(0),1);
    	if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildinfo(GUILDINFO_NAME, .@o)+"] guild.",bc_all|bc_woe;
    	else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe;
    	return;
    }

    I applied the changes on my woe-fe/agit_main.txt and it works but the euphy woe controller from my custom/ folder makes me confused o-o do i need to disable the agit_main? and change the announce line in euphy script instead?


  6. Before this error, I can login normally, after I remove and changed my dll files from my client side. I get failed to connect to the server after character select, and then I restarted the server using ./athena-start restart then I cannot connect to my map server..  Its always [Fatal Error]: Connection to char-server failed 3. I have same userid passwd at my conf files and sql login

     

    [Error]: Sent wrong packet id: 0x2711
    [Error]: --- failed assertion --------------------------------------------
    [Error]: socket.c:2112: '0' in function `socket_validateWfifo'
    [Error]: 0x556025745e15 nullpo_backtrace_print
    [Error]:        /home/Thyro/Hercules/src/common/nullpo.c:77
    [Error]: 0x556025745e15 assert_report
    [Error]:        /home/Thyro/Hercules/src/common/nullpo.c:147
    [Error]: 0x556025759c4b wfifoset
    [Error]:        /home/Thyro/Hercules/src/common/socket.c:901
    [Error]: [Status]: Done reading '255' entries in 'db/pre-re/statpoint.txt'.
    0x556025738c7b login_parse_request_connection
    [Error]:        /home/Thyro/Hercules/src/login/login.c:1473
    [Error]: 0x556025734312 lclif_parse_CA_CHARSERVERCONNECT
    [Error]:        /home/Thyro/Hercules/src/login/lclif.c:266
    [Error]: 0x55602573474c lclif_parse_packet
    [Error]:        /home/Thyro/Hercules/src/login/lclif.c:510
    [Error]: 0x5560257343d1 lclif_parse
    [Error]:        /home/Thyro/Hercules/src/login/lclif.c:419
    [Error]: 0x556025758f05 do_sockets
    [Error]:        /home/Thyro/Hercules/src/common/socket.c:1073
    [Error]: 0x55602572ff61 main
    [Error]:        /home/Thyro/Hercules/src/common/core.c:539
    [Error]: 0x7f36b91412e0 ???
    [Error]:        ???:0
    [Error]: 0x556025730149 ???
    [Error]:        ???:0
    [Error]: 0xffffffffffffffff ???
    [Error]:        ???:0
    [Error]: --- end failed assertion ----------------------------------------
    [Error]: Can not connect to login-server.
    [Error]: The server communication passwords (default s1/p1) are probably invalid.
    [Error]: Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.
    [Error]: The communication passwords are set in /conf/map/map-server.conf and /conf/char/char-server.conf

     


  7. Anyone can help me add breaker name when aannounce who break the emperium?

     

    function Disp_Owner {
    	set .@o, getcastledata(getarg(0),1);
    	if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildinfo(GUILDINFO_NAME, .@o)+"] guild.",bc_all|bc_woe;
    	else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe;
    	return;
    }
    function Add_Zero {
    	return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00";
    }

    I tried,

        if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by " + strcharinfo(0) + ", from ["+getguildinfo(GUILDINFO_NAME, .@o)+"] guild.",bc_all|bc_woe;

     

    but didn't work..


  8. Anyone can help me where did this error come from? Every time I do enter my gold room script and get out the gold room map, maybe 3~5mins or so.. This error will show. I don't if its just coincidence.

    I will also put my Gold room script too.

    git hash: ed5d2d7222401f17f9c8ded96ff0e86aba8e88d6

    image.thumb.png.143211dc4d90baf7901fa91c1ae3d0e6.png

     

     

    Gold Room Script:

    // https://rathena.org/board/topic/108888-request-a-gold-room-drop-gold-point/
    
    prontera,165,159,4	script	Gold Room#goldroom	4_M_BARMUND,{
    	doevent "gold_room_main::OnTalk";
    }
    
    // warp portal back prontera
    ordeal_3-2,155,153,4	script	Gold Exit	2_M_OLDBLSMITH,{
    	mes "[ ^FF0000Gold Room Manager^000000 ]";
    	mes "Hello, I am expert at running away!";
    	mes "You want to leave?";
    	while (1) {
    	switch(select("Yes, I'm Scared!", "Dqf? No!")) {
    	case 1:
    		warp "prontera" ,162,153;
    	end;
    	case 2:
    	mes "[ Manager ]";
    	mes "Okay, Brave man!~";
    	close;
    	}
    }
    }
    // Duplicados Warps v1.0
    ordeal_3-2.gat,130,193,0	warp	goldroomwrp#1	3,3,ordeal_3-2.gat,154,154
    ordeal_3-2.gat,106,154,0	warp	goldroomwrp#2	3,3,ordeal_3-2.gat,154,154
    ordeal_3-2.gat,201,129,0	warp	goldroomwrp#3	3,3,ordeal_3-2.gat,154,154
    ordeal_3-2.gat,177,193,0	warp	goldroomwrp#4	3,3,ordeal_3-2.gat,154,154
    ordeal_3-2.gat,66,25,0	warp	goldroomwrp#5	3,3,ordeal_3-2.gat,154,154
    
    // peco peco summon
    ordeal_3-2,0,0,0,0	monster	Golden Peco	3050,200,60000,0,"gold_room_main::OnKill"
    // GUARDIAN
    ordeal_3-2,0,0,0,0	monster	Gold Guardian	3051,45,60000,0,"gold_room_main::OnKill"
    
    -	script	gold_room_main	FAKE_NPC,{
    	
    	OnInit:
    		// gold room map
    		.map$ = "ordeal_3-2";
    		// entrance fee
    		.zeny_cost = 1000000;
    		// rate to get gold
    		.rate = 100;
    		// gold random amount
    		setarray .gold_amount,2;
    		
    //		setmapflag .map$,mf_noteleport;
    		setmapflag .map$,mf_pvp;
    		setmapflag .map$,mf_pvp_noguild;
    		setmapflag .map$,mf_pvp_noparty;
    		setmapflag .map$,mf_nobranch;
    		setmapflag .map$,mf_nosave;
    		setmapflag .map$,mf_nomemo;
    		setmapflag .map$,mf_noreturn;
    		setmapflag .map$,mf_nowarp;
    		setmapflag .map$,mf_nowarpto;
    		end;
    	
    	OnTalk:
    	mes "[ ^FF0000Gold Room Manager^000000 ]";
    	mes "How may I serve for you ?";
    	mes "I can warp you to a Gold Mine.";
    	mes "and it will only cost";
    	if ( .zeny_cost ) 
    	mes F_InsertComma( .zeny_cost ) + " Zeny";
    
    	next;
    	mes "[ ^FF0000Gold Room Manager^000000 ]";
    	mes "A friendly reminder to our fellow gold diggers~";
    	mes "Exchange Gold when you're ^FF0000OVERWEIGHT^000000";
    	mes "Bye bye golds! GMs are not responsible for your lost.";
    		switch ( select( 
    			"Enter Gold Room",
    			"Exchange Gold Point(s)",
    			"Cancel"
    		)) {
    			case 1:
    				if ( Zeny < .zeny_cost ) {
    					mes "Not enough Zeny.";
    				}
    				else {
    					next;
    					set .@a,rand(50);
    					set .@b,rand(50);
    					mes "[ ^FF0000Gold Room Manager^000000 ]";
    					mes "I need you to give me";
    					if ( .zeny_cost ) 
    					mes F_InsertComma( .zeny_cost ) + " Zeny to enter and";
    					mes "you need to answer the question for security check.";
    					mes "If A = "+.@a+"   B = "+.@b;
    				switch( rand(1) ){
    					set .@answer,.@a + .@b;
    					mes "How many is A + B ?";
    					next;
    					input .@input;	
    					next;
    					if( .@input!=.@answer ) {
    					atcommand "@kick " + strcharinfo(0);
    					close;
    					break;
    					}
    					else if (.@input==.@answer) {
    					Zeny -= .zeny_cost;
    					warp .map$,153,154;
    					close;
    					}
    				end;
    				}
    				}
    				break;
    			case 2:	
    				next;
    				mes "[ ^FF0000Gold Room Manager^000000 ]";
    				mes "Please check your inventory. If you're ^FF0000OVERWEIGHT^000000.";
    				mes "your gold will be ^FF0000DROPPED^000000. GMs are not responsible for any lost!";
    				mes "We already warned you..";
    				mes "^0000FFYou got ("+F_InsertComma( #GOLDPOINTS )+") Gold Points^000000.";
    				input .@value,0,#GOLDPOINTS;
    				if ( checkweight( 969, .@value ) ) {
    					#GOLDPOINTS -= .@value;
    					getitem 969,.@value;
    					mes "Gained "+.@value+" Gold.";
    				}
    				else {
    					mes "[ ^FF0000Gold Room Manager^000000 ]";
    					mes "Sorry your transaction failed.";
    					next;
    					mes "[ ^FF0000Gold Room Manager^000000 ]";
    					mes "You have to farm gold to exchange.";
    					mes "Please input Gold you wanted to exchange.";
    				}
    			default:
    				break;
    		}
    		close;
    		
    	OnKill:	
    		if ( .rate ) {
    			.@point = rand(1, .gold_amount[0]);
    			#GOLDPOINTS += .@point;
    			dispbottom "Gained "+.@point+" Gold Point. You got "+F_InsertComma( #GOLDPOINTS )+" Gold Points now.";
    		}
    		end;
    
    	OnPCDieEvent:
    			if (strcharinfo(3) != "ordeal_3-2") end;
    			#GOLDPOINTS = 0;
    			dispbottom "You died, you lost all the Gold point(s).";
    		end;
    }
    
    
    // Map Flags v1.0
    ordeal_3-2	mapflag	nowarp
    //ordeal_3-2	mapflag	noteleport
    ordeal_3-2	mapflag	nobranch
    ordeal_3-2	mapflag	nomemo
    ordeal_3-2	mapflag	nowarpto
    ordeal_3-2	mapflag	nopenalty
    ordeal_3-2	mapflag	pvp_noparty
    ordeal_3-2	mapflag	noskill
    ordeal_3-2	mapflag	nosave
    ordeal_3-2	mapflag	novending

     


  9. Heres what I found similar, it seems like its added inside the plugin https://rathena.org/board/topic/101064-security-login-message/

     

    and this is the plugin of @security of herc

    //===== Hercules Plugin ======================================
    //= Security
    //===== By: ==================================================
    //= by Dastgir/Hercules
    //===== Current Version: =====================================
    //= 1.0
    //===== Description: =========================================
    //= Prohibits actions depending upon security level.
    //===== Changelog: ===========================================
    //= v1.0 - Initial Conversion
    //===== Additional Comments: =================================
    //= Use NPC too along with this plugin
    //===== Repo Link: ===========================================
    //= https://github.com/dastgir/HPM-Plugins
    //============================================================
    
    #include "common/hercules.h"
    
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <math.h>
    
    #include "common/HPMi.h"
    #include "common/nullpo.h"
    #include "common/memmgr.h"
    #include "common/mmo.h"
    
    #include "map/atcommand.h"
    #include "map/battle.h"
    #include "map/clif.h"
    #include "map/guild.h"
    #include "map/map.h"
    #include "map/mob.h"
    #include "map/npc.h"
    #include "map/pc.h"
    #include "map/storage.h"
    #include "map/trade.h"
    #include "plugins/HPMHooking.h"
    #include "common/HPMDataCheck.h"
    
    
    HPExport struct hplugin_info pinfo = {
    	"Security",		// Plugin name
    	SERVER_TYPE_MAP,// Which server types this plugin works with?
    	"1.0",			// Plugin version
    	HPM_VERSION,	// HPM Version (don't change, macro is automatically updated)
    };
    const char* secure = "#security";
    const char* secure_opt = "#secure_opt";
    
    #define is_secure(x) pc_readaccountreg(x, script->add_str(secure))
    #define security_opt(x) pc_readaccountreg(x, script->add_str(secure_opt))
    
    enum S_Options {	//Security Options
    	S_CANT_DROP = 0x0001,				// Cannot Drop Items
    	S_CANT_TRADE_R = 0x0002,			// Cannot Receive Trade Request
    	S_CANT_TRADE_S = 0x0004,			// Cannot Send Trade Request
    	S_CANT_OPEN_GS = 0x0008,			// Cannot Open gStorage
    	S_CANT_TAKE_GS = 0x0010,			// Cannot take Item from gStorage
    	S_CANT_ADD_GS = 0x0020,				// Cannot add Item to gStorage
    	S_CANT_SELL = 0x0040,				// Cannot Sell item
    	S_CANT_VEND = 0x0080,				// Cannot Vend
    	S_CANT_DELETE = 0x0100,				// Cannot Delete Items(By Drop/delitem function)
    	S_CANT_BUY = 0x0200,				// Cannot Buy Items
    	S_CANT_SEND_GINVITE = 0x0400,		// Cannot Send Guild Invite
    	S_CANT_RECEIVE_GINVITE = 0x0800,	// Cannot Receive Guild Invite
    	S_CANT_LEAVE_GUILD = 0x1000,		// Cannot Leave Guild
    };
    
    int pc_cant_drop(struct map_session_data **sd, int *n, int *amount) {	// Can't Drop Items
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd)&S_CANT_DROP || security_opt(*sd)&S_CANT_DELETE){
    			clif->message((*sd)->fd, "Security is on. You cannot drop item.");
    			hookStop();
    			return 0;
    		}
    	}
    	return 1;	
    }
    
    void cant_trade(struct map_session_data **sd, struct map_session_data **target_sd){	// Can't receive/send Trade Requests
    	if (*sd == NULL || *target_sd == NULL)
    		return;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_TRADE_S) {	//Cannot Send
    			clif->message((*sd)->fd, "Security is on. You cannot initiate Trade.");
    			hookStop();
    			return;
    		}
    	}
    	if (is_secure(*target_sd) > 0) {	// Cannot Receive
    		if (security_opt(*target_sd) & S_CANT_TRADE_R) {
    			clif->message((*sd)->fd, "Target Player Security is on, Player cannot receive Trade Requests.");
    			hookStop();
    			return;
    		}
    	}
    	return;
    }
    
    int gstorage_cant_open(struct map_session_data **sd){
    	if (sd==NULL)
    		return 2;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_OPEN_GS) {
    			clif->message((*sd)->fd, "Security is on. You cannot open gStorage.");
    			hookStop();
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int gstorage_cant_add(struct map_session_data **sd, struct guild_storage **stor, struct item **item_data, int *amount) {
    	if (*sd == NULL)
    		return 1;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_ADD_GS) {
    			clif->message((*sd)->fd, "Security is on. You cannot add item to gStorage.");
    			hookStop();
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int gstorage_cant_take(struct map_session_data **sd, int *index, int *amount) {
    	if (*sd == NULL)
    		return 0;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_TAKE_GS) {
    			clif->message((*sd)->fd, "Security is on. You cannot take item from gStorage.");
    			hookStop();
    			return 0;
    		}
    	}
    	return 1;
    }
    
    int pc_restrict_items(struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type){
    	if (*sd == NULL)
    		return 1;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_DELETE) {
    			clif->message((*sd)->fd, "Security is on. You cannot delete item.");
    			hookStop();
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int npc_cant_sell(struct map_session_data **sd, struct itemlist **item_list)
    {
    	if (*sd == NULL)
    		return 1;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_SELL) {
    			clif->message((*sd)->fd, "Security is on. You cannot sell item.");
    			hookStop();
    			return 1;
    		}
    	}
    	return 0;
    }
    
    int npc_cant_buy(struct map_session_data **sd, struct itemlist **item_list) {
    	if (*sd == NULL)
    		return 1;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_BUY) {
    			clif->message((*sd)->fd, "Security is on. You cannot buy item.");
    			hookStop();
    			return 1;
    		}
    	}
    	return 0;
    }
    
    void open_vending(struct map_session_data **sd, int *num){
    	if (*sd == NULL)
    		return;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_VEND) {
    			clif->message((*sd)->fd, "Security is on. You cannot vend.");
    			(*sd)->state.prevend = (*sd)->state.workinprogress = 0;
    			hookStop();
    			return;
    		}
    	}
    	return;
    }
    
    int guild_invite_permission(struct map_session_data **sd, struct map_session_data **tsd) {
    	if (*sd == NULL || *tsd == NULL)
    		return 0;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_SEND_GINVITE) {
    			clif->message((*sd)->fd, "Security is on. You cannot send Guild Invite.");
    			hookStop();
    			return 0;
    		}
    	}
    	
    	if (is_secure(*tsd) > 0) {
    		if (security_opt(*tsd) & S_CANT_RECEIVE_GINVITE) {
    			clif->message((*sd)->fd, "Target Player Security is on, Player cannot receive Guild Invites.");
    			hookStop();
    			return 0;
    		}
    	}
    	return 0;
    }
    
    int guild_leave_permission(struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes) {
    	if (*sd == NULL)
    		return 0;
    	if (is_secure(*sd) > 0) {
    		if (security_opt(*sd) & S_CANT_LEAVE_GUILD) {
    			clif->message((*sd)->fd, "Security is on. You cannot leave Guild.");
    			hookStop();
    			return 0;
    		}
    	}
    	return 0;
    }
    
    /* Server Startup */
    HPExport void plugin_init(void)
    {
    	addHookPre(pc, dropitem, pc_cant_drop);
    	addHookPre(trade, request, cant_trade);
    	addHookPre(gstorage, open, gstorage_cant_open);
    	addHookPre(gstorage, additem, gstorage_cant_add);
    	addHookPre(gstorage, get, gstorage_cant_take);
    	addHookPre(gstorage, gettocart, gstorage_cant_take);
    	addHookPre(pc, delitem, pc_restrict_items);
    	addHookPre(npc, selllist, npc_cant_sell);
    	addHookPre(npc, buylist, npc_cant_buy);
    	addHookPre(clif, openvendingreq, open_vending);
    	addHookPre(guild, invite, guild_invite_permission);
    	addHookPre(guild, leave, guild_leave_permission);
    }
    
    HPExport void server_online(void)
    {
    	ShowInfo("'%s' Plugin by Dastgir/Hercules. Version '%s'\n", pinfo.name, pinfo.version);
    }

     


  10. If anyone gets interested with this, i got alternate solution i used callfunc heres the script

    //== Starter Scroll Buffs ======================================
    function	script	R_Scroll1	{
    		specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10;
    		specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10;
    		end;
    }
    
    function	script	R_Scroll100	{
    		specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10;
    		specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10;
    		specialeffect(EF_CONCENTRATION, AREA, playerattached()); sc_start SC_CONCENTRATION,240000,10;
    		end;
    }
    
    
    function	script	R_Scroll200	{
    		specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10;
    		specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10;
    		specialeffect(EF_CONCENTRATION, AREA, playerattached()); sc_start SC_CONCENTRATION,240000,10;
    		specialeffect(EF_ASSUMPTIO, AREA, playerattached()); sc_start SC_ASSUMPTIO,200000,10;
    		end;
    }
    

    item_db2

    {
    	Id: 30000
    	AegisName: "Level200BuffScroll"
    	Name: "Level 200 All-in-One Buff Scroll"
    	Type: "IT_USABLE"
    	Buy: 2
    	Weight: 10
    	EquipLv: 200
    	Trade: {
    		nodrop: true
    		notrade: true
    		noselltonpc: true
    		nocart: true
    		nogstorage: true
    		nomail: true
    		noauction: true
    	}
    	Nouse: {
    		sitting: true
    	}
    	Script: <" 
    		callfunc "R_Scroll200",1;
    		">
    },

     


  11. I have this working security script, but I want to make like it will dispbottom the player he has security ON or OFF instead of forcing player to setup security once he/she logged in to the game..

    On this script, you have choices as GM to force player to setup security to their account which it will always pop up a npc window for setting up security

     

    I just want that even i don't force the player to setup their @security. They will know by getting dispbottom that their Security is ON or OFF. also this makes the player knows that the server has security features.

    For me, npc pop up for force setup security is a very annoying.

    heres the script i used.

    /*
    	By Dastgir/Hercules
    	Use Plugin too along with this script(Found in https://github.com/dastgir/HPM-Plugins)
    */
    -	script	Security	FAKE_NPC,{
    OnInit:
    	bindatcmd("security",strnpcinfo(0)+"::OnSecurity",0,99);
    	/* Config */
    	.max_attempt = 5;	//3 Times Wrong Attempt = Ban.
    	.ban_hour = 2;		//Hours to ban
    	.allowed = 1|2|4|8|64|128|512|1024|2048|4096;		//Allowed Settings..
    	end;
    	
    OnPCLoginEvent:
    	if ($security){
    		if (!#security){
    			callsub OnPlayerMenu;
    		}
    	}
    	close;
    
    OnSecurity:
    	if (getgmlevel()){
    		mes "[^FFA500 Security System ^000000]";
    		mes "Hello GM, How may I help you?";
    		callsub OnGMMenu;
    		end;
    	}
    	
    OnPlayerMenu:
    	// Don't Change Order.
    	setarray .@restrictions$,"Can't Drop Item",			//	1
    				"Can't receive Trade Requests",			//	2
    				"Can't send Trade Request",				//	4
    				"Can't open Guild Storage",				//	8
    				"Can't take item from guild storage",	//	16
    				"Can't add item to guild storage",		//	32
    				"Can't sell items",						//	64
    				"Can't use Vending",					//	128
    				"Can't delete items by any means",		//	256
    				"Can't buy items",						//	512
    				"Can't Send Guild Invite",				//	1024
    				"Can't Receive Guild Invite",			//	2048
    				"Can't Leave the guild";				//	4096
    	while (1){
    		mes "[^FFA500 Security System ^000000]";
    		mes "Security Status: "+ ((#security>0)?"^00FF00On^000000":"^FF0000Off^000000");
    		mes "Status: ";
    		for (.@i = 0; .@i < getarraysize(.@restrictions$); .@i++){
    			.@bit = (1<<.@i);
    			if (.allowed&.@bit)
    				mes .@restrictions$[.@i] + " - "+ ((#secure_opt&.@bit)?"^00FF00On^000000":"^FF0000Off^000000");
    		}
    		switch(select("Info",((#security>0)?"Dea":"A")+"ctivate the Security","Settings","Close")){
    			case 4:
    				close;
    			case 3:
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				if (!#security){
    					mes "^FF0000You don't have security enabled^000000";
    					next;
    					break;
    				}
    				mes "Enter your ^FF0000OLD^000000 Security Code";
    				mes "^FF0000- Wrong Code more than "+ .max_attempt +" times can result into ban.^000000";
    				mes "Chances Left: "+ (.max_attempt-security_maxtry);
    				input .@security;
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				if (#secure_code != .@security){
    					mes "Wrong Code...";
    					security_maxtry++;
    					if (security_maxtry >= .max_attempt){
    						atcommand "@ban +"+.ban_hour+"h \""+strcharinfo(0)+"\"";	//Ban the Player for 1 hour.
    						security_maxtry = 0;		//Reset After tha Ban
    						end;
    					}
    					close;
    				}
    				next;
    				security_maxtry = 0;
    				mes "[^FFA500 Security System ^000000]";
    				mes "Choose Restrictions to Enable/Disable";
    				.@menu$ = "^00FF00Enable All^000000:^FF0000Disable All^000000:";
    				.@opt = 0;
    				for (.@i = 0; .@i < getarraysize(.@restrictions$); .@i++){
    					.@bit = (1<<.@i);
    					if (.allowed&.@bit){
    						.@index[.@opt] = .@i;
    						.@opt++;
    						.@content$ = .@restrictions$[.@i] + " - "+ ((#secure_opt&.@bit)?"^00FF00On^000000":"^FF0000Off^000000");
    						.@menu$ = .@menu$ + "" + .@content$ +":";
    						mes .@content$;
    					}
    				}
    				.@t_menu = select(.@menu$)-1;
    				next;
    				if (.@t_menu == 1){
    					mes "[^FFA500 Security System ^000000]";
    					if (!#secure_opt){
    						mes "You already have all Settings disabled.";
    						next;
    						break;
    					}
    					mes "Are you Sure you want to disable all?";
    					if (select("Yes:No..") == 2){
    						next;
    						mes "[^FFA500 Security System ^000000]";
    						mes "As you wish..";
    						next;
    						break;
    					}
    					next;
    					mes "[^FFA500 Security System ^000000]";
    					mes "All Settings Disabled";
    					#secure_opt = 0;
    					next;
    					break;
    				} else if (.@t_menu == 0){
    					mes "[^FFA500 Security System ^000000]";
    					if (#secure_opt >= .allowed){
    						mes "You already have all Settings enabled.";
    						next;
    						break;
    					}
    					mes "Are you Sure you want to enable all?";
    					if (select("Yes:No..") == 2){
    						next;
    						mes "[^FFA500 Security System ^000000]";
    						mes "As you wish..";
    						next;
    						break;
    					}
    					next;
    					mes "[^FFA500 Security System ^000000]";
    					mes "All Settings Enabled";
    					#secure_opt = .allowed;
    					next;
    					break;
    				}
    				.@t_menu -= 2;
    				.@menu = .@index[.@t_menu];
    				mes "[^FFA500 Security System ^000000]";
    				mes .@restrictions$[.@menu];
    				mes "Are you sure you want to "+ ((#secure_opt&(1<<.@menu))?"Disable":"Enable") +" this?";
    				if (select("Yes:No..") == 2){
    					next;
    					mes "[^FFA500 Security System ^000000]";
    					mes "As you wish..";
    					next;
    					break;
    				}
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				mes "Setting "+ ((#secure_opt&(1<<.@menu))?"Disabled":"Enabled");
    				if (#secure_opt&(1<<.@menu))
    					#secure_opt -= 1<<.@menu;
    				else
    					#secure_opt += 1<<.@menu;
    				next;
    				break;
    			case 2:
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				if (#security){
    					mes "Enter your ^FF0000OLD^000000 Security Code";
    					mes "^FF0000- Wrong Code more than "+ .max_attempt +" times can result into ban.^000000";
    					mes "Chances Left: "+ (.max_attempt-security_maxtry);
    					input .@security;
    					next;
    					mes "[^FFA500 Security System ^000000]";
    					if (#secure_code != .@security){
    						mes "Wrong Code...";
    						security_maxtry++;
    						if (security_maxtry >= .max_attempt){
    							atcommand "@ban +"+.ban_hour+"h \""+strcharinfo(0)+"\"";	//Ban the Player for 1 hour.
    							security_maxtry = 0;		//Reset After tha Ban
    							end;
    						}
    						close;
    					}
    					mes "Security Deactivated.";
    					#security = 0;
    					security_maxtry = 0;
    					close;
    				}
    				mes "Insert your ^00FF00NEW^000000 Security Code";
    				mes "^FF0000- Must be 4-8 Digits^000000";
    				mes "^FF0000- Only numerics are allowed(0-9)^000000";
    				mes "^FF0000- Don't use 0 in beginning of security code^000000";
    				input .@security;
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				if (.@security < 1000 || .@security > 99999999){
    					mes "Security code must be of 4-8 digits.";
    					next;
    					break;
    				}
    				mes "^00FF00 Re-insert the Security Code ^000000";
    				input .@secu2;
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				if (.@secu2 != .@security){
    					mes "Security Code Mismatch..";
    					next;
    					break;
    				}
    				mes "Security Code Set";
    				#secure_code = .@security;
    				#security = 1;
    				next;
    				break;
    			case 1:
    				next;
    				mes "[^FFA500 Security System ^000000]";
    				mes "Security Code can be of 4-8 Digits.";
    				mes "When Security Code is enabled, you can do following settings as a security step:";
    				for (.@i = 0; .@i < getarraysize(.@restrictions$); .@i++){
    					.@bit = (1<<.@i);
    					if (.allowed&.@bit)
    						mes "^FF0000- "+ .@restrictions$[.@i] +"^000000";
    				}
    				next;
    				break;
    		}
    	}
    	end;
    	
    OnGMMenu:
    	switch(select("Player Menu: Settings")){
    		case 1:
    			next;
    			callsub OnPlayerMenu;
    			end;
    		case 2:
    			next;
    			mes "[^FFA500 Security System ^000000]";
    			mes "Force Player to set @security?";
    			mes "Status: "+  (($security>0)?"^00FF00On^000000":"^FF0000Off^000000");
    			.@menu = select((($security>0)?"^00FF00Disable^000000":"^FF0000Enable^000000"),"Cancel");
    			if (.@menu == 2)
    				close;
    			next;
    			mes "[^FFA500 Security System ^000000]";
    			if ($security)
    				$security = 0;
    			else
    				$security = 1;
    			mes "Force Security Setting Set.";
    			close;
    	}
    	end;
    }

    Thank you!


  12. 6 hours ago, Zero Human said:

    Hmm.. Looks like it's a problem from hercules.
    All items with more as one itemskill not working, like Angelus Scroll what contains

    itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF); itemskill(AL_ANGELUS, 5);

    
    itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
    itemskill(AL_ANGELUS, 5);

     

    Yes. the first itemskill will not work too, scroll will be consumed without getting any buffs


  13. 6 minutes ago, Zero Human said:

    Change it to
    itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); 

        Script: <"
            itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF);

            itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);
             ">

     ^ here whats on my script now. also tried your sample. still not working 😕


  14. {
    	Id: 30000
    	AegisName: "Level1BuffScroll"
    	Name: "Level 1 All-in-One Buff Scroll"
    	Type: "IT_USABLE"
    	Buy: 2
    	Weight: 10
    	EquipLv: 1
    	Trade: {
    		nodrop: true
    		notrade: true
    		noselltonpc: true
    		nocart: true
    		nogstorage: true
    		nomail: true
    		noauction: true
    	}
    	Script: <" 
    		itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF),
    		itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF);
    		">
    },

    Why it doesn't buff Agi and Blessing? if i removed 1 itemskill, Scroll works perfectly but if 2 item skill i doesn't work..


  15. On 4/1/2020 at 5:38 PM, Kenpachi said:

    Hi.

     

    The error is caused by this line:

    setd getd("$@PVPKill"+$@PVPcounter),getcharid(3);

    
    setd getd("$@PVPKill"+$@PVPcounter),getcharid(3);

    The value of $@PVPcounter is 1. Thus getd("$@PVPKill"+$@PVPcounter) returns the value of a variable with name $@PVPKill1.

    Since $@PVPKill1 is not a string variable, a number is returned and causes an error in setd().

     

    I assume your intention was to set $@PVPKill1 to the return value of getcharid(3).

    setd("$@PVPKill" + $@PVPcounter, getcharid(3));

    
    setd("$@PVPKill" + $@PVPcounter, getcharid(3));

     

     

    ~Kenpachi

    Yes. thank you 😅


  16. 1 hour ago, meko said:

    This error is quite explicit: the ID of your character in your SQL database (table `char`) is less than 150000 (the initial ID for auto-increment). This could happen if you manually added a character and explicitly specified an ID lower than 150000. Since the column is on auto-increment you should not specify a char id when adding rows to the table. You can find the offending rows with a simple query:

    SELECT * FROM `char` WHERE `char_id` < 150000;

    
    SELECT * FROM `char` WHERE `char_id` < 150000;

    Keep in mind that if you end up changing the ID of a char it needs to be changed in every table that has a char_id column and should only be done when the server is offline.

     

    You can reset the auto increment with this query:

    ALTER TABLE `char` AUTO_INCREMENT = 1;

    
    ALTER TABLE `char` AUTO_INCREMENT = 1;

    Setting auto increment to a value less than or equal the highest value will reset it to highest + 1 

    Thank you! I used _M and _F to create account and character before.

    It's fixed now 🙏


  17. Hello, im getting this error line from my ssh anyone can help?

     

    Quote

    [Warning]: Unexpected type for argument 1. Expected string.
    [Debug]: Data: variable name='$@PVPKill1' index=0
    [Debug]: Function: setd
    [Debug]: Source (NPC): PvP Points (invisible/not on a map)

     

    //===== Hercules Script =======================================
    //= PvP Point System
    //===== By: ==================================================
    //= Kit the Baby Fox (A.K.A. IeYasuru) - Conversion by: Aeromesi
    //===== Current Version: =====================================
    //= 1.5 (Converted into Hercules - Aeromesi
    //= 1.5 Update (fixed counter)
    //===== Compatible With: =====================================
    //= Hercules SVN
    //===== Description: =========================================
    //= Awards or takes PvP Points
    //===== Additional Comments: =================================
    //= Gives 1 PvP Point on killing other player
    //= Takes 1 PvP Points for dying
    //= Takes 5 PvP Points for killing same player 3 times
    //=	within 90 seconds of each kill
    //===== Change Log: ==========================================
    //= 1.0: First release
    //= 1.1: Numerous changes to system layout
    //=  (borrowed from Terces PvP Ladder)
    //= 1.2: Added GM check so getting killed by GMs doesn't 
    //=  subtract points.
    //============================================================
    
    -	script	PvP Points	FAKE_NPC,{
    OnPCKillEvent:
    	if(PvPFlag && (killedrid == PrevKilled)) {
    		PvPWarning += 1;
    		if(PvPWarning >= 5) {
    			PvPPoints -= 3;
    			callsub L_PointCheck,PvPPoints;
    			dispbottom "You've lost 5 PvP Points.";
    			dispbottom "You now have "+PvPPoints+" Points.";
    			PvPWarning = 0;
    			callsub Timer;
    		}
    		PvPPoints += 1;
    		dispbottom "You've been awarded 1 PvP Point.";
    		dispbottom "You now have "+PvPPoints+" Points.";
    	Timer:
    		awake "PvPPointTimer";
    		PvPFlag = 1;
    		doevent "PvPPointTimer::OnTimerStart";
    		end;
    	}
    	if ( killedrid == getcharid(3) ) {
    		PvPPoints -= 1;
    		callsub L_PointCheck,PvPPoints;
    		dispbottom "You've lost 1 PvP Point.";
    		dispbottom "You now have "+PvPPoints+" Points.";
    		end;
    	}
    	
    	$@PVPcounter += 1;
    	setd getd("$@PVPKill"+$@PVPcounter),getcharid(3);
    	if(getgmlevel() >= 60) callsub AddPoint;
    	attachrid(killedrid);
    	PvPPoints -= 1;
    	callsub L_PointCheck,PvPPoints;
    	dispbottom "You've lost 1 PvP Point.";
    	dispbottom "You now have "+PvPPoints+" Points.";
    	detachrid;
    	AddPoint:
    	attachrid(getd("$@PVPKill"+$@PVPcounter));
    	PvPPoints += 1;
    	dispbottom "You've been awarded 1 PvP Point.";
    	dispbottom "You now have "+PvPPoints+" PvP Point(s).";
    	PrevKilled = killedrid;
    	PvPFlag = 1;
    	doevent "PvPPointTimer::OnTimerStart";
    	end;
    
    L_PointCheck:
    	if(getarg(0) < 0) PvPPoints = 0;
    	return;
    
    OnPCLoginEvent:
    	if(!PvPPoints) { PvPPoints = 0; PvPWarning = 0; }
    	end;
    
    OnWhisperGlobal:
    	if(@whispervar0$ == "show") {
    		mes "Your PvP Points: ^00CC00"+PvPPoints;
    		close;
    	}
    	end;
    }
    
    -	script	PvPPointTimer	FAKE_NPC,{
    OnTimerStart:
    	sleep2 90000;
    	PvPFlag = 0;
    	end;
    }

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.