Jump to content

mR L

Members
  • Posts

    177
  • Joined

  • Last visited

Posts posted by mR L

  1. On 7/15/2022 at 2:01 PM, gaurav787 said:
    mes "<ITEM>"+getitemname(602)+"<INFO>602</INFO></ITEM>";

     

    try with this

    mes "<ITEML>"+getitemname(602)+"<INFO>602</INFO></ITEML>";

    OR

    mes "<ITEMLINK>"+getitemname(602)+"<INFO>602</INFO></ITEMLINK>";

     

  2. // -----------------------------------------------------------
    //  Quest items -- do NOT use a reward item more than once!
    //  Add(<shop ID>,<reward ID>,<reward amount>,<Zeny cost>,<point cost>,<required item ID>,<required item amount>{,...});
    // -----------------------------------------------------------

     

    • Love 1
  3. you can setting at this

    On 5/21/2022 at 3:57 PM, Almond Snicker said:
    	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(1116, 40903, 3);
    		//func_AddItem(1158, 984, 3, 757, 2);
    		//func_AddItem(1553, 984, 2, 757, 3);
    		
    		// ARMORS
    		//func_AddItem(2313, 985, 2, 757, 2);
    		//func_AddItem(2326, 985, 3, 757, 3);
    		end;

     

    if you want add misc  or consumable item
    just add this

    		// ETC
    		func_AddItem(7444, 969, 3);

     

  4. 2 hours ago, Slammer said:

    GetCashFree = 1;

     

    -	script	Sample	-1,{
    
    OnPCLoginEvent:
    	if (##GetCashFree) end;
    	dispbottom "You gained 100,000 cashpoint!!! Enjoy!";
    	set #CASHPOINTS,CASHPOINTS+100000;
    	set ##GetCashFree,1;
    	end;
    }

     

  5. 14 hours ago, Fabre01 said:

    Ty sure, i need it ? But can i make it permanent?

     

    Spoiler
    -	script	hateffectonLogin	FAKE_NPC,{
    
    OnPCLoginEvent:
    	@name$ = strcharinfo(0);
    	if (@name$ == "mR L")
    		hateffect 1,true;
    	end;
    }

     

    ** Note **
    if the hat effect didn't appear, just @refresh or @go 0

    • Like 1
  6. Spoiler
    payon,163,96,4	script	Warp Man	617,{
    	mes "[ Warp Man ]";
    	mes "Greetings. I can teleport you to the main cities of Midgard";
    	mes "Where would you like to go?";
    	switch(select("- Payon:- Prontera:- Morocc:- Geffen:- Al De Baran:- Exit")) {
    		case 1:
    			warp "payon",163,88;
    			end;
    		case 2:
    			warp "prontera",116,72;
    			end;
    		case 3:
    			warp "morocc",158,94;
    			end;
    		case 4:
    			warp "geffen",120,39;
    			end;
    		case 5:
    			warp "aldebaran,140,115;
    			end;
    		case 6:
    			close;
    	}
    	end;
    }

     

    Follow this Step

  7. //===== Hercules Script ======================================
    //= Lotti Girl
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: ===================================== 
    //= Hercules 2019-02-22
    //===== Description: ========================================= 
    //= Roll a lottery ticket and get some cool items
    //= even if you get all the trash items, you still collecting points to buy in lotti shop
    //===== Topic ================================================
    //= http://herc.ws/board/topic/16579-lotti-girl/
    //===== Additional Comments: =================================
    //= 
    //============================================================
    
    function	script	F_MesItemInfo	{
    	.@item = getarg(0);
    	.@itemname$ = getitemname(.@item);
    	if (.@itemname$ != "null") {
    		.@itemslot = getitemslots(.@item);
    		if (.@itemslot)
    			.@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot);
    	}
    	else
    		.@itemname$ = "Unknown Item";
    	if (PACKETVER >= 20150729)
    		return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item);
    	else if (PACKETVER >= 20130130)
    		return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item);
    	else
    		return .@itemname$;
    }
    
    /*
    create table lotti_rank (
    char_id int(11),
    name varchar(24),
    lotti_point int(11),
    primary key (char_id),
    key (lotti_point)
    ) engine = innodb;
    */
    
    prontera,160,179,5	script	Lotti Girl	1_F_MARIA,{
    	goto L_talk;
    OnInit:
    //	Announce to the server when player roll on a rare item
    	.rare_announcement = 1; 	// Default 1 : means any item with 0.00%~0.99%
    
    //	Amount of points gain for each roll
    	.lotti_points = 1;
    
    //	If the player choose to Roll Repeatedly, what is the maximum amount of Roll in the input
    	.max_roll = 100;
    
    	setarray .item,
    		7400,			// Item ID requirement
    		1,			// amount of the Item needed
    		100,			// chance of not getting any items
    
    	//	chance of getting the items
    	//	<Item ID>, <amount>, <chance>
    		501,	10,	500,
    		502,	5,	100,
    		503,	5,	100,
    		504,	5,	100,
    		505,	5,	100;
    
    	setarray .itemshop,
    	//	Item sold in the shop
    	//	<Item ID>, <Lotti Points needed>
    		601,	2,
    		602,	2,
    		603,	2,
    		604,	2,
    		605,	2;
    
    //	=========================================================================================================
    
    	.size = getarraysize(.item);
    	for ( .@i = 2; .@i < .size; .@i += 3 )
    		.totalchance += .item[.@i];
    	for ( .@i = 2; .@i < .size; .@i += 3 ) {
    		.@chance = .item[.@i] *10000 / .totalchance;
    		.@division = .@chance / 100;
    		.@remainder$ = .@chance % 100;
    		while ( getstrlen(.@remainder$) < 2 )
    			.@remainder$ = insertchar(.@remainder$, "0", 0);
    		.chance_display$[.@i] = .@division +"."+ .@remainder$ +"%";
    		if ( .@division < .rare_announcement )
    			.announce[.@i] = true;
    	}
    	.shop_size = getarraysize(.itemshop);
    	npcshopdelitem "Lotti#hidden", 512;
    	for ( .@i = 0; .@i < .shop_size; .@i += 2 )
    		npcshopadditem "Lotti#hidden", .itemshop[.@i], .itemshop[.@i +1];
    	npcshopattach "Lotti#hidden";
    	.npcname$ = "[ "+strnpcinfo(3)+" ]";
    	end;
    L_talk:
    	mes .npcname$;
    	mes "Hello, do you want to play lottery ?";
    	next;
    	switch( select( "Deal me in!", "More Information", "Lotti Shop", "Lotti Ranking" ) ) {
    	mes .npcname$;
    	case 1:
    		mes "It costs "+.item[1]+"x "+F_MesItemInfo( .item[0] )+" to play.";
    		if ( countitem( .item[0] ) < .item[1] )
    			close;
    		next;
    		if ( select( "Play", "Roll Repeatedly" ) == 1 ) {
    			mes .npcname$;
    			while ( true ) {
    				mes "Here we go...";
    				mes " ";
    				.@r = rand(.totalchance);
    				for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 );
    				if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) {
    					mes "It appears you have overweight";
    					break;
    				}
    				delitem .item[0], .item[1];
    				if ( .@i == 2 )
    					mes "You get nothing...";
    				else {
    					mes "You get "+.item[.@i -1]+"x "+F_MesItemInfo(.item[.@i -2]);					getitem .item[.@i -2], .item[.@i -1];
    					if ( .announce[.@i] )
    						announce sprintf (( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK;
    				}
    				lotti_points += .lotti_points;
    				query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+ .lotti_points;
    				mes " ";
    				mes "wanna try again ?";
    				next;
    				if ( select( "Yes", "No" ) == 2 ) break;
    				mes .npcname$;
    				if ( countitem( .item[0] ) < .item[1] ) {
    					mes " ";
    					mes "It appears you have ran out of "+F_MesItemInfo( .item[0] );
    					break;
    				}
    			}
    		}
    		else {
    			mes .npcname$;
    			mes "Input how many rounds to roll";
    			mes "Currently you have "+countitem( .item[0] )+" "+F_MesItemInfo( .item[0] );
    			next;
    			input .@roll_input, 1, min( countitem( .item[0] ) / .item[1], .max_roll );
    			mes .npcname$;
    			mes "Are you sure you want to roll "+.@roll_input+" times ?";
    			next;
    			if ( select( "Yes", "No" ) == 2 ) close;
    			mes .npcname$;
    			mes "Here we go...";
    			mes " ";
    //			freeloop true;
    			for ( .@j = 0; .@j < .@roll_input; ++.@j ) {
    				.@r = rand(.totalchance);
    				for ( .@i = 2; ( .@r -= .item[.@i] ) >= 0; .@i += 3 );
    				if ( checkweight( .item[.@i -2], .item[.@i -1] ) == false ) {
    					mes "It appears you have overweight";
    					break;
    				}
    				delitem .item[0], .item[1];
    				if ( .@i == 2 )
    					mes "You get nothing...";
    				else {
    					mes "You get "+.item[.@i -1]+"x "+F_MesItemInfo(.item[.@i -2]);
    					getitem .item[.@i -2], .item[.@i -1];
    					if ( .announce[.@i] )
    						announce sprintf(( "Lotti Girl: Player [%s] has roll on [%s](%s)" ), strcharinfo(0), getitemname(.item[.@i -2]), .chance_display$[.@i] ), bc_all, C_PINK;
    				}
    				++.@roll;
    				sleep2 1; // prevent lag the server
    			}
    			lotti_points += .lotti_points * .@roll;
    			query_sql "insert into lotti_rank values ( "+ getcharid(CHAR_ID_CHAR) +", '"+ escape_sql( strcharinfo(PC_NAME) ) +"', "+ .lotti_points +" ) on duplicate key update lotti_point = lotti_point + "+( .lotti_points * .@roll );
    			mes "Total roll : "+.@roll+" times.";
    		}
    		mes " ";
    		mes "Thank you for using Lotti service~";
    		close;
    	case 2:
    		freeloop true;
    		mes "Item required: "+.item[1]+"x "+F_MesItemInfo(.item[0]);
    		if ( .item[2] )
    			mes "Chance to gain ^FF0000nothing^000000 : " + .chance_display$[2];
    		mes "Possible gains:";
    		for ( .@i = 3; .@i < .size; .@i += 3 )
    			mes " > "+F_MesItemInfo(.item[.@i])+" : "+ .chance_display$[.@i +2];
    		next;
    		mes .npcname$;
    		mes "Each time you roll, will gain "+.lotti_points+" Lotti Point(s).";
    		mes "Which can be use to buy rare items in Lotti Shop.";
    		close;
    	case 3:
    		mes "You currently have ^0000FF"+lotti_points+"^000000 Lotti Point(s).";
    		dispbottom "You currently have "+lotti_points+" Lotti Point(s).";
    		close2;
    		callshop "Lotti#hidden", 1;
    		end;
    	case 4:
    		.@query$  = "SELECT `name`, IF(@d=t.`lotti_point`, @r, @r:=@i), @d:=t.`lotti_point`, @i:=@i+1 ";
    		.@query$ += "FROM `lotti_rank` t, (SELECT @d:=0, @r:=0, @i:=1)q ";
    		.@query$ += "ORDER BY `lotti_point` DESC LIMIT 5";
    		.@nb = query_sql(.@query$, .@name$, .@rank, .@points, .@dummy);
    		if ( !.@nb ) {
    			mes "There's no ranking yet ~";
    			close;
    		}
    		for ( .@i = 0; .@i < .@nb; ++.@i )
    			mes ""+.@rank[.@i]+". "+.@name$[.@i]+" : "+.@points[.@i]+" Point(s)";
    		mes " ";
    		if ( !query_sql( "SELECT `lotti_point`, 1+(SELECT COUNT(1) FROM `lotti_rank` t1 WHERE t1.lotti_point > t2.lotti_point) FROM `lotti_rank` t2 WHERE `char_id` = "+ getcharid(CHAR_ID_CHAR), .@points, .@rank ) ) {
    			mes "You are not in the rank.";
    			close;
    		}
    		mes "Your current :";
    		mes " > Rank : "+.@rank;
    		mes " > Point : "+.@points+" Point(s).";
    		close;
    	}
    	end; // shouldn't reach
    OnBuyItem:
    	mes .npcname$;
    	if ( !@bought_quantity ) end;
    	if ( checkweight2( @bought_nameid, @bought_quantity ) == false ) {
    		mes "It appears you can't carry them all";
    		close;
    	}
    	.@size = getarraysize( @bought_nameid );
    	for ( .@i = 0; .@i < .@size; .@i++ ) {
    		for ( .@j = 0; .@j < .shop_size; .@j += 2 )
    			if ( @bought_nameid[.@i] == .itemshop[.@j] )
    				break;
    		.@itemcost += .itemshop[.@j +1] * @bought_quantity[.@i];
    	}
    	if ( .@itemcost > lotti_points ) {
    		mes "You don't have enough Lotti Points";
    		close;
    	}
    	lotti_points -= .@itemcost;
    	for ( .@i = 0; .@i < .@size; ++.@i )
    		getitem @bought_nameid[.@i], @bought_quantity[.@i];
    	deletearray @bought_nameid;
    	deletearray @bought_quantity;
    	mes "Thanks for buying ~";
    	close;
    }
    -	shop	Lotti#hidden	-1,512:1000

     

    • Love 1
  8. exchange:
    	if (gold == 0) goto nogold;
    	mes "[ Gold Room Warperer ]";
    	mes "Hmm...let me see";
    	mes "You have " +gold+ ".";
    	mes " ";
    	mes "How many you want exchange ?";
    	next;
    	switch(select("Make as many as I can.:I want to choose an amount.:Cancel")) {
    		case 1:
    			if (checkweight(969,gold) == 0) goto L_OverWeight;
    			getitem 969, gold;
    			set gold, 0;
    			emotion e_gg;
    			break;
    		case 2:
    			mes "[ Gold Room Warperer ]";
    			mes "You have " +gold+ ".";
    			mes "If you don't want any, just enter '0'.";
    			mes "With Points you have, you can make at least "+gold+" golds.";
    			next;
    			input .@amount;
    			if (.@amount <= 0) {
    				mes "[ Gold Room Warperer ]";
    				mes "Make up your mind, will you?!";
    				close;
    			}
    			if (.@amount > gold) {
    				mes "[ Gold Room Warperer ]";
    				mes "Are you deaf? I said less than "+gold+"!";
    				close;
    			}
    			next;
    			if (checkweight(969,gold) == 0) goto L_OverWeight;
    			set gold,gold - (.@amount);
    			getitem 969,.@amount;
              	 	emotion e_gg;
    			break;
    		case 3:
    			mes "[ Gold Room Warperer ]";
    			mes "Byee !!";
    			close;
    	}
    	end;

    # Not tested

  9. menu	"^3CB371[»]^000000 Campos de Amatsu.",F1, "^3CB371[»]^000000 Campos de Ayothaya",F2, "^3CB371[»]^000000 Campos de Bifrost", F3,
        	"^3CB371[»]^000000 Campos de Brasilis",F4, "^3CB371[»]^000000 Campos de Comodo",F5, "^3CB371[»]^000000 Campos de Dewata",F6,
        	"^3CB371[»]^000000 Campos de Eclage",F7, "^3CB371[»]^000000 Campos de Einbroch",F8, "^3CB371[»]^000000 Campos de El Dicastes",F9,
        	"^3CB371[»]^000000 Campos de Geffen",F10, "^3CB371[»]^000000 Campos de Kunlun",F11, "^3CB371[»]^000000 Campos de Hugel",F12,
    	"^3CB371[»]^000000 Campos de Lasagna",F13, "^3CB371[»]^000000 Campos de Lighthalzen",F14, "^3CB371[»]^000000 Campos de Luoyang",F15, 
    	"^3CB371[»]^000000 Campos de Lutie",F16, "^3CB371[»]^000000 Campos de Malaya",F17, "^3CB371[»]^000000 Campos de Manuk",F18, 
    	"^3CB371[»]^000000 Campos de Mjolnir",F19, "^3CB371[»]^000000 Campos de Moscovia",F20, "^3CB371[»]^000000 Campos de Niflheim",F21, 
    	"^3CB371[»]^000000 Floresta de Payon",F22, "^3CB371[»]^000000 Campos de Prontera",F23, "^3CB371[»]^000000 Campos de Rachel",F24, 
    	"^3CB371[»]^000000 Deserto de Sograt",F25, "^3CB371[»]^000000 Campos de Splendide",F26, "^3CB371[»]^000000 Campos de Umbala",F27, 
    	"^3CB371[»]^000000 Campos de Veins",F28, "^3CB371[»]^000000 Campos de Juno",F29,"   Return",L_Menu;

     

    and add this

    // --------------------------------------------------
    //    Main Menu:
    // --------------------------------------------------
    
    L_Menu:
    menu    "Last Warp [ ^777777"+lastwarp$+"^000000 ]",-,
            " ~ Towns",Towns,
            " ~ Fields",Fields,
            " ~ Dungeons",Dungeons,
            " ~ Guild Castles",Castles,
            " ~ Guild Dungeons",Guild_Dungeons,
            " ~ Instances",Instances;

     

  10. prontera,165,195,5    script    Gold Room    848,{
    
    	mes "[ Gold Room ]";
    	mes "Welcome, ^ff0000" +strcharinfo(0)+ "!^000000";
    	next;
    	menu
    		"Enter ^ff0000Gold Room^000000 ^3333cc(" + getmapusers("ordeal_1-2") + ")^000000",L_Enter,
    		"Cancel",L_Cancel;
    	end;
    
    L_Enter:
    	specialeffect 253;
    	showscript "'" + strcharinfo(0) + "' entered!",getnpcid(0),AREA;
    	warp "ordeal_1-2",0,0;
    	end;
    
    L_Cancel:
    	mes "[ Gold Room ]";
    	mes "Bye !!
    	close;
    
    OnNPCKillEvent:
    	if (killedrid == 1369) {
    		if(!$gold_hour) {
    			.@i = 1;
    		}
    		else if($gold_hour) {
    			.@i = rand(1,3);
    		}
    		getitem 969,.@i;
    		end;
    	}
    	end;
    }
    
    ordeal_1-2    mapflag    pvp
    ordeal_1-2    mapflag    nowarpto
    ordeal_1-2    mapflag    nodrop
    ordeal_1-2    mapflag    nobranch
    ordeal_1-2    mapflag    nosave
    ordeal_1-2    mapflag    nomemo
    ordeal_1-2    mapflag    noloot
    
    
    ordeal_1-2    monster    Golden Peco    1369,500
    ordeal_1-2    monster    Golden Peco    1369,500
    ordeal_1-2    monster    Golden Peco    1369,300

     

×
×
  • Create New...