Jump to content

blakbord

Members
  • Posts

    108
  • Joined

  • Last visited

Posts posted by blakbord

  1. I am loving this script, but is it possible to change it?

    ex. (in triple slot machine)
    Slot 1 (Success) |  Slot 2 (Success) | Slot 3 (Failure) = Specific Item Reward
    even if it has 1 Failure, it can give an Specific Item Reward ( Box )

    PS: I don't know what version of your script I downloaded but here it is
     

    Quote

    prontera,152,176,4    script   SlotMachine  563,{

        if( getgmlevel() == 99 ) {
            mes "Welcome Administrator.","What would you like to do?";
            menu "Play Game",-,"Change Slot Machine Mode",iMode;
            next;
            }
    switch( getd(".mode"+strnpcinfo(3)+"") ){
        case 0: // Single Slot machine mode.
            mes "Do you want to play a game?";
            if( !.payment ) { mes "It costs: "+ .ssm_payment_message$[0] +" to play."; }
                else if ( .payment == 1 ) { mes "It costs: "+ .ssm_payment_message$[1] +" to play."; }
                    else if ( .payment == 2 ) { mes "It costs: "+ .ssm_payment_message$[0] +" & "+ .payment_message$[1] +" to play."; }
            if( select("YES:NO") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ close; }
            while( @menu == 1 ){
                if( !.payment || .payment == 2 ) { Zeny -= .ssm_payment[0]; }
                if( .payment ) { delitem( .ssm_payment[1], .ssm_payment[2] ); }
                if( .soundeffects ) { soundeffect "slot_jackpot.wav",0; }
                .@a = rand(1,100);
                if( .@a < atoi(.ssm_animate$[0]) ){ .@a = 1; } else { .@a = 2; }
                .@b = 1;
                while( .@b < atoi(.ssm_animate$[.@a]) ) {
                    cutin .ssm_animate$[3] + .@b,4; sleep2 ( ( atoi(.ssm_animate$[4]) * 1000 ) / atoi(.ssm_animate$[.@a]) ); .@b++;
                    }
                if( .@a == 1 ){ 
                    cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4;
                    dispbottom "Failed";
                    } 
                else {
                    cutin .ssm_animate$[3] + atoi(.ssm_animate$[.@a]),4;
                    switch(rand(15)) {
                    case 0:
                        getitem 603,5; // OBB
                        break;
                    case 1:
                        getitem 617,5; // OPB
                        break;
                    case 2:
                        getitem 644,5;    // Gift Box
                        break;
                    case 3:
                        getitem 616,1; // OCA
                        break;
                    case 4:
                        getitem 31053,1; // Drooping Eddga Costume
                        break;
                    case 5:
                        getitem 18571,1; // no item
                        break;
                    case 6:
                        getitem 7720,1000; // Gold Coin
                        break;
                    case 7:
                        getitem 17271,1; // no item
                        break;
                    case 8:
                        getitem 17272,1; // 
                        break;
                    case 9:
                        getitem 17273,1;
                        break;
                    case 10:
                        getitem 17274,1;
                        break;
                    case 11:
                        getitem 17275,1;
                        break;
                    case 12:
                        getitem 12208,5; // Battle Manual
                        break;
                    case 13:
                        getitem 12103,2; // Bloody Branch
                        break;
                    case 14:
                        getitem 12259,1; // Miracle Tonic for Level Up
                        break;
                    }
                    }
                if( select("Another Round:I'm done") == 2 || Zeny < .ssm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.ssm_payment[1]) < .ssm_payment[2] && .payment ){ cutin "",255; close; }
                }
            end;
        
        case 1: // Triple Slot machine mode.
            mes "Do you want to play a game?";
            
            if( !.payment ) { mes "It costs: "+ .tsm_payment_message$[0] +" to play."; }
                else if ( .payment == 1 ) { mes "It costs: "+ .tsm_payment_message$[1] +" to play."; }
                    else if ( .payment == 2 ) { mes "It costs: "+ .tsm_payment_message$[0] +" & "+ .tsm_payment_message$[1] +" to play."; }
                    
            if( select("YES:NO") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ close; }
            
            while( @menu == 1 ){
                if( !.payment || .payment == 2 ) { Zeny -= .tsm_payment[0]; }
                if( .payment ) { delitem( .tsm_payment[1], .tsm_payment[2] ); }
                if( .soundeffects ) { soundeffect "slot_pay_coin.wav",0; }
                
                // Slot 1 = 100% Chance for success. (Because I didn't make a fail animation for it.
                .@2 = rand(1,100); //Rolls dice for Slot 2
                .@3 = rand(1,100); //Rolls dice for Slot 3
                    if( .@2 <= atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 8; }
                    else if( .@2 <= atoi(.tsm_animate$[0]) && .@3 > atoi(.tsm_animate$[1]) ){ .@a = 6; }
                    else if( .@2 > atoi(.tsm_animate$[0]) && .@3 <= atoi(.tsm_animate$[1]) ){ .@a = 4; }
                    else { .@a = 2; }
                .@b = 1;
                while( .@b < atoi(.tsm_animate$[.@a+1]) ) {
                    cutin .tsm_animate$[.@a] + .@b,4; sleep2 ( ( atoi(.tsm_animate$[10]) * 1000 ) / atoi(.tsm_animate$[.@a+1]) ); .@b++;
                    }
                cutin .tsm_animate$[.@a] + atoi(.tsm_animate$[.@a+1]),4;
                    if( .@a == 2 ){
                        switch(rand(15)) {
                    case 0:
                        getitem 603,5;
                        break;
                    case 1:
                        getitem 617,5;    
                        break;
                    case 2:
                        getitem 644,5;    
                        break;
                    case 3:
                        getitem 616,1;
                        break;
                    case 4:
                        getitem 31053,1;
                        break;
                    case 5:
                        getitem 18571,1;
                        break;
                    case 6:
                        getitem 7720,100;
                        break;
                    case 7:
                        getitem 17271,1;
                        break;
                    case 8:
                        getitem 17272,1;
                        break;
                    case 9:
                        getitem 17273,1;
                        break;
                    case 10:
                        getitem 17274,1;
                        break;
                    case 11:
                        getitem 17275,1;
                        break;
                    case 12:
                        getitem 12208,5;
                        break;
                    case 13:
                        getitem 12103,2;
                        break;
                    case 14:
                        getitem 12259,1;
                        break;
                    }
                    } else { dispbottom "Failed"; }
                if( select("Another Round:I'm done") == 2 || Zeny < .tsm_payment[0] && ( !.payment || .payment == 2 ) || countitem(.tsm_payment[1]) < .tsm_payment[2] && .payment ){ cutin "",255; close; }
                }
            end;
        }

    OnSingleSlot:
    setd ".mode"+strnpcinfo(3)+"",0;
    end;
    OnTripleSlot:
    setd ".mode"+strnpcinfo(3)+"",1;
    end;

    iMode:
    next;
    mes "Which did you want to do?";
    menu "Change THIS machine's mode:Change ALL machine's mode",-;
    if( @menu == 1 ) {
        next;
        mes "What mode would you like this machine to have?";
        menu "Single Slot Machine Mode:Triple Slot Machine Mode",-;
        if( @menu == 1 ) {
            setd ".mode"+strnpcinfo(3)+"",0;
            } else {
                setd ".mode"+strnpcinfo(3)+"",1;
                }
        close;
        } else {
            next;
            mes "What mode would you like to change all slot machines to?";
            menu "Single Slot Machine Mode:Triple Slot Machine Mode",-;
            if( @menu == 1 ) {
                donpcevent "::OnSingleSlot";
                } else {
                    donpcevent "::OnTripleSlot";
                    }
            close;
            }
    OnClock0400:
    OnClock0800:
    OnClock1200:
    OnClock1600:
    OnClock2000:
    OnClock0000:
        announce "Slot Machine will begin in 1 minute.", bc_all;
        sleep 60000;
        announce "Come and Play slot machine at prontera", bc_all;
        hideoffnpc strnpcinfo(3);
        sleep 300000;
        announce "Slot Machine already finished", bc_all;
        hideonnpc strnpcinfo(3);
        end;

    OnInit:
    hideonnpc strnpcinfo(3);

    //[ 0 = Single Slot Machine Mode ]_[ 1 = Triple Slot Machine Mode ]
    setd ".mode"+strnpcinfo(3)+"",1;

    //[0] = Fail Rate
    //[1] = Fail (Do not change)
    //[2] = Success (Do not change)
    //[3] = File Name (Do not change)
    //[4] = Animation Time (Do not change, for best results :D)
    setarray .ssm_animate$[0],"70","29","33","slot_","3";

    //[0] = Fail Rate "Slot 2"
    //[1] = Fail Rate "Slot 3"
    //[2] = SSS (Do not change)
    //[3] = SSS_Count (Do not change)
    //[4] = SSF (Do not change)
    //[5] = SSF_Count (Do not change)
    //[6] = SFS (Do not change)
    //[7] = SFS_Count (Do not change)
    //[8] = SFF (Do not change)
    //[9] = SFF_Count (Do not change)
    //[10] = Animation Time (Do not change, for best results :D)
    setarray .tsm_animate$[0],"70","70","SSS_","41","SSF_","37","SFS_","41","SFF_","45","3";

    // Payment Settings
    // Payment Type
    // 0 = Zeny, 1 = Item, 2 = Zeny&Item
    .payment = 1;
    // [0] = Zeny, [1] = Item ID, [2] = Item Amount;
    setarray .ssm_payment[0],0,7528,1; // Single Slot Machine Payment Price
    setarray .tsm_payment[0],0,7528,1; // Triple Slot Machine Payment Price

    // DO NOT CHANGE BELOW
    // Payment Text Syntax
    setarray .ssm_payment_message$[0],""+ .ssm_payment[0] +" zeny",""+ getitemname(.ssm_payment[1]) +" x"+ .ssm_payment[2] +"";
    setarray .tsm_payment_message$[0],""+ .tsm_payment[0] +" zeny",""+ getitemname(.tsm_payment[1]) +" x"+ .tsm_payment[2] +"";
    end;
    }

     

  2. 12 hours ago, Chaos92 said:

    how about the IP part that I commented above ? its crucial since from your screenshot it doesnt have port there. 

    Thank you for helping me, now I understand.. all I have to do is change this line ( red arrow ) into localhost IP.
    image.png.cc2b30ba30a4315742791a8971c66b94.png

  3. 1 hour ago, Chaos92 said:

    so its running. if no firewall blocking the connection to the web server, most probably its clientside.

    what is your sclientinfo ? can you paste without the IP/domain ?

    Quote

    <?xml version="1.0" encoding="euc-kr" ?>
    <clientinfo>
        <desc>Ragnarok Client Information</desc>
        <servicetype>korea</servicetype>
        <servertype>sakray</servertype>
        <hideaccountlist />
        <passwordencrypt />
        <passwordencrypt2 />
        <extendedslot />
        <readfolder />
        <connection>
            <display>TEST SERVER</display>
            <desc>Ragnarok Online</desc>
            <balloon>this is a tool tip</balloon>
            <address>192.168.1.64</address>
            <port>6900</port>
            <version>20</version>
            <langtype>1</langtype>
            <registrationweb></registrationweb>
            <yellow>
                <admin>2000001</admin>
                <admin>2000002</admin>
                <admin>2000003</admin>
            </yellow>
            <loading>
                <image>loading00.jpg</image>
                <image>loading01.jpg</image>
                <image>loading02.jpg</image>
                <image>loading03.jpg</image>
                <image>loading04.jpg</image>
                <image>loading05.jpg</image>
                <image>loading06.jpg</image>
                <image>loading07.jpg</image>
                <image>loading08.jpg</image>
                <image>loading09.jpg</image>
                <image>loading10.jpg</image>
            </loading>
        </connection>
    </clientinfo>

    I'm using my Unit IP so other unit can connect via local connection

  4. I've been searching here to fix mine and I found this

    I followed all the steps and still I can't fix mine, here is my ExternalSetting_kr..
    PS: I tried using both Localhost - 127.0.0.1 and My Unit Local IP - 192.168.1.64

    Quote

    MaxLevelTable = {
        BaseLevel = 99,
        BaseLevel3rd = 200,
        BaseLevel4th = 250,
        BaseLevelExtend2 = 200,
        BaseLevelUpperJob = 200,
        BaseLevelHomun = 99,
        BaseLevelDoram = 200,
        JobLevelNovice = 10,
        JobLevelSuperNovice = 99,
        JobLevelBase = 50,
        JobLevel2nd = 70,
        JobLevel3rd = 70,
        JobLevel4th = 50,
        JobLevelExtend2 = 70,
        JobLevelUpperJob = 70,
        JobLevelDoram = 60
    }
    MakeableRace = { Doram = false }
    AssistAddr = "192.168.1.64:8888"
    -----------------------------------------
    -- Old client compatibility [Secret]
    -- (Just change the "AssistAddr" to your IP)
    -----------------------------------------
    Url = { TwitterUrl = 'http://192.168.1.64:8888' }
    AccountLinkedUserDataUrl = {
        Save = 'http://192.168.1.64/userconfig/save',
        Load = 'http://192.168.1.64/userconfig/load'
    }
    TwitterDataUrl = {
        Auth = 'http://192.168.1.64/twitter/user-auth',
        Upload = 'http://192.168.1.64/twitter/upload'
    }
    EmblemDataUrl = {
        Upload = 'http://192.168.1.64/emblem/upload',
        Download = 'http://192.168.1.64/emblem/download'
    }
    -----------------------------------------
    LEVELAURA = {}
    LEVELAURA.EF_NONE = -1
    LEVELAURA.EF_LEVEL99 = 200
    LEVELAURA.EF_LEVEL99_ORB1 = 976
    LEVELAURA.EF_LEVEL99_ORB2 = 977
    LEVELAURA.EF_LEVEL150 = 978
    LEVELAURA.EF_LEVEL150_SUB = 979
    LEVELAURA.EF_LEVEL160 = 1022
    LEVELAURA.EF_LEVEL160_SUB = 1023
    LEVELAURA.EF_LEVEL185 = 1226
    LEVELAURA.EF_LEVEL185_SUB = 1227
    LEVELAURA.EF_LEVEL4TH = 2275
    LEVELAURA.EF_LEVEL4TH_SUB = 2276
    Level99AuraTable = {
        Default99LvAura = LEVELAURA.EF_LEVEL99,
        Default99LvAura_sub = LEVELAURA.EF_LEVEL99_ORB1,
        Baby99LvAura = LEVELAURA.EF_LEVEL99,
        Baby99LvAura_sub = LEVELAURA.EF_LEVEL99_ORB2,
        SecondHigh99LvAura = 0,
        SecondHigh99LvAura_sub = 0,
        Homun99LvAura = 0,
        Homun99LvAura_sub = 0,
        Boss99LvAura_sub = LEVELAURA.EF_LEVEL99_ORB1
    }
    MaxLevelAuraTable = {
        Default150LvAura = LEVELAURA.EF_LEVEL150,
        Default150LvAura_sub = LEVELAURA.EF_LEVEL150_SUB,
        Default160LvAura = LEVELAURA.EF_LEVEL185,
        Default160LvAura_sub = LEVELAURA.EF_LEVEL185_SUB,
        Default185LvAura = LEVELAURA.EF_LEVEL185,
        Default185LvAura_sub = LEVELAURA.EF_LEVEL185_SUB,
        MaxLevelEffect4th = LEVELAURA.EF_LEVEL4TH,
        MaxLevelEffect4th_sub = LEVELAURA.EF_LEVEL4TH_SUB,
        UpperJobMaxLvAura = LEVELAURA.EF_LEVEL185,
        UpperJobMaxLvAura_sub = LEVELAURA.EF_LEVEL185_SUB,
        HomunMaxLvAura = LEVELAURA.EF_LEVEL4TH,
        HomunMaxLvAura_sub = LEVELAURA.EF_LEVEL4TH_SUB
    }

    function GetTableIntValueForC(tableName, keyName)
        local t = _G[tableName]
        if nil == t then
            return -1
        end
        local intValue = t[keyName]
        if nil == intValue then
            return -1
        else
            return intValue
        end
    end

    function GetTableStringValueForC(tableName, keyName)
        local t = _G[tableName]
        if nil == t then
            return ""
        end
        local stringValue = t[keyName]
        if nil == stringValue then
            return ""
        else
            return stringValue
        end
    end

    function GetTableBoolValueForC(tableName, keyName)
        local t = _G[tableName]
        if nil == t then
            return false
        end
        local boolValue = t[keyName]
        if nil == boolValue then
            return false
        else
            return boolValue
        end
    end

     

  5. good day everyone,
    I've been working around with the file mapInfo.lub and mapInfo.lua to translate in English under System Folder and diff the exe with Change MapInfo*.lub path I still can't find the right file for this one, can someone enlighten me? thank you in advance..

    1.PNG

  6. Good Day Everyone,
    I'm just gonna ask how to delete .exe files or other kind of files inside my RO Folder using Thor Patcher, I've been searching for weeks now but I still don't find the right answer..

    I have found the same question Here but it's not the right answer,,

  7. try this one..

    //======= 3ceam Script =======================================
    //= Prize Giver NPC
    //===== Modified By: =========================================
    //= Keitenai
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= Athena Project
    //===== Description: =========================================
    //= Prize giver for single char, account and more.
    //===== Additional Comments: =================================
    //= 1.0 Modified Version for 3ceam compatibility
    //============================================================
    
    prontera,147,173,4	script	Server Reward	544,{
    	//cutin "v_sprakki04",2;
    	//Check if setups are loaded.
    	if(!.Setup)
    		{
    			callsub OnLoadSetup;
    		}
    
    	//Show GM Panel if player is GM.
    	if(getgmlevel() >= .GMin)
    		menu("Take a prize as a player",-,"Give prize",
    				OnManagement,"Reset Item Give",
    				OnDelete,"IP Limit per Item",
    				OnLimit);
    
    	//Read attached player gifts from SQL table.
    	if(select("Get Account Prize!:Get Character Prize!:Exit") == 1)
    		{
    			set .@query, query_sql("SELECT * FROM `" + .GiftTableName$ + "` WHERE account_id="+getcharid(3),
    				.@gift_id,
    				.@gift_account,
    				.@gift_char,
    				.@gift_item,
    				.@gift_amount,
    				.@gift_duration,
    				.@gift_time
    				); //Account gifts.
    		}
    		else if(@menu == 2)
    		{
    			set .@query, query_sql("SELECT * FROM `" + .GiftTableName$ + "` WHERE char_id="+getcharid(0),
    				.@gift_id,
    				.@gift_account,
    				.@gift_char,
    				.@gift_item,
    				.@gift_amount,
    				.@gift_duration,
    				.@gift_time
    				); //Char gifts.
    		}
    		else goto OnLeave;
    
    	//Check if player don't have gifts.
    	if(!.@query)
    		{
    			mes "[Reward Giver]";
    			mes "Sorry, you don't have any prize";
    
    			cutin "v_sprakki04",255;
    			close;
    		}
    
    	//Build menu from query arrays.
    		mes "[" + strnpcinfo(1) + "]";
    		mes "^009900You got the prize^000000";
    			for( set .@i, 0; .@i < .@query; set .@i, .@i + 1 )
    			{
    				mes "(" + .@gift_amount[.@i] + ") " + getitemname(.@gift_item[.@i]) + ".";
    				set .@menu$, .@menu$ + getitemname(.@gift_item[.@i]) + ":";
    			}
    			next;
    			set .@mid,select(.@menu$); //Show menu.
    			set .@mid,.@mid-1;
    
    	if (.@gift_time[.@mid] && .@gift_time[.@mid] < gettimetick(2))
    	{
    		mes "[Reward Giver]";
    		mes "Sorry, this prize's claim time is already over.";
    
    		cutin "v_sprakki04",255;
    		close;
    	}
    	//Item is now selected. Choose what you want to do with it.
    	mes "[" + strnpcinfo(1) + "]";
    	mes "what you want do with (" + .@gift_amount[.@mid] + ") " + getitemname(.@gift_item[.@mid]) + "?";
    	next;
    	set .@Select,select("^009900Get it^000000:^ff0000Delete it! ^000000:nothings");
    
    	//Receive gift selected.
    	
    	if(.@Select == 1)
    	{
    		//Check weight.
    		if(checkweight( .@gift_item, .@gift_amount ) || .@gift_item[.@mid] == .ZenyID)
    		{
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^009900Get : (" + .@gift_amount[.@mid] + ") " + getitemname(.@gift_item[.@mid]) + ".^000000";
    			if (.ip_limit)
    			{
    				// add ip_address to logs
    				.@ipexist = query_sql("SELECT item_id, ip_address, claim_count FROM " + .GiftTableNameIP$ + " WHERE last_ip = (SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND item_id = "+.@gift_item[.@mid]+" LIMIT 1", .@item,.@ip,.@claim_count);
    				if (.@claim_count[0] >= .ip_limit)
    				{
    					next;
    					mes "Sorry you have reached the maximum redeem limit for this IP address";
    					cutin "v_sprakki04",255;
    					close;
    				}
    				if (!.@claim_count[0])
    				{
    					query_sql("INSERT INTO " + .GiftTableNameIP$ + " (give_id,item_id,last_ip,claim_count) VALUES("+.@gift_id+","+.@gift_item+",'(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+")',1)");		
    				}
    				else
    				{
    					query_sql("UPDATE " + .GiftTableNameIP$ + " SET claim_count = "+(.@claim_count[0]+1)+" WHERE item_id = "+.@gift_item[.@mid]+" AND last_ip = (SELECT last_ip FROM login WHERE account_id="+getcharid(3)+")");
    				}
    			}
    			if (.@gift_item[.@mid] == .ZenyID) { // detects zeny ID and give zeny.
    				if (Zeny+.@gift_amount[.@mid] > .MaxZeny)
    				{
    					mes "Please make sure that you have enough space to handle all these zennies and come back later.";
    					cutin "v_sprakki04",255;
    					close;
    				}
    				set Zeny,Zeny+.@gift_amount[.@mid];
    			}
    			else
    			{
    				if (!.@gift_duration)
    				{
    					getitem .@gift_item[.@mid], .@gift_amount[.@mid]; //Give item to player.
    				}
    				else
    				{
    					rentitem .@gift_item[.@mid], .@gift_duration * 60; 
    				}
    			}
    			query_sql( "DELETE FROM `" + .GiftTableName$ + "` WHERE id = " + .@gift_id[.@mid] ); //Remove item from table.
    			cutin "v_sprakki04",255;
    			close;
    		}
    		else
    		{
    			//Overweight
    			mes "^ff0000Sorry ^000000 You can't take it " + getitemname(.@gift_item[.@mid]);
    			mes "Could lose some wight?";
    			cutin "v_sprakki04",255;
    			close;
    		}
    	}
    	//Remove gift selected.
    	else if(.@Select == 2) {
    		mes "[" + strnpcinfo(1) + "]";
    		mes "Are you sure you want dellet it?";
    		mes "Gift: ("+.@gift_amount[.@mid]+") "+getitemname(.@gift_item[.@mid])+".";
    		next;
    		if(select("Yes:No") == 1) {
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^ff0000Dellet: ("+.@gift_amount[.@mid]+") "+getitemname(.@gift_item[.@mid])+".^000000";
    			query_sql("DELETE FROM `" + .GiftTableName$ + "` WHERE id = " + .@gift_id[.@mid]); //Remove item from table.
    			cutin "v_sprakki04",255;
    			close;
    		} else {
    			mes "[" + strnpcinfo(1) + "]";
    			mes "we will save it";
    			cutin "v_sprakki04",255;
    			close;
    		}
    	}
    	//Nothing selected.
    	else
    	{
    		goto OnLeave;
    	}
    
    //GM Panel below:
    OnManagement:
    	if(getgmlevel() < .GMin) goto OnLeave;
    	mes "[" + strnpcinfo(1) + "]";
    	mes "Welvome " + strcharinfo(0) + "!";
    	mes "How I can help you?";
    	next;
    
    	if(select("Make Gift:Nothing") != 1) goto OnLeave;
    
    		//Make new gift.
    		mes "[" + strnpcinfo(1) + "]";
    		mes "Please input the item id.";
    		mes "Default: 501";
    	next;
    		mes "What do you want to give?";
    		set .@zenygive,0;
    			if(select("Item:Zeny") == 1)
    				{
    					input .@new_item, 501, 30000;
    				}
    	next;
    	mes "Do you want to add a claim timer?";
    	if(select("No:Yes")==2)
    	{
    		next;
    		mes "How many minutes do you want this reward to be claimable?";
    		input(.@c);
    		.@claimtime = gettimetick(2)+(.@c*60);
    	}
    	if(select("Continue:Cancel") != 1) goto OnLeave;
    		mes "[" + strnpcinfo(1) + "]";
    		mes "How many items/zeny?";
    		mes "Default: 1";
    	next;
    	//item quantity range of 1 to 1,000.
    	if(.@zenygive)
    	{
    		input .@new_value, 1, .MaxZeny;
    	}
    	else
    	{
    		input .@new_value, 1, 1000;
    	}
    	
    	if(select("Continue:Cancel") != 1) goto OnLeave;
    		mes "[" + strnpcinfo(1) + "]";
    		mes "Please select input type:";
    		mes "1. Single Account";
    		mes "2. Single Character";
    		mes "3. All ^009900Online^000000 Accounts.";
    		mes "4. All Accounts.";
    		mes "5. All ^009900Online^000000 Players/Characters.";
    		mes "6. All Players/Characters.";
    		mes "7. ^ff0000Cancel.^000000";
    	next;
    	switch(select("Single Account:Single Character:^009900Online^000000 Accounts:All Accounts:^009900Online^000000 Characters:All Characters:Cancel"))
    	{
    		//Account gift
    		case 1:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please select input type:";
    			mes "By AID or Name?";
    			next;
    			if(select("Account ID:Character Name") == 1)
    			{
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Write account id:";
    				next;
    				input .@new_account, 2000000, 10000000; //Account id range from 2m to 10m.
    				set .@query, query_sql("SELECT account_id FROM `" + .CharTableName$ + "` WHERE account_id = " + .@new_account, .@new_account);
    				if(!.@query) goto OnNotExist;
    				if(select("Continue:Cancel") != 1) goto OnLeave;
    				mes "[" + strnpcinfo(1) + "]";
    				mes "^009900Gift is ready to go!^000000";
    				mes "AID: ^ff0000" + .@new_account + "^000000";
    				mes "------------------";
    				mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    				mes "Quantity: ^ff0000" + .@new_value + "^000000";
    				mes "Duration: " + .@duration + " Minutes";
    				mes "Claim Time: " + .@c + " Minutes";
    				next;
    				if(select("Send Gift:Cancel") != 1) goto OnLeave;
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Gift sending success!";
    				//Create gift. <auto_id>, <account_id> <char_id> <item> <value>
    				query_sql("INSERT INTO `" + .GiftTableName$ + "` (account_id, item, value, duration, timestamp) VALUES(" + .@new_account + ", " + .@new_item + ", " + .@new_value + ", " + .@duration + ", " + .@claimtime + ")");
    			}
    			else
    			{
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Write player name:";
    				next;
    				input .@new_name$;
    				set .@query, query_sql("SELECT account_id FROM `" + .CharTableName$ + "` WHERE name = '" + .@new_name$ + "'", .@new_account);
    				if(!.@query) goto OnNotExist;
    				if(select("Continue:Cancel") != 1) goto OnLeave;
    				mes "[" + strnpcinfo(1) + "]";
    				mes "^009900Gift is ready to go!^000000";
    				mes "AID: ^ff0000" + .@new_account + "^000000";
    				mes "Name: ^ff0000"+ .@new_name$ + "^000000";
    				mes "------------------";
    				mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    				mes "Quantity: ^ff0000" + .@new_value + "^000000";
    				mes "Duration: " + .@duration + " Minutes";
    				mes "Claim Time: " + .@c + " Minutes";
    				next;
    				if(select("Send Gift:Cancel") != 1) goto OnLeave;
    				//Check if player is logged in.
    				if(isloggedin(.@new_account)) {
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (account_id, item, value, duration, timestamp) VALUES(" + .@new_account + ", " + .@new_item + ", " + .@new_value + ", " + .@duration + ", " + .@claimtime + ")");
    				} else {
    					//Account was not online.
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (account_id, item, value, duration, timestamp) VALUES(" + .@new_account + ", " + .@new_item + ", " + .@new_value + ", " + .@duration + ", " + .@claimtime + ")"); // duplicate to other menus - continue here on giver side
    				}
    			}
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to " + .@new_name$,bc_all;
    			break;
    
    		//Character gift.
    		case 2:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please select input type:";
    			mes "By CID or Name?";
    			next;
    			if(select("Character ID:Character Name") == 1)
    			{
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Write character id:";
    				next;
    				input .@new_char,150000, 10000000; //Char id range from 150k to 10m.
    				set .@query, query_sql("SELECT account_id, name FROM `" + .CharTableName$ + "` WHERE char_id = " + .@new_char, .@new_accountid, .@new_name$);
    				if(!.@query) goto OnNotExist;
    				if(select("Continue:Cancel") != 1) goto OnLeave;
    					mes "[" + strnpcinfo(1) + "]";
    					mes "^009900Gift is ready to go!^000000";
    					mes "CID: ^ff0000" + .@new_char + "^000000";
    					mes "Name: ^ff0000" + .@new_name$ + "^000000";
    					mes "------------------";
    					mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    					mes "Quantity: ^ff0000" + .@new_value + "^000000";
    					mes "Duration: " + .@duration + " Minutes";
    					mes "Claim Time: " + .@c + " Minutes";
    				next;
    				if(select("Send Gift:Cancel") != 1) goto OnLeave;
    				//Check if player is logged in.
    				if(isloggedin(.@new_accountid)) {
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    
    					//Create gift. <auto_id>, <account_id> <char_id> <item> <value>
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@new_char + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    				} else {
    					//not online ask if we still give the gift.
    					mes "[" + strnpcinfo(1) + "]";
    					mes "The character is not online!";
    					mes "Would you still like to send the gift?";
    					next;
    					if(select("Yes:No") != 1) goto OnLeave;
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    					//Create gift. <auto_id>, <account_id> <char_id> <item> <value>
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@new_char + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    				}
    
    			}
    			else
    			{
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Write player name:";
    				next;
    				input .@new_name$;
    				set .@query, query_sql("SELECT char_id, account_id FROM `" + .CharTableName$ + "` WHERE name = '" + .@new_name$ + "'", .@new_char, .@new_accountid);
    				if(!.@query) goto OnNotExist;
    				if(select("Continue:Cancel") != 1) goto OnLeave;
    					mes "[" + strnpcinfo(1) + "]";
    					mes "^009900Gift is ready to go!^000000";
    					mes "CID: ^ff0000" + .@new_char + "^000000";
    					mes "Name: ^ff0000"+ .@new_name$ + "^000000";
    					mes "------------------";
    					mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    					mes "Quantity: ^ff0000" + .@new_value + "^000000";
    					mes "Duration: " + .@duration + " Minutes";
    					mes "Claim Time: " + .@c + " Minutes";
    				next;
    				if(select("Send Gift:Cancel") != 1) goto OnLeave;
    				//Check if player is logged in.
    				if(isloggedin(.@new_accountid))
    				{
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@new_char + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    				}
    				else
    				{
    					//not online ask if we still give the gift.
    					mes "[" + strnpcinfo(1) + "]";
    					mes "The character is not online!";
    					mes "Would you still like to give the gift?";
    					next;
    					if(select("Yes:No") != 1) goto OnLeave;
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Gift sending success!";
    					//Create gift. <auto_id>, <account_id> <char_id> <item> <value>
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@new_char + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    				}
    			}
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to " + .@new_name$,bc_all;
    			break;
    
    		//Register gift to all online accounts!
    		case 3:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^009900Gift is ready to go!^000000";
    			mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    			mes "Quantity: ^ff0000" + .@new_value + "^000000";
    			mes "Duration: " + .@duration + " Minutes";	
    			mes "Claim Time: " + .@c + " Minutes";
    			next;
    			if(select("Send Gift:Cancel") != 1) goto OnLeave;
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please hold...";
    			set .@c, 0; //Counting success.
    			set .@query, query_sql("SELECT account_id FROM `"+.CharTableName$+"` WHERE online=1",.@account);
    			for(set .@i, 0; .@i < .@query; set .@i, .@i + 1) {
    				sleep2 25; //Slowdown the loop abit.
    				.@at = query_sql("SELECT account_id, char_id FROM "+$GiftTableNameAT$+" WHERE account_id = "+.@account[.@i]+"", .@account_id, .@char_id); // check if in the table
    				if (!.@at) {		
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (account_id, item, value, duration, timestamp) VALUES(" + .@account[.@i] + ", " + .@new_item + ", " + .@new_value + ", " + .@duration + ", " + .@claimtime + ")");
    				}
    			}
    			mes "Gift registered to (" + .@i + ") accounts!";
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to all Online!",bc_all;
    			break;
    
    		//Register gift to all accounts!
    		case 4:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^009900Gift is ready to go!^000000";
    			mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    			mes "Quantity: ^ff0000" + .@new_value + "^000000";
    			mes "Claim Time: " + .@c + " Minutes";		
    			next;
    			if(select("Send Gift:Cancel") != 1) goto OnLeave;
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please hold...";
    			set .@query, query_sql("SELECT account_id FROM `"+.LoginTableName$+"`",.@account);
    			for(set .@i, 0; .@i < .@query; set .@i, .@i + 1) {
    				sleep2 25; //Slowdown the loop abit.
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (account_id, item, value, duration, timestamp) VALUES(" + .@account[.@i] + ", " + .@new_item + ", " + .@new_value + ", " + .@duration + ", " + .@claimtime + ")");
    			}
    			mes "Gift registered to (" + .@i + ") accounts!";
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to Everyone.",bc_all;
    			break;
    
    		//Register gift to all online characters!
    		case 5:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^009900Gift is ready to go!^000000";
    			mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    			mes "Quantity: ^ff0000" + .@new_value + "^000000";
    			mes "Claim Time: " + .@c + " Minutes";		
    			next;
    			if(select("Send Gift:Cancel") != 1) goto OnLeave;
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please hold...";
    			set .@c, 0; //Counting success.
    			set .@query, query_sql("SELECT char_id FROM `"+.CharTableName$+"` WHERE online=1",.@char);
    			for(set .@i, 0; .@i < .@query; set .@i, .@i + 1) {
    				sleep2 25; //Slowdown the loop abit.
    				.@at = query_sql("SELECT account_id, char_id FROM "+$GiftTableNameAT$+" WHERE char_id = "+.@char[.@i]+"", .@account_id, .@char_id); // check if in the table
    				if (!.@at) {
    					query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@char[.@i] + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    				}
    			}
    			mes "Gift registered to (" + .@i + ") players!";
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to all Online Characters",bc_all;
    			break;
    
    		//Register gift to all characters!
    		case 6:
    			mes "[" + strnpcinfo(1) + "]";
    			mes "^009900Gift is ready to go!^000000";
    			mes "Item: ^ff0000" + getitemname(.@new_item) + "^000000";
    			mes "Quantity: ^ff0000" + .@new_value + "^000000";
    			mes "Claim Time: " + .@c + " Minutes";	
    			next;
    			if(select("Send Gift:Cancel") != 1) goto OnLeave;
    			mes "[" + strnpcinfo(1) + "]";
    			mes "Please hold...";
    			set .@query, query_sql("SELECT char_id FROM `"+.CharTableName$+"`",.@char);
    			for(set .@i, 0; .@i < .@query; set .@i, .@i + 1) {
    				sleep2 25; //Slowdown the loop abit.
    				query_sql("INSERT INTO `" + .GiftTableName$ + "` (char_id, item, value, duration, timestamp) VALUES (" + .@char[.@i] + ", " + .@new_item + ", " + .@new_value + "," + .@duration + "," + .@claimtime + ")");
    			}
    			mes "Gift registered to (" + .@i + ") players!";
    			announce "[GM] "+strcharinfo(0)+" successfully sent " + .@new_value + "x as a Gift " + getitemname(.@new_item) + " to " + .@new_name$,bc_all;
    			break;
    
    		//Cancel.
    		Default:
    				mes "[Reward Giver]";
    				mes "See you later";
    				break;
    	}
    	close;
    
    OnLeave:
    		mes "[Reward Giver]";
    		mes "See you later";
    		cutin "v_sprakki04",255;
    		close;
    
    OnNotExist:
    		mes "[" + strnpcinfo(1) + "]";
    		mes "This account does not exist!";
    		cutin "v_sprakki04",255;
    		close;
    	
    //============Reset Function=========================
    OnDelete:
    		mes "Which gifts do you want to reset?";
    		mes "1. Single Account";
    		mes "2. Single Character";
    		mes "3. All ^009900Online^000000 Accounts.";
    		mes "4. All Accounts.";
    		mes "5. All ^009900Online^000000 Players/Characters.";
    		mes "6. All Players/Characters.";
    		mes "7. All cancel";
    		switch(select("Single Account:Single Character:^009900Online^000000 Accounts:All Accounts:^009900Online^000000 Characters:All Characters:Specific Item:IPLimit Logs:Cancel"))
    			{
    			case 1: //Single Account
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Please select input type:";
    				mes "By AID or Name?";
    				next;
    				if(select("Account ID:Character Name") == 1)
    				{
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Write account id:";
    					next;
    					input .@new_account, 2000000, 10000000; //Account id range from 2m to 10m.
    					set .@query, query_sql("SELECT account_id FROM `" + .CharTableName$ + "` WHERE account_id = " + .@new_account, .@new_account);
    					if(!.@query) goto OnNotExist;
    					if(select("Continue:Cancel") != 1) goto OnLeave;
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE account_id = " + .@new_account);
    				}
    				else
    				{
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Write player name:";
    					next;
    					input .@new_name$;
    					set .@query, query_sql("SELECT account_id FROM `" + .CharTableName$ + "` WHERE name = '" + .@new_name$ + "'", .@new_account);
    					if(!.@query) goto OnNotExist;
    					if(select("Continue:Cancel") != 1) goto OnLeave;
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE account_id = " + .@new_account);
    				}
    				break;
    			case 2: //Single Character
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Please select input type:";
    				mes "By CID or Name?";
    				next;
    				if(select("Character ID:Character Name") == 1)
    				{
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Write character id:";
    					next;
    					input .@new_char,150000, 10000000; //Char id range from 150k to 10m.
    					set .@query, query_sql("SELECT account_id, name FROM `" + .CharTableName$ + "` WHERE char_id = " + .@new_char, .@new_accountid, .@new_name$);
    					if(!.@query) goto OnNotExist;
    					if(select("Continue:Cancel") != 1) goto OnLeave;
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE char_id = " + .@new_char);
    				}
    				else
    				{
    					mes "[" + strnpcinfo(1) + "]";
    					mes "Write player name:";
    					next;
    					input .@new_name$;
    					set .@query, query_sql("SELECT char_id, account_id FROM `" + .CharTableName$ + "` WHERE name = '" + .@new_name$ + "'", .@new_char, .@new_accountid);
    					if(!.@query) goto OnNotExist;
    					if(select("Continue:Cancel") != 1) goto OnLeave;
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE char_id = " + .@new_char);
    				}
    				break;
    			case 3: //All Online Accounts.
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Please hold...";
    				set .@c, 0; //Counting success.
    				set .@query, query_sql("SELECT account_id FROM `"+.CharTableName$+"` WHERE online=1",.@account);
    				for(set .@i, 0; .@i < .@query; set .@i, .@i + 1) {
    					sleep2 25; //Slowdown the loop abit.
    					query_sql("DELETE FROM " + .GiftTableName$ + " WHERE account_id = " + .@account[.@i]);
    				}
    				break;
    			case 4: //All Accounts.
    				query_sql("DELETE FROM " + .GiftTableName$ + " WHERE account_id >= 1");
    				break;
    			case 5: //All Online Players/Characters.
    				mes "[" + strnpcinfo(1) + "]";
    				mes "Please hold...";
    				set .@c, 0; //Counting success.
    				set .@query, query_sql("SELECT char_id FROM `"+.CharTableName$+"` WHERE online=1",.@char);
    				for(set .@i, 0; .@i < .@query; set .@i, .@i + 1)
    					{
    						sleep2 25; //Slowdown the loop abit.
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE char_id = " + .@char[.@i]);
    					}
    				break;
    			case 6: //All Players/Characters.
    				query_sql("TRUNCATE TABLE " + .GiftTableName$);
    				break;
    			case 7: // Delete specific item
    				mes "Please type the id of the item you wish to delete";
    				mes "This will delete all entries with the item id you typed";
    				input(.@deletethis);
    				next;
    				mes "Are you sure you want to delete all entries of " + .@deletethis;
    				if (select("Yes:No")==1)
    					{
    						query_sql("DELETE FROM " + .GiftTableName$ + " WHERE item = " + .@deletethis + "");
    					}
    					else
    					{
    						mes "Deletion cancelled";
    						close;
    					}
    			case 8: //All ip logs
    				query_sql("TRUNCATE TABLE " + .GiftTableNameIP$);
    				break;
    			default:
    				break;
    		}
    		next;
    		mes "deletion finished";
    		cutin "v_sprakki04",255;
    		close;
    
    OnLimit:
    	mes "Please enter an ip limit, current limit is " + .ip_limit;
    	input(.ip_limit);
    	mes "Done!";
    	cutin "v_sprakki04",255;
    	close;
    
    //============================================================ 
    // Config/Edit:
    //============================================================ 
    OnLoadSetup:
    	set .Setup, 1;	//OnInit is loaded check.
    	set .GMin, 60;	//Minimum GM level to use gm panel.
    	set .ZenyID,23500; // put this when asked for which item to give zeny.
    	set .MaxZeny,1000000000;
    	//Your table names:
    	set .CharTableName$, "char";	//Character table name(SQL).
    	set .LoginTableName$, "login";
    	set .GiftTableName$, "reward";	//Gift table name(SQL).
    	set .GiftTableNameIP$, "reward_ip";	//Gift table name for ip tracker
    	set $GiftTableNameAT$, "reward_at";	//Gift table name for auto trade tracker
    	//Create gift table <auto_id>, <account_id>, <char_id>, <item>, <value>
    
    	query_sql("CREATE TABLE IF NOT EXISTS `reward` (`id` int(11) NOT NULL AUTO_INCREMENT,`account_id` int(11) unsigned NOT NULL DEFAULT '0',`char_id` int(11) unsigned NOT NULL DEFAULT '0',`item` int(11) NOT NULL DEFAULT '0',`value` int(11) NOT NULL DEFAULT '0',`duration` int(11) NOT NULL DEFAULT '0',`timestamp` int(23) NOT NULL DEFAULT '0',PRIMARY KEY (`id`))");
    	query_sql("CREATE TABLE IF NOT EXISTS `reward_ip` ( `give_id` int(11) NOT NULL,  `item_id` int(11) NOT NULL,  `ip_address` varchar(23) NOT NULL, `claim_count` int(11) NOT NULL,  PRIMARY KEY (`give_id`))");
    	query_sql("CREATE TABLE IF NOT EXISTS `reward_at` (`account_id` int(11) NOT NULL,`char_id` int(11) NOT NULL)");
    	return;
    
    OnInit:
    	callsub OnLoadSetup;
    	waitingroom "Prize Giver",0;
    	end;
    }
    
    /* Manual table update for at tracker 
    CREATE TABLE IF NOT EXISTS `reward_at` (
      `account_id` int(11) NOT NULL,
      `char_id` int(11) NOT NULL
    );
    */
    -	script	anti_trader	-1,{
    	
    OnInit:
    	.is_anti_trade = 1; // 0 to disable
    	end;
    	
    }
    function	script	PG_30Seconds	{
    	//dispbottom "anti trader 30sec";
    	//Check if Vending (normal or @at)
    	if(checkvending() >= 1)
    	{
    	   // mark as auto trader
    	   	.@query = query_sql("SELECT account_id, char_id FROM "+$GiftTableNameAT$+" WHERE account_id = "+getcharid(3)+"", .@account_id, .@char_id); // check if in the table
    		if (!.@query)
    		{ // add if not there yet
    			query_sql("INSERT INTO "+$GiftTableNameAT$+"(account_id,char_id) VALUES("+getcharid(3)+","+getcharid(0)+")");
    			//dispbottom "you have been marked as auto trader";
    			stopnpctimer;
    			detachnpctimer;
    			end;
    		}
    	}
    	return;
    }
    function	script	PG_Login	{
    	//dispbottom "at delete";
    	.@query = query_sql("SELECT account_id, char_id FROM "+$GiftTableNameAT$+" WHERE account_id = "+getcharid(3)+"", .@account_id, .@char_id); // check if in the table
    	if (.@query)
    	{ // remove to reverify vending status
    		query_sql("DELETE FROM "+$GiftTableNameAT$+" WHERE account_id = "+getcharid(3)+"");
    	}
    }
  8. Good Day Everyone,

    I found this script https://pastebin.com/raw/W4UXJLw9 made by sir @Emistry
    I would like to make a request about the script he made, if only possible? here are some customization that I'd like to request..

    1. I want to add more items to the NPC to craft (ex. custom shield, boots, etc..)
    2. the NPC need a payment and when the crafting failed the payment increases..
    3. it will increase amount of the item needed when failed also..

    thank you in advance

  9. sir @Emistry can I make a request for this script?

    1. I want to add more items to craft
        (ex. custom shield, boots, etc..)
    2. need a payment.. and then when it failed to craft, the payment increases..
    3. it will increase amount of the item needed when failed also..

    I know this is too much..

  10. it's working now, but the problem is this line..

    announce "Congratulation NameRO for reaching "+.@j+"+ Players !!",bc_all;

    it announces Congratulation NameRO for reaching 0+ Players..
    why does the script announce 0 Players?

     

    and every time I relog in the game, the script spam announcing.. even though I'm the only player..

  11. @Fratini
    I try to change this line
    to .@item

    input .item;
    	if(getitemname(.@item) == "null") {
    		mes "Invalid ID "+.@item+".";
    		close;
    	}

    and this line
    to .@count

    input .count,0,30000;
    	if (.@count == 0)
    		mes "Invalid quantity 0.";
    	close2;
    	dispbottom .count+" of "+getitemname(.@item)+" will be given to players as soon as the Server gets 100+ Online =)",0x00FF00;

    and this line too
    if(getusers(1) == 5) so I can get the item easily

    -	script	Check_100	-1,{
    	OnPCLoginEvent:
    		if(getusers(1)>=100)
    			initnpctimer "Surprise at 100";
    		end;
    
    }

    but still not giving the item as the reward?

×
×
  • Create New...