Jump to content

Yoga

Members
  • Posts

    66
  • Joined

  • Last visited

Posts posted by Yoga

  1. Op some fixed, 

    -	script	bot2	-1,{
    OnInit:
    OnPCLoadMapEvent:
    if( !Checking ) end;
    OnNPCKillEvent:
    if ( strcharinfo(3) == "bat_c01" ) {
    set Kill,Kill+1;
    if( Kill >= rand( 15,35 ) ){
    	set Checking,1;
    	announce "RO Guard : Bot Check time! Thank you for your patience!",bc_yellow|bc_self;
    	atcommand "@option 2";
    	mes "[^ff557fRO Guard^000000]";
    	mes "Please enter the ^FF0000RED COLOUR NUMBER^000000";
    	next;
    	set .@Number,rand( 999999 );
    	mes "[^ff557fRO Guard^000000]";
    	mes "Number : ";
    	mes rand( 999999 )+"^ff0000"+.@Number+"^000000"+rand( 999999 );
    	input @Number;
    	if( @Number != .@Number ){
    		mes "Sorry, WRONG.";
    		atcommand "@kick "+strcharinfo(0);
    	}else{
    		mes "Thank you. You now can move!.";
    	dispbottom "100% of effectiveness.";
    	announce "RO Guard : To rewared your kindness, please take a bonus of some Buffs.",bc_blue|bc_self;
    		sc_start SC_INCREASEAGI,500000,10;
    		sc_start SC_BLESSING,500000,10;
    		percentheal 100,100;
    			atcommand "@option 0 0 0";
    	if(@cart == 1) {
    		setcart;
    		set @cart,0;
    	}
    	if(@falcon == 1) {
    		setfalcon;
    		set @falcon,0;
    	}
    	if(@riding == 1) {
    		setriding;
    		set @riding,0;
    	}
    		set Checking,0;
    		set Kill,0;
    	}
    close;
    }
    		
    }
    }
    bat_c01	mapflag	loadevent
    

     

    but can i ask how does this script work?

    Try it .

  2. Try this

    // to set monster just change  if( Kill >= rand( 35,50 ) ){  // 30 - 50 Monster
    -	script	bot2	-1,{
    OnInit:
    if ( strcharinfo(3) == "bat_c01" ) {
    end;
    
    OnPCLoadMapEvent:
    if( !Checking ) end;
    
    OnNPCKillEvent:
    set Kill,Kill+1;
    if( Kill >= rand( 35,50 ) ){
    	set Checking,1;
    	announce "RO Guard : Bot Check time! Thank you for your patience!",bc_yellow|bc_self;
    	atcommand "@option 2";
    	mes "[^ff557fRO Guard^000000]";
    	mes "Please enter the ^FF0000RED COLOUR NUMBER^000000";
    	next;
    	set .@Number,rand( 999999 );
    	mes "[^ff557fRO Guard^000000]";
    	mes "Number : ";
    	mes rand( 999999 )+"^ff0000"+.@Number+"^000000"+rand( 999999 );
    	input @Number;
    	if( @Number != .@Number ){
    		mes "Sorry, WRONG.";
    		atcommand "@kick "+strcharinfo(0);
    	}else{
    		mes "Thank you. You now can move!.";
    	dispbottom "100% of effectiveness.";
    	announce "RO Guard : To rewared your kindness, please take a bonus of some Buffs.",bc_blue|bc_self;
    		sc_start SC_INCREASEAGI,500000,10;
    		sc_start SC_BLESSING,500000,10;
    		percentheal 100,100;
    			atcommand "@option 0 0 0";
    	if(@cart == 1) {
    		setcart;
    		set @cart,0;
    	}
    	if(@falcon == 1) {
    		setfalcon;
    		set @falcon,0;
    	}
    	if(@riding == 1) {
    		setriding;
    		set @riding,0;
    	}
    		set Checking,0;
    		set Kill,0;
    	}
    close;
    }
    		
    }
    }
    bat_c01	mapflag	loadevent
    
  3. try this.

    -	script	ban_gm_name	-1,{
    OnPCLoginEvent:
    if(getgmlevel() >=99) end;
    .@name$ = strcharinfo(0);
    if( compare( .@name$,"GM " ) || compare( .@name$,"Admin " ) ){
    	mes "You will be jailed for using 'GM'/'Admin' within your name";
    	sleep2 3500;
    	atcommand "@jail "+.@name$;
    	globalmes .@name$+" has been jailed for having 'GM'/'Admin' in their name.";
    }
    end;
    }
    
  4. 
    

    prontera,120,130,4 script POD 100,{

    mes "[Trader]";

    mes "You currently have ^ff0000"+countitem(9524)+"^000000 "+getitemname(9524)+"";

    menu "Exchange "+getitemname(9524)+" to "+getitemname(7179)+"", L_PODS, "Nevermind", L_Cancel;

    L_PODS:

    next;

    mes "[Trader]";

    mes "How many you want to exchange?";

    mes "^ff0000Note^000000: 1000 "+getitemname(9524)+" currently 1 "+getitemname(7179)+"";

    input .@count;

    if (.@count == 0) close;

    if (countitem(9524) < .@count*1000) goto L_Noitem;

    delitem 9524,.@count*1000;

    getitem 7179,.@count*1;

    close;

    L_Noitem:

    next;

    mes "[Trader]";

    mes "[ ^ff0000X^000000 ] Insulfficient "+getitemname(9524)+"";

    close;

    L_Cancel:

    mes "[Trader]";

    mes "Come back anytime!";

    close;

    end;

    }

  5. 
    

    prontera,120,130,4 script POD 100,{

    mes "[Trader]";

    mes "You currently have ^ff0000"+countitem(9524)+"^000000 "+getitemname(9524)+"";

    menu "Exchange "+getitemname(7179)+" to "+getitemname(9524)+"", L_PODS, "Nevermind", L_Cancel;

    L_PODS:

    next;

    mes "[Trader]";

    mes "How many you want to exchange?";

    mes "^ff0000Note^000000: 1 "+getitemname(7179)+" currently 1000 "+getitemname(9524)+"";

    input .@count;

    if (.@count == 0) close;

    if (countitem(7179) < .@count*1) goto L_Noitem;

    delitem 7179,.@count*1;

    getitem 9524,.@count*1000;

    close;

    L_Noitem:

    next;

    mes "[Trader]";

    mes "You dont have enough "+getitemname(7179)+"";

    close;

    L_Cancel:

    mes "[Trader]";

    mes "Come back anytime!";

    close;

    end;

    }

  6. 
    

    prontera,120,130,4 script POD 100,{

    mes "[Trader]";

    mes "You currently have ^ff0000"+countitem(9524)+"^000000 "+getitemname(9524)+"";

    menu "Exchange "+getitemname(7179)+" to "+getitemname(9524)+"", L_PODS, "Nevermind", L_Cancel;

    L_PODS:

    next;

    mes "[Trader]";

    mes "How many you want to exchange?";

    mes "^ff0000Note^000000: 1 "+getitemname(7179)+" currently 1000 "+getitemname(9524)+"";

    input .@count;

    if (.@count == 0) close;

    if (countitem(7179) < .@count*1) goto L_Noitem;

    delitem 7179,.@count*1;

    getitem 9524,.@count*1000;

    close;

    L_Noitem:

    next;

    mes "[Trader]";

    mes "You dont have enough "+getitemname(7179)+"";

    close;

    L_Cancel:

    mes "[Trader]";

    mes "Come back anytime!";

    close;

    end;

    }

  7. 
    

    // Just change map whatever you want

    geffen,67,63,4 script Farm Zone 900,{

    mes "This is a Farm Zone.";

    mes "You are able to Hunt Budots Coin inside this Room.";

    mes "But please be careful, this room is PK Enabled.";

    next;

    menu "Are you sure to go? [" + getmapusers("guild_vs5.gat") +"/5]", L_Go, "Nevermind", L_nvm;

    L_Go:

    next;

    if (getmapusers("guild_vs5") >= 5) {

    mes "This map is currently full.";

    }

    warp "guild_vs5",23,50;

    end;

    L_nvm:

    mes "No problem come back again";

    close;

    end;

    }

    // --------------------------------------------------------------

    - script Monsters -1,{

    OnInit:

    OnNPCKillEvent:

    if ( strcharinfo(3) == "guild_vs5" ) {

    if( killedrid == 1369){

    getitem 607,1;

    }

    end;

    }

    }

    guild_vs5,0,0,52,52 monster Grand Peco 1369,20,10,10;

    • Upvote 1
  8. 
    

    - script EmpireRO -1,{

    //--Start of the Script

    OnMinute30: // SET THE 30 TO THE MINUTE YOU WANT THE EVENT TO START EACH HOUR.

    announce "Server Attendant : Hi Players!, Every 30 minutes you will receive a gift from us.",0;

    sleep2 10000;

    announce "Server Attendant : Please make your way to the centre of Prontera.",0;

    sleep2 10000;

    announce "Server Attendant : After all this message you will receive a attendance card.",0;

    sleep2 10000;

    announce "Server Attendant : Special thanks to [GM Yoe].",0;

    dispbottom "Thank you for playing EmpireRO";

    getitem 6101,1;

    end;

    }

  9. 
    

    // Just change map whatever you want

    geffen,67,63,4 script Farm Zone 900,{

    mes "[ Farm Zone ]";

    mes "blalalaal";

    next;

    menu "Are you sure to go?", L_Go, "Nevermind", L_nvm;

    L_Go:

    warp "prontera",100,100;

    close;

    L_nvm:

    mes "No problem come back again";

    close;

    end;

    }

    // --------------------------------------------------------------

    - script Monsters -1,{

    OnInit:

    monster "prontera",0,0,"Farm",1002,10,"Monsters::OnPoringKilled";

    OnPoringKilled:

    getitem 9524,1;

    end;

    }

  10. 
    

    // 1 Pod = 2k Cash Point

    // 2k Cash Point = 1 Pod

    prontera,120,120,4 script POD 100,{

    mes "[Trader]";

    mes "You currently have ^ff0000"+#CASHPOINTS+"^000000 Cash Points";

    menu "Exchange Proof of Donation to Cash Point", L_PODS, "Exchange Cash Point to Proof of Donation", L_Point, "Cancel", L_Cancel;

    L_PODS:

    next;

    mes "[Trader]";

    mes "How many you want to exchange?";

    mes "^ff0000Note^000000: 1 Proof of Donation currently 2000 Cash Point";

    input .@count;

    if (.@count == 0) close;

    if (countitem(7179) < .@count*1) goto L_Noitem;

    delitem 7179,.@count*1;

    set #CASHPOINTS, #CASHPOINTS + ( .@count*2000 );

    close;

    L_Point:

    next;

    mes "[Trader]";

    mes "How many you want to exchange?";

    mes "^ff0000Note^000000: 2000 Cash Point currently 1 Proof of Donation";

    input .@count;

    if (.@count == 0) close;

    if (#CASHPOINTS < .@count*1) goto L_Nopoint;

    set #CASHPOINTS, #CASHPOINTS - ( .@count*2000 );

    getitem 7179,.@count*1;

    close;

    L_Nopoint:

    next;

    mes "[Trader]";

    mes "Sorry you dont have enough of Cash Point";

    close;

    L_Noitem:

    next;

    mes "[Trader]";

    mes "Sorry you dont have enough of Proof of Donation";

    close;

    L_Cancel:

    mes "[Trader]";

    mes "No problem, Come back again";

    close;

    end;

    }

  11. try this.

    // Credit to emistry Multi-shop
    // use @pc for check point
    // -------- Dummy data (duplicate as needed) --------
    -	shop	Emistry_Shop	-1,512:100
    // --------------------------------------------------
    prontera,100,100,4	script	Redeem Points	852,{
    function ShopSettings;
    function ValidateCost;
    function CurrencyInfo;
    function ClearData;
    function ValueConvert;
    function ErrorNotice;
    
    mes "Each Shop from the Menu may purchase using ^FF0000Different Currency^000000.";
    mes "^00FF00____________________________^000000";
    mes "So,Which shop you would like to look at it";
    next;
    // Menu Selection
    select("Headgear","Foods","Cossumber");
    
    ClearData();
    ShopSettings( @menu );
    npcshopitem "Emistry_Shop",512,100;
    npcshopdelitem "Emistry_Shop",512;
    for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1)
    	npcshopadditem "Emistry_Shop",@ItemLists[.@i],@ItemCost[.@i];
    mes "Okay...wait awhile";
    mes "^00FF00____________________________^000000";
    CurrencyInfo( @Currency$ );
    mes "^00FF00____________________________^000000";
    callshop "Emistry_Shop",1;
    npcshopattach "Emistry_Shop";
    end;
    
    
    function	ShopSettings	{
    	switch( getarg(0) ){
    		Case 1:
    			// Currency [ Item ID / Variable Name ]
    			set @Currency$,"pvppoint";
    			// Item ID Lists
    			setarray @ItemLists[0],5377,5288,5146,5269,5376,5235,5236,5237,5289,5306,5322,5366; // ITEM ID
    			// Item Price
    			setarray @ItemCost[0],200,220,150,400,450,250,250,250,200,250,230,300; // ITEM COST/AMOUNT
    			break;
    		Case 2:
    			// Currency [ Item ID / Variable Name ]
    			set @Currency$,"pvppoint";
    			// Item ID Lists
    			setarray @ItemLists[0],1815;
    			// Item Price
    			setarray @ItemCost[0],100;
    			break;
    		Case 3:
    			// Currency [ Item ID / Variable Name ]
    			set @Currency$,"pvppoint";
    			// Item ID Lists
    			setarray @ItemLists[0],2776,12260,14037;
    			// Item Price
    			setarray @ItemCost[0],500,50,30;
    			break;
    		// Case 4,5,6.....etc...
    		default:
    			ErrorNotice( "Invalid Menu Selection for Menu "+@menu+"." );
    			close;
    	}
    	
    	
    if( @Currency$ == "" )
    	ErrorNotice( "Invalid Currency Setting in Menu "+@menu+" ." );
    if( getarraysize( @ItemCost ) != getarraysize( @ItemLists ) || getarraysize( @ItemLists ) != getarraysize( @ItemCost ) )
    	ErrorNotice( "Missing or Extra Value of Item or Cost Settings in Menu "+@menu+" ." );
    return;
    }
    
    function	ErrorNotice	{
    	mes "^FF0000ERROR^000000 - "+getarg(0);
    	mes "^00FF00____________________________^000000";
    	mes "Inform this Message to ^0000FFGame Staffs^000000 immediately !";
    	close;
    }
    
    function	CurrencyInfo	{
    	if( getitemname( atoi( getarg(0) ) ) != "null" ){
    		mes "Item Currency : ^FF0000"+getitemname( atoi( getarg(0) ) )+"^000000";
    		mes "Available Amount : ^0000FF"+ValueConvert( countitem( atoi( getarg(0) ) ) )+"^000000";
    	}else if( getitemname( atoi( getarg(0) ) ) == "null" ){
    		mes "Variable Currency : ^FF0000"+getarg(0)+"^000000";
    		mes "Available Amount : ^0000FF"+ValueConvert( getd( getarg(0) ) )+"^000000";
    	}
    return;
    }
    
    function	ValidateCost	{
    	if( getitemname( atoi( getarg(0) ) ) != "null" ){
    		if( countitem( atoi( getarg(0) ) ) < getarg(1) ) return 1;
    	}else{
    		if( getd( getarg(0) ) < getarg(1) ) return 1;
    	}
    return 0;
    }
    
    function ClearData	{
    	set @Currency$,"";
    	set @TotalCost,0;
    	deletearray @bought_nameid[0],getarraysize( @bought_nameid );
    	deletearray @bought_quantity[0],getarraysize( @bought_quantity );
    	deletearray @ItemLists[0],getarraysize( @ItemLists );
    	deletearray @ItemCost[0],getarraysize( @ItemCost );
    return;
    }
    
    function	ValueConvert	{
    	set .@num, atoi(""+getarg(0));
    	if ( .@num == 0 || .@num >= 2147483647 ) return getarg(0);
    	set .@l, getstrlen(""+.@num);
    	for ( set .@i,0; .@i < .@l; set .@i, .@i + 1 ) {
    		set .@num$, .@num % pow(10,.@i+1) / pow(10,.@i) + .@num$;
    			if ( (.@i+1) % 3 == 0 && .@i+1 != .@l ) set .@num$, ","+ .@num$;
    	}
    	return .@num$;
    }
    
    OnBuyItem:
    	ShopSettings( @menu );
    	for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    		for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1)
    			if( @ItemLists[@j] == @bought_nameid[@i] )
    			set @TotalCost,@TotalCost + ( @ItemCost[@j] * @bought_quantity[@i] );
    	mes "^FF0000       BILLING LIST^000000";
    	mes "^00FF00____________________________^000000";
    	for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 )
    			mes "^FF0000"+@bought_quantity[@i]+" x ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000";
    	mes "^00FF00____________________________^000000";
    
    	if( getitemname( atoi( @Currency$ ) ) != "null" )
    		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" x "+getitemname( atoi( @Currency$ ) )+"^000000";
    	else if( getitemname( atoi( @Currency$ ) ) == "null" ){
    		mes "Total Cost : ^0000FF"+ValueConvert( @TotalCost )+" "+@Currency$+"^000000";
    	}
    	
    	mes "^00FF00____________________________^000000";
    	if( ValidateCost( @Currency$,@TotalCost ) ){
    		if( getitemname( atoi( @Currency$ ) ) != "null" )
    			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+getitemname( atoi( @Currency$ ) )+"^000000";
    		else{
    			mes "[ ^FF0000X^000000 ] Insufficient ^0000FF"+@Currency$+"^000000";
    		}
    	}else{
    		if( select( "^0000FFPurchase^000000:Cancel" ) == 1 ){
    			if( getitemname( atoi( @Currency$ ) ) != "null" )
    				delitem atoi( @Currency$ ),@TotalCost;
    			else{
    				set getd( @Currency$ ),getd( @Currency$ ) - @TotalCost;
    			}
    			for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1)
    				getitem @bought_nameid[@i],@bought_quantity[@i];
    			message strcharinfo(0),"Purchased "+getarraysize( @bought_nameid )+" Items.";
    			mes "Thank you for shopping.";
    		}
    	}
    ClearData();
    close;
    }
    -	script	qwerty	-1,{
    OnPCKillEvent:
         if ( strcharinfo(3) == "guild_vs3" ) {
    	set pvppoint,pvppoint+1;
    	dispbottom "You have gained 1 Points. Total "+pvppoint+" Point";
    end;
    }
    }
    // ---------------------------------------------------
    -	script	pointscheck	-1,{
    OnInit:
    	bindatcmd("pc","pointscheck::OnAtcommand");
    	end;
    
    OnAtcommand:
    	message strcharinfo(0),"You currently have "+pvppoint+" PvP Points";
    	end;
    	}
    
  12. Like this?

    // ID(672) = Bag of Coin edit to change
    prontera,231,338,5	script	Bag Exchangers	757,{
    menu "Exchange " +getitemname(9524)+" to Bag Coin", L_bag, "Exchange " +getitemname(9524)+ " to Zeny", L_zeny, "Cancel", L_Cancel;
    
    L_bag:
    	mes "How many you want to exchange?";
    	mes "^ff0000Note^000000: 300 "+getitemname(9524)+" currently 1 Bag Coins";
    	input .@count;
    	if (.@count == 0) close; // optional: if player enter 0 script will terminate
    	if (countitem(9524) < .@count*300) goto L_Noitem;
    	delitem 9524,.@count*300;
    	getitem 672,.@count;
    	close;
    close;
    
    L_zeny:
    	mes "How many you want to exchange?";
    	mes "^ff0000Note^000000: 1 Bag coin currently 10m each";
    	input .@t;
    	if (.@t == 0) close;
    	readparam(Zeny);
    	if( .@t < 1 )||( countitem(672) < .@t ) ||  (readparam(Zeny)>= 1000000000) goto Max_Zeny; //1B max Zeny
    	set Zeny,Zeny+10000000*.@t; // 10m of zeny
    	delitem 9524,.@t;
    	close;
    
    Max_Zeny:
    next;
    	mes	"Coin Cannot Change Due to Max Zeny you Have.";
    	close;
    close;
    
    L_Noitem:
    next;
    	mes "Sorry you dont have enough of item";
    close;
    	
    L_Cancel:
    	mes "No problem, Come back again";
    close;
    end;
    }
    
    
  13. still got error on line 9.

     

    prontera,120,100,4    script    ranking    100,{
    
    set .@nb, query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 10", .@name$, .@kills, .@deaths, .@class );
    
    if ( !.@nb ) {
    
    mes "ladder is empty";
    
    close;
    
    }
    
    mes "[ Top PvP Ranking ]";
    
    mes "Name - Job - Killed - Death";
    
    for ( .@i = 0; .@i < .@nb; .@i++ ) // ERROR LINE 9*
    
         mes "^0000FF"+ (.@i+1) +": ^228B22"+ .@name$[.@i] +" ^606060"+ jobname(.@class[.@i]) +" ^006699"+ .@kills[.@i] +" / ^C80000"+ .@deaths[.@i] +"^000000";
    
    close;
    
    OnPCKillEvent:
    
    query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1, 0, "+ class +" ) on duplicate key update kills = kills +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class;
    
    attachrid killedrid;
    
    query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 0, 1, "+ class +" ) on duplicate key update deaths = deaths +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class;
    
    }
    
    
    for ( .@i = 0; .@i < .@nb; .@i++ ) // ERROR LINE 9*
    


    Solved. ty  Patskie

    prontera,120,100,4	script ranking	100,{
        set .@nb, query_sql( "select name, kills, deaths, class from pvpladder order by kills desc limit 10", .@name$, .@kills, .@deaths, .@class );
        if ( !.@nb ) {
            mes "ladder is empty";
            close;
        }
           mes "[ Top PvP Ranking ]";
    mes "Name - Job - Killed - Death";
      	for(set .@i, 0; .@i < getarraysize (.@nb); set .@i, .@i + 1){
    	 mes "^0000FF"+ (.@i+1) +": ^228B22"+ .@name$[.@i] +" ^606060"+ jobname(.@class[.@i]) +" ^006699"+ .@kills[.@i] +" / ^C80000"+ .@deaths[.@i] +"^000000";
        close;
    OnPCKillEvent:
        query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 1, 0, "+ class +" ) on duplicate key update kills = kills +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class;
        attachrid killedrid;
        query_sql "insert into pvpladder values ( "+ getcharid(0) +", '"+ escape_sql( strcharinfo(0) ) +"', 0, 1, "+ class +" ) on duplicate key update deaths = deaths +1, name = '"+ escape_sql( strcharinfo(0) ) +"', class = "+ class;    
    }
    }
    
×
×
  • Create New...