Jump to content

Litro

Members
  • Content Count

    365
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Litro


  1. for 'if you try to equip armor with above refine in the map, it will not equip' i think it need source edit like mapflag custom, but idk about src and if you want to try this script.. the different is this script will check every configured second (i set default 1 sec) on the selected map you set and if it refine count is higher than script .max_refine set it will unequip..

    -	script	chk_refine	-1,{	end;OnPCLoadMapEvent:OnCheck:	for(.@j = 0; .@j < getarraysize(.map_list$); .@j++) {		if (strcharinfo(3) == .map_list$[.@j]) {			for(.@i = 1; .@i <= 10; ++.@i) {				if(getequipisequiped(.@i)) {					if (getequiprefinerycnt(.@i) > .max_refine) 						unequip .@i;				}			}			addtimer .chk_delay, strnpcinfo(3)+"::OnCheck";		}	}	end;OnInit:	.chk_delay = 1 *1000; // check delay default 1 second	.max_refine = 7;	setarray .map_list$, "prontera"; // add your map here	for (.@m = 0; .@m < getarraysize(.map_list$); .@m++)		setmapflag .map_list$[.@m], mf_loadevent;	end;}

     

    Litro.


  2. isn't that annoying for player and bot (bot checker will fail it mean) can do relog before timer is out to check is kind funny? however try this..

     

    add this to end of script before last closing bracket

    OnPCLoadMapEvent:	for (.@i = 0; .@i < getarraysize(.map_list$); .@i++) {		if (strcharinfo(3) == .map_list$[.@i]) {			addtimer .time_tocheck, strnpcinfo(3)+"::On15secs";			break;		}	}	end;On15secs:	for (.@i = 0; .@i < getarraysize(.map_list$); .@i++)		if (strcharinfo(3) == .map_list$[.@i]) goto check;	end;OnInit:	.time_tocheck =  15 *1000;	setarray .map_list$, "prontera", "payon"; // add the map you want to it triggered	for (.@i = 0; .@i < getarraysize(.map_list$); .@i++) setmapflag .map_list$[.@i],mf_loadevent;	end;

    and in the original script you copas above, add this line

    addtimer .time_tocheck, strnpcinfo(3)+"::On15secs";

    after this line

    percentheal 100,100;

     

    nb: please use code box for the script so it easy to do copy paste


  3. OnPCLoadMapEvent:    if (strcharinfo(3) == "pvp_n_6-5") {        addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";    }    end;OnCheckItem:    for (.@i = 0; .@i < getarraysize(.item_list); .@i++) {        if (countitem(.item_list[.@i]) && strcharinfo(3) == "pvp_n_6-5") {            mes "[^FF0000 Guard ^000000]";            mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,";            close2;            warp "prontera",150,150;            end;        }    }    if (strcharinfo(3) == "pvp_n_6-5") {        addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";    }    end;

  4. // Min Members 3,  request item gold coin , must be party leader to accept this quest .. map warp flame_dun  , waiting room ( Fire Dungeon ) prontera,150,150,1	script	Fire Dungeon	100,{	if (getcharid(0) != getpartyleader(getcharid(1),2)) {		mes "Only party leader can talk to me";		close;	}	if (!countitem(.request_item)) {		mes "Need "+getitemname(.request_item)+" to go inside";		close;	}	.@origin = getcharid(3);	getpartymember getcharid(1), 1;	getpartymember getcharid(1), 2;	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {		if ( isloggedin( $@partymemberaid[.@i] , $@partymembercid[.@i] ) ) {			attachrid $@partymemberaid[.@i];			.@online++;		}	}	attachrid .@origin;	if ( .@online < .min_member ) {		mes "your party needs "+.min_member+" party members online to continue.";		close;	}	delitem .request_item, 1;	warpparty flame_dun, 150, 150, getcharid(1);	end;OnInit:	.request_item = Gold_Coin;	.min_member = 3;	waitingroom strnpcinfo(0),0;	end;}

  5. try this if you want to..

    -	script	checkitem	-1,{	end;OnPCLoadMapEvent:	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";	end;OnCheckItem:	for (.@i = 0; .@i < getarraysize(.item_list); .@i++) {		if (countitem(.item_list[.@i])) {			mes "[^FF0000 Guard ^000000]"; 			mes "Sorry "+getitemname(.item_list[.@i])+" is not allowed in here!,"; 			close2; 			warp "prontera",150,150;			end;		}	}	addtimer .timetocheck*1000,strnpcinfo(3)+"::OnCheckItem";	end;OnInit:	setarray .item_list, 607, 608;	// add item you want to check here	.timetocheck = 1;	//Seconds after which idle is checked.	end;}// Mapflagpvp_n_6-5	mapflag	loadevent

  6. I tried to add a npc to block the item but it's still possible to bring the item in the cart (with merchant and alchemist)

    Is there anyway to block the item inside the cart?

     

    @edit

    Maybe I can add a script that checks each second if a player has this item, this way, when they pick the item from the cart the script will detect.

    Who can do the edition to me?

     

    Like the AFK script, but this one to check an item in the inventory...

     

    even the whatever class bring the ygg in the cart they won't be able to use it, that mean your purpose served and don't forget set the items.conf as @@Emistry said above

     

     

    // Will disabled consumables (disabled by map_zone_db.conf) be consumed when trying to use them?// 1 (official): yes// 0: noitem_restricted_consumption_type: 1// Unequip the equipments that has disabled by map_zone_db.conf ?// 0 : disabled equipments and cards are nullify (official)// 1 : disabled equipments are unequip, disabled cards are nullify// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)unequip_restricted_equipment: 0

    https://github.com/HerculesWS/Hercules/blob/master/conf/battle/items.conf

     

    item_restricted_consumption_type: 0 // so your player won't feel scamed using item without feeling the effect


  7. // http://rathena.org/board/topic/58835-done-request-ip-check/page__view__findpost__p__80798/*To add more maps:1. add it to this string :	set .maps$, "bat_room,anothermap,etc";2. and add the 'loadevent' mapflag on that map :	<map name>	mapflag	loadevent*/// Checking I P when entering a Map and kick if dual .. example map bat_room-	script	Only1perIP	-1,{OnPCLoadMapEvent:	set .maps$, "bat_room,anothermap,etc";	set .@my_map$, strcharinfo(3);	// check if they are on a "1-per-IP" map	if (compare(","+.maps$+"," , ","+.@my_map$+",")) {		// look for other online players from the same IP		query_sql("SELECT login.account_id FROM login LEFT JOIN `char` ON login.account_id=`char`.account_id " + 		          "WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") " + 		          "AND `char`.online=1 AND login.account_id!="+getcharid(3), .@account_id;		for (set .@i,0; .@i<getarraysize(.@account_id); set .@i,.@i+1) {			// check if other online players are on the same map			getmapxy .@map$,.@x,.@y, 0, rid2name(.@account_id[.@i]);			if (.@map$ == .@my_map$) {				// kick the new player arriving to map				set .@name$, strcharinfo(0);				announce "Sorry, only 1 char per IP can be on this map at a time.", bc_self;				sleep 1000;				atcommand "@kick " + .@name$;			}		}	}	end;}bat_room	mapflag	loadevent

    here what i have in my script collection, link can be found on top of script and i think it can be more optimized for your own need


  8. got an error on --> .arraysize

     

    and also this

     

    bme10.jpg

     

    1. .arraysize var is not used so i remove it

    2. as @@Garr said, so i make it set when npc got started

    Both .@item and .@amount are not set within the script before being called here, so they are 0. That's why you're getting errors.

     

    3. Added rounds setting as requested

    //====================ANNOUNCER======================-    script    Announcer2    -1,{OnGMStart:    announce "(BringMeEvent) : A Gamemaster started a Bring Me Event now.",0;    sleep 3000;    announce "(BringMeEvent) : If you want to join, come at the middle of Prontera",0;        .@i = rand( getarraysize(.BringMeItems) );    set getvariableofnpc(.item,"BringMeEvent"), .BringMeItems[.@i];    set getvariableofnpc(.amount,"BringMeEvent"), rand(1,100);    set getvariableofnpc(.Round,"BringMeEvent"), 1;        enablenpc "BringMeEvent";    announce "(BringMeEvent) : Bring me "+getvariableofnpc(.amount,"BringMeEvent")+"x "+getvariableofnpc(.item,"BringMeEvent"),0;    sleep 2000;    announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0;    sleep 2000;    announce "(BringMeEvent) : Hurry Now!.",0;      sleep 2000;    announce "(BringMeEvent) : GAME STARTED.",0;    end;OnGMStop:    announce "A Gamemaster has stopped the Bring Me Event",0;    disablenpc "BringMeEvent";    end;OnNextRound:    .@i = rand( getarraysize(.BringMeItems) );    set getvariableofnpc(.item,"BringMeEvent"), .BringMeItems[.@i];    set getvariableofnpc(.amount,"BringMeEvent"), rand(1,100);    announce "(BringMeEvent) : Bring me "+getvariableofnpc(.amount,"BringMeEvent")+"x "+getvariableofnpc(.item,"BringMeEvent"),0;    sleep 2000;    announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0;    sleep 2000;    announce "(BringMeEvent) : Hurry Now!.",0;    end;OnInit:    setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;    bindatcmd "startbme",strnpcinfo(3)+"::OnGMStart",90,99;    bindatcmd "stopbme",strnpcinfo(3)+"::OnGMStop",90,99;    end;}prontera,150,150,0    script    BringMeEvent    100,{    if (countitem(.item) < .amount) {        mes "You don't have my requirements";        close;    }    delitem .item, .amount;    getitem .p, .a;    announce "Yayks! "+strcharinfo(0)+" won the "+.Round+" round event",0;    .Round++;    if (.Round > .Rounds) disablenpc "BringMeEvent";    else        donpcevent "Announcer2::OnNextRound";    end;OnInit:    .Rounds = 10; // Set how many round you want here    .p = 7227;    .a = 5;    disablenpc "BringMeEvent";    end;}

  9. try this

    1

    bonus bAllStats,20;bonus bMaxHP,2*getrefine();bonus bMaxSP,2*getrefine();

    2

    bonus bAllStats,15;bonus2 bAddRace,7,getrefine();

    3

    bonus bAllStats,30;bonus bSpeedAddRate,10;bonus2 bSubRace,7,getrefine();

    nb: you should  take look into item_bonus.txt on doc folder


  10. Try this, to start type '@startbme', to stop type '@stopbme'

    //====================ANNOUNCER======================-	script	Announcer2	-1,{OnGMStart:	announce "(BringMeEvent) : A Gamemaster started a Bring Me Event now.",0;	sleep 3000;	announce "(BringMeEvent) : If you want to join, come at the middle of Prontera",0;	enablenpc "BringMeEvent";	sleep 2000;	announce "(BringMeEvent) : Prize: will be TCG and 1x Elite Siege Supply Box",0;	sleep 2000;	announce "(BringMeEvent) : Hurry Now!.",0;  	sleep 2000;	announce "(BringMeEvent) : GAME STARTED.",0;	end;	OnGMStop:	announce "A Gamemaster has stopped the Bring Me Event",0;	disablenpc "BringMeEvent";	end;OnInit:	bindatcmd "startbme",strnpcinfo(3)+"::OnGMStart",90,99;	bindatcmd "stopbme",strnpcinfo(3)+"::OnGMStop",90,99;	end;}prontera,150,150,0	script	BringMeEvent	100,{	if (countitem(.item) < .amount) {		mes "You don't have my requirements";		close;	}	delitem .item, .amount;	getitem .p, .a;	announce "Yayks! " + strcharinfo(0) + " won the event",0;	disablenpc "BringMeEvent";	end;	.@i = rand( getarraysize(.BringMeItems) );	.item = .BringMeItems[.@i];	.amount = rand(1,100);	announce "Bring me " +.amount+ "x " +getitemname(.item ),0;	enablenpc "BringMeEvent";	end;OnInit:	setarray .BringMeItems[0],501,7227,4001,7005,909,512,714;	.arraysize, getarraysize(.BringMeItems);	.p = 7227;	.a = 5; 	disablenpc "BringMeEvent";	end;}

  11. try change code in this part

    // Shop NPCs -- supplying no argument displays entire menu.//	callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}};//============================================================prontera,164,203,6	script	Quest Shop#1	4_M_MOCASS2,{ callfunc "qshop"; }

    callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; make it like this

    prontera,164,203,6	script	Quest Shop#1	4_M_MOCASS2,{ callfunc "qshop",1; }

    it will automaticaly open first category shop without generating category menu, AFAIK CMIIW


  12. prontera,164,174,4	script	Freebies	123,{	mes "[Hello]";	if (#Freebie) {		mes "You have claimed  your freebies already";		close;	}	mes "[I can give you a free gift based on your future job.]";	mes "[Please choose the correct item for the future job]";		mes "Select one:";		next;		switch(select("Str:Agi:Vit:Int:Dex")) {			case 1:				getitem 25000,1;				break;			case 2:				getitem 22003,1;				getitem 35006,1; //Item for Agi				break;			case 3:				getitem 22004,1;				getitem 35007,1; //Item for Vit				break;							case 4:				getitem 22001,1;				getitem 35002,20; //Item for int				break;						case 5:				getitem 22002,1;				getitem 35004,1; //Item for Dex				break;										}			#Freebie = 1;			close;	}OnInit:	waitingroom "Get your freebies here ! ",0;	end;}

  13. is this part of script ?, used variable is attached temporary to character, post entire script

    as for part 'Team leader register but it say you are not team leader .', change this part code

    if ( getcharid(0) != CID[@MnF] ) {mes "You are not the Teamleader!";close;}

    to this

    if ( getcharid(0) != getpartyleader(getcharid(1),2) ) {mes "You are not the Teamleader!";close;}
×
×
  • Create New...

Important Information

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