Jump to content

Quesooo

Members
  • Posts

    883
  • Joined

  • Last visited

Posts posted by Quesooo

  1. 13 hours ago, Emistry said:
    
    -	script	HHE	-1,{
    
    OnInit:
    	set .DefaultBaseRates,getbattleflag("base_exp_rate");
    	set .DefaultJobRates,getbattleflag("job_exp_rate");
    	set .Access,80; // GM access lvl
    OnTimer3600000: // After 1 hour
    OnStop:
    	stopnpctimer;
    	set .Event,0;
    	callsub(L_Start, .DefaultBaseRates, .DefaultJobRates);
    	end;
    
    OnClock1000:
    OnClock1600:
    	callsub(L_Start, (.DefaultBaseRates * 2), (.DefaultJobRates * 2)); // 2x
    	end;
    
    OnWhisperGlobal:
    	if (getgmlevel() < .Access) end;
    	if (@whispervar0$ == "Start") {
    		if (.Event == 1) {
    			dispbottom "Event already started";
    		} 
    		else {
    			dispbottom "Input New Base Rate";
    			input .@BaseExp;
    			dispbottom "Input New Job Rate";
    			input .@JobExp;
    			callsub(L_Start, .@BaseExp, .@JobExp);
    		}
    		end;
    	}
    	else if (@whispervar0$ == "Stop") {
    		if (.Event == 1) {
    			donpcevent strnpcinfo(3)+"::OnStop";
    		}
    		else dispbottom "Event not started.";
    		end;
    	}
    	end;
    
    L_Start:
    	.@BaseExp = getarg(0, 1);
    	.@JobExp = getarg(0, 1);
    	
    	if (.@BaseExp < 1) .@BaseExp = 1;
    	if (.@JobExp < 1) .@JobExp = 1;
    	
    	setbattleflag "base_exp_rate",.@BaseExp*100;
    	setbattleflag "job_exp_rate",.@JobExp*100;
    	dispbottom "Event has been started.";
    	initnpctimer;
    	set .Event,1;
    	announce "Happy Hour EXP: Floating rates event started. New rates: Base - "+(.@BaseExp / 100)+"x, Job - "+(.@JobExp / 100)+"x",0;
    	return;
    }

     

    Still not working do i need to change some line or just use this script?

  2. 10 minutes ago, Emistry said:
    
    -	script	HHE	-1,{
    
    OnInit:
    	set .DefaultBaseRates,getbattleflag("base_exp_rate");
    	set .DefaultJobRates,getbattleflag("job_exp_rate");
    	set .Access,80; // GM access lvl
    OnTimer3600000: // After 1 hour
    OnStop:
    	stopnpctimer;
    	set .Event,0;
    	callsub(L_Start, .DefaultBaseRates, .DefaultJobRates);
    	end;
    
    OnClock1000:
    OnClock1600:
    	callsub(L_Start, 2, 2); // 2x
    	end;
    
    OnWhisperGlobal:
    	if (getgmlevel() < .Access) end;
    	if (@whispervar0$ == "Start") {
    		if (.Event == 1) {
    			dispbottom "Event already started";
    		} 
    		else {
    			dispbottom "Input New Base Rate";
    			input .@BaseExp;
    			dispbottom "Input New Job Rate";
    			input .@JobExp;
    			callsub(L_Start, .@BaseExp, .@JobExp);
    		}
    		end;
    	}
    	else if (@whispervar0$ == "Stop") {
    		if (.Event == 1) {
    			donpcevent strnpcinfo(3)+"::OnStop";
    		}
    		else dispbottom "Event not started.";
    		end;
    	}
    	end;
    
    L_Start:
    	.@BaseExp = getarg(0, 1);
    	.@JobExp = getarg(0, 1);
    	
    	if (.@BaseExp < 1) .@BaseExp = 1;
    	if (.@JobExp < 1) .@JobExp = 1;
    	
    	setbattleflag "base_exp_rate",.@BaseExp*100;
    	setbattleflag "job_exp_rate",.@JobExp*100;
    	dispbottom "Event has been started.";
    	initnpctimer;
    	set .Event,1;
    	announce "Happy Hour EXP: Floating rates event started. New rates: Base - "+.@BaseExp+"x, Job - "+.@JobExp+"x",0;
    	return;
    }

    try

    Thank you @Emistry already tried the script but it seems like the rates going to increase more for example my default rates is x8x8 and when i load the npc it becomes x3000x3000

    do i need to edit some line or i edit some line incorrectly?

    Base on my understanding this line should be change to what exp or job rates should be when the event starts
     

    	setbattleflag "base_exp_rate",.@BaseExp*100;
    	setbattleflag "job_exp_rate",.@JobExp*100;

     

  3. How to make this script to automated event?

    - Event will run everyday 2x at 10:00 and 16:00

    no need to whisper the NPC. here's the script

    thank you for those who help ?

    -	script	HHE	-1,{
    end;
    
    OnWhisperGlobal:
    if(getgmlevel()<.Access) end;
    if(@whispervar0$ == "Start"){
    if(.Event == 1){
    dispbottom "Event already started";
    end;
    } else {
    dispbottom "Input New Base Rate";
    input .@BaseExp;
    dispbottom "Input New Job Rate";
    input .@JobExp;
    setbattleflag "base_exp_rate",.@BaseExp*100;
    setbattleflag "job_exp_rate",.@JobExp*100;
    dispbottom "Event has been started.";
    initnpctimer;
    set .Event,1;
    announce "Happy Hour EXP: Floating rates event started. New rates: Base - "+.@BaseExp+"x, Job - "+.@JobExp+"x",0;
    }
    end;
    }
    if(@whispervar0$ == "Stop"){
    if(.Event == 1) goto L_STOP;
    else dispbottom "Event not started.";
    end;
    }
    
    end;
    
    OnInit:
    set .DefaultBaseRates,getbattleflag("base_exp_rate");
    set .DefaultJobRates,getbattleflag("job_exp_rate");
    set .Access,80; // GM access lvl
    end;
    
    OnTimer3600000: // After 1 hour
    L_STOP:
    set .Event,0;
    stopnpctimer;
    setbattleflag "base_exp_rate",.DefaultBaseRates;
    setbattleflag "job_exp_rate",.DefaultJobRates;
    announce "Happy Hour EXP: The floating rates event have been ended. Rates back to the normal.",0;
    end;
    }

     

  4. Hello there! i tried to search around here on the forum but i can't see any solution on my problem.

     

    The problem is everytime i run my ragnarok client the error shows " d3d or grf file has problem Error". My graphic card is updated but something weird that when i open "Open-setup" i cant see any option to choose "DirectX" or something that will fix my problem. i also tried to replace my open set-up to updated one but i got the same problem. any help will be appreciated thank you in advance.

  5. 13 hours ago, Takuyakii said:

    i recommend Pony vps

    Don't use any RO Hosting, especially this one who doesn't support their clients, just for everyone idea 5 of my friends been here for long and the host only needs money but the support is not good.

    • Upvote 1
  6. You can view your clientinfo.xml by opening it using notepad but i recommend to use notepad++. all you need to do is find your clientinfo at data folder ( if you are using read data first ) or its located inside your client grf.

  7. Hi @Emistry im using your script and i modify it above to exchange for other items.

    can you help me how to solve this?

    i got an error saying
    image.png.d043695ca080a0add39a9e6572e98e18.png
     

    when selling 10 or more different items.

     

    // https://irowiki.org/wiki/Ben_Recycle
    
    -	shop	ben_recycle_shop	-1,909:-1
    
    prt_mall,164,53,0	script	Ben Recycle	4_M_CRU_KNT,{
    	function func_GetItemName;
    	function func_AddItem;
    	
    	mes "Hi, I can convert certain equipment into ores.";
    	mes "Would you give it a try?";
    	next;
    	if (select("Convert", "Information") == 2) {
    		for (.@i = 0; .@i < .size; .@i++) {
    			mes func_GetItemName(.nameid[.@i]);
    			if (.amount1[.@i] > 0 && .nameid1[.@i] > 0)
    				mes " ~ "+F_InsertComma(.amount1[.@i])+"x "+func_GetItemName(.nameid1[.@i]);
    			if (.amount2[.@i] > 0 && .nameid2[.@i] > 0)
    				mes " ~ "+F_InsertComma(.amount2[.@i])+"x "+func_GetItemName(.nameid2[.@i]);
    			mes " ";
    		}
    		next;
    	}
    	if (.shop_npc$ != "") {
    		mes "Place all the equipments you wish to convert into ores.";
    		close2;
    		npcshopattach .shop_npc$, 1;
    		callshop .shop_npc$, 2;
    		end;
    	}
    	else {
    		for (.@i = 0; .@i < .size; .@i++)
    			.@menu$ = .@menu$ + func_GetItemName(.nameid[.@i]) + ":";
    		.@i = select(.@menu$) - 1;
    		if (countitem(.nameid[.@i])) {
    			delitem .nameid[.@i], 1;
    			mes "Exchanged "+func_GetItemName(.nameid[.@i])+":";
    			if (.nameid1[.@i] > 0 && .amount1[.@i] > 0) {
    				mes " ~ "+F_InsertComma(.amount1[.@i])+"x "+func_GetItemName(.nameid1[.@i]);
    				getitem .nameid1[.@i], .amount1[.@i];
    			}
    			if (.nameid2[.@i] > 0 && .amount2[.@i] > 0) {
    				mes " ~ "+F_InsertComma(.amount2[.@i])+"x "+func_GetItemName(.nameid2[.@i]);
    				getitem .nameid2[.@i], .amount2[.@i];
    			}
    		}
    		else {
    			mes "you dont have "+func_GetItemName(.nameid[.@i]);
    		}
    	}
    	close;
    	
    	OnSellItem:
    		.@sold_nameid_size = getarraysize(@sold_nameid);
    		for (.@i = 0; .@i < .@sold_nameid_size && !.@fail; .@i++) {
    			for (.@x = 0; .@x < .size && !.@fail; .@x++) {
    				if (.nameid[.@x] == @sold_nameid[.@i]) {
    					if (!checkweight(.nameid1[.@x], .amount1[.@x])) {
    						mes "Exchange stopped, you're overweight.";
    						.@fail++;
    					}
    					else {
    						.@total++;
    						delitem2(@sold_nameid[.@i], @sold_quantity[.@i], @sold_identify[.@i], @sold_refine[.@i], @sold_attribute[.@i], @sold_card1[.@i], @sold_card2[.@i], @sold_card3[.@i], @sold_card4[.@i]);
    						mes "Exchanged "+func_GetItemName(.nameid[.@x])+":";
    						if (.nameid1[.@x] > 0 && .amount1[.@x] > 0) {
    							mes " ~ "+F_InsertComma(.amount1[.@x])+"x "+func_GetItemName(.nameid1[.@x]);
    							getitem .nameid1[.@x], .amount1[.@x];
    						}
    						if (.nameid2[.@x] > 0 && .amount2[.@x] > 0) {
    							mes " ~ "+F_InsertComma(.amount2[.@x])+"x "+func_GetItemName(.nameid2[.@x]);
    							getitem .nameid2[.@x], .amount2[.@x];
    						}
    						mes " ";
    					}
    				}
    			}
    		}
    		mes "Exchanged "+.@total+" item(s).";
    		close2;
    		npcshopattach .shop_npc$, 0;
    		end;
    	
    	function	func_GetItemName	{
    		.@itemid = getarg(0, 0);
    		.@itemslot = getitemslots(.@itemid);
    		.@item_name$ = getitemname(.@itemid);
    		.@itemtype = getiteminfo(.@itemid, 2);
    		if (.@itemslot || .@itemtype == IT_WEAPON || .@itemtype == IT_ARMOR)
    			.@item_name$ = .@item_name$ + " ["+.@itemslot+"]";
    		return .@item_name$;
    	}
    	
    	function	func_AddItem	{
    		.@nameid = getarg(0, 0);
    		.@nameid1 = getarg(1, 0);
    		.@amount1 = getarg(2, 0);
    		.@nameid2 = getarg(3, 0);
    		.@amount2 = getarg(4, 0);
    		
    		if (.@nameid > 0 
    			&& .@nameid1 > 0 && .@amount1 > 0
    			&& .@nameid2 > 0 && .@amount2 > 0 
    		) {
    			.nameid[.size] = .@nameid;
    			.nameid1[.size] = .@nameid1;
    			.amount1[.size] = .@amount1;
    			.nameid2[.size] = .@nameid2;
    			.amount2[.size] = .@amount2;
    			.size++;
    		}
    	}
    	
    	OnInit:
    		// if enable shop UI (only work if items can sell to npc shop)
    		.shop_npc$ = "ben_recycle_shop";
    		
    		// func_AddItem(<equipment_id>, <item1>, <amount1>, <item2>, <amount2>);
    		
    		// WEAPONS
    		func_AddItem(1421, 757, 4, 756, 4);
    		func_AddItem(1822, 757, 2, 756, 2);
    		func_AddItem(1625, 757, 5, 756, 5);
    		func_AddItem(1819, 757, 3, 756, 3);
    		func_AddItem(1269, 757, 4, 756, 4);
    		func_AddItem(1142, 757, 3, 756, 3);
    		func_AddItem(1624, 757, 5, 756, 5);
    		func_AddItem(1626, 757, 5, 756, 5);
    		func_AddItem(13404, 757, 5, 756, 5);
    		func_AddItem(13027, 757, 6, 756, 6);
    		func_AddItem(1821, 757, 1, 756, 1);
    		func_AddItem(1268, 757, 5, 756, 5);
    		
    		// ARMORS
    		func_AddItem(2422, 757, 3, 756, 3);
    		func_AddItem(2104, 757, 1, 756, 1);
    		func_AddItem(5124, 757, 2, 756, 1);
    		func_AddItem(2406, 757, 3, 756, 3);
    		func_AddItem(5122, 757, 2, 756, 1);
    		func_AddItem(5126, 757, 2, 756, 1);
    		func_AddItem(2504, 757, 2, 756, 1);
    		func_AddItem(2353, 757, 15, 756, 15);
    		func_AddItem(2514, 757, 6, 756, 6);
    		func_AddItem(2404, 757, 2, 756, 1);
    		func_AddItem(2315, 757, 2, 756, 1);
    		func_AddItem(2102, 757, 2, 756, 1);
    		func_AddItem(2114, 757, 2, 756, 2);
    		
    		// COSTUMES
    		func_AddItem(19835, 7915, 1, 7539, 1);
    		func_AddItem(31123, 7915, 1, 7539, 1);
    		func_AddItem(20247, 7915, 1, 7539, 1);
    		func_AddItem(31062, 7915, 1, 7539, 1);
    		func_AddItem(19934, 7915, 1, 7539, 1);
    		waitingroom "Item Recycle",0;
    		end;
    }

     

×
×
  • Create New...