Jump to content

Yoona

Members
  • Posts

    567
  • Joined

  • Last visited

Posts posted by Yoona

  1. please post your script. :D

     

    or try this, because the above post is quite messy XD

     

    prontera,168,184,3 script Freebies 479,{
        mes .NPC$;
        mes "Wanna get the freebies " +strcharinfo(0)+ "?";
    	next;
        if (select("Yes:No") - 1) close;
        mes .NPC$;
        mes "Let me check if you are really a new member";
        next;
        query_sql("SELECT last_ip, account_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip,.@accid);
        query_sql("SELECT last_ip FROM `freebies`", .@freebiesip);
        if (.@lastip == .@freebiesip || .@accid == getcharid(3))
    	{
                mes .NPC$;
                mes "You already got the freebies " +strcharinfo(0);
                end;
        }
        mes .NPC$;
        mes "Okay, take these...";
        next;
        query_sql("INSERT INTO `freebies` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + escape_sql(getcharip()) + "')");
        
         for ( set .@x,0; .@x < getarraysize(.freebie_item); set .@x,.@x + 1 )
           {
           getitem .freebie_item[.@x], .quantity[.@x];
           }
        end;
        
        OnInit:
        set .NPC$, "[ " +strnpcinfo(1)+ " ]";
        .freebie_item[0],30316,30315,30314,30027,30028,30029,30030,4302,4403,7227,30499,671,2629,2630,4140;
        setarray .quantity[0],1,1,1,1,1,1,1,1,1,1000,1,1000,2,2,4;
        waitingroom "Freebies Here",0;
        end;
    }
    

    now its error in line 30 =( it says

     

    " parse_line: expect command, missing function name or calling undeclared dunction "

  2. 
    prontera,168,184,3    script    Freebies    479,{
        mes .NPC$;
        mes "Wanna get the freebies " +strcharinfo(0)+ "?";
        next;
        if (select("Yes:No") - 1) close;
        mes .NPC$;
        mes "Let me check if you are really a new member";
        next;
        query_sql("SELECT last_ip, account_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip,.@accid);
        query_sql("SELECT last_ip FROM `freebies`", .@freebiesip);
        if (.@lastip == .@freebiesip && .@accid == getcharid(3))
        {
                mes .NPC$;
                mes "You already got the freebies " +strcharinfo(0);
                close;
        }
        query_sql("INSERT INTO `freebies` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lastip + "')");
        for ( set .@x,0; .@x < getarraysize(.freebie_item); set .@x,.@x + 1 ) {
        getitem .freebie_item[.@x], .quantity[.@x];
        }
        
        close;
        
        OnInit:
        set .NPC$, "[ " +strnpcinfo(1)+ " ]";
        .freebie_item[0],30316,30315,30314,30027,30028,30029,30030,4302,4403,7227,30499,671,2629,2630,4140;
        setarray .quantity[0],1,1,1,1,1,1,1,1,1,1000,1,1000,2,2,4;
        waitingroom "Freebies Here",0;
        end;
    }
    
    

     

    It duplicates because you dont have an account ID check. it wont really insert not unless you'll use "update".
     
    I assume that your player have changed IP, so he/she was able to get another freebie item, unfortunately, his/her account_id was already registered. That's why it produced an error for duplicating  an existing row using the account id which is your freebie's primary key.
     
    And also try this sql
     
    CREATE TABLE IF NOT EXISTS `freebies` (
      `id` int(11) NOT NULL auto_increment,
      `account_id` int(11) NOT NULL default '0',
      `name` varchar(23) NOT NULL default '',
      `last_ip` varchar(15) NOT NULL,
      PRIMARY KEY (`account_id`),
      KEY (`id`)
    ) ENGINE=MyISAM;
    

     

    edit:

    sorry... change this

    if (.@lastip == .@freebiesip && .@accid == getcharid(3))
    

    to this:

    if (.@lastip == .@freebiesip || .@accid == getcharid(3))
    

    i got an error at line 26?

  3. Please take note that IP address can be easily changed.

    Anyway, this is the script:

     

    
    amatsu,116,146,3 script Seyra 90,{
    
    set .@n$, "[Seyra]";
    setarray .@rwd[0],2115,1,2357,1,2421,1,2524,1; // Rewards: <item id>,<item amount>
    
    query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);
    
    if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
    {
    mes .@n$;
    mes "I'm sorry, the rewards are exclusively for new players.";
    close;
    }
    
    mes .@n$;
    mes "Welcome! Here are some free gifts"; 
    mes "for newcomers:";
    
    for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
    mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);
    
    close2;
    set #NewbieGift, 1;
    setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;
    
    for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
    getitem .@rwd[.@i], .@rwd[.@i+1];
    
    end;
    
    OnInit:
    
    waitingroom "Newbie Gift!",0;
    end;
    
    }
    

    soo, if IP can easily changed is there any other way to prevent that? by using this script? please 

  4. Its all about this script:

     

    prontera,168,184,3 script Freebies 479,{
    mes .NPC$;
    mes "Wanna get the freebies " +strcharinfo(0)+ "?";
    if (select("Yes:No") - 1) close;
    mes .NPC$;
    mes "Let me check if you are really a new member";
    next;
    query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@lastip$);
    query_sql("SELECT last_ip FROM `freebies`", .@freebiesip$);
    if (.@lastip$ == .@freebiesip$) {
    mes .NPC$;
    mes "You already got the freebies " +strcharinfo(0);
    close;
    }
    query_sql("INSERT INTO `freebies` VALUES (NULL," + getcharid(3) + ",'" + escape_sql(strcharinfo(0)) + "','" + .@lastip$ + "')");
    for ( set .@x,0; .@x < getarraysize(.freebie_item); set .@x,.@x + 1 ) {
    getitem .freebie_item[.@x], .quantity[.@x];
    }

    close;

    OnInit:
    set .NPC$, "[ " +strnpcinfo(1)+ " ]";
    setarray .freebie_item[0],30316,30315,30314,30027,30028,30029,30030,4302,4403,7227,30499,671,2629,2630,4140;
    setarray .quantity[0],1,1,1,1,1,1,1,1,1,1000,1,1000,2,2,4;
    waitingroom "Freebies Here",0;
    }

     

     

    and on mysql

     

    CREATE TABLE IF NOT EXISTS `freebies` (
    `id` int(11) NOT NULL auto_increment,
    `account_id` int(11) NOT NULL default '0',
    `name` varchar(23) NOT NULL default '',
    `last_ip` varchar(100) NOT NULL default '',
    PRIMARY KEY (`account_id`),
    KEY (`id`)
    ) ENGINE=MyISAM;

     

     

    it keeps giving items, and here's a picture of SQL error's

     

     

    post-16619-0-84622300-1373671324_thumb.jpg



    Bump =( Please

  5.  

    Hmmmmm i need rathena SVN Trunk i cant download. XD

    Use Torquise SVN which you can downlaod it here  " Link " and a Video Tutorial " Here "

     

     

     

     

    /gawi  I wish you, Good Luck =)

     

    Hey Yoona, clarifying again, it's actually "TortoiseSVN" (the coolest interface to (Sub)version control) (that's what they say)

     

     

    @TS:

    The best way is.. to.. open the Wiki. many people had contributed there.

    hahah lol  /no1  thanks i've got a low when it comes on remembering :)

  6. You can see all of this in your trunk/conf/inter_athena.conf

     

     

    // MySQL Character SQL server
    char_server_ip: 127.0.0.1
    char_server_port: 3306
    char_server_id: ragnarok <= Mysql username
    char_server_pw: ragnarok <= your mysql password
    char_server_db: ragnarok <= this one should be your main table where you extract your main.sql

    // MySQL Map SQL Server
    map_server_ip: 127.0.0.1
    map_server_port: 3306
    map_server_id: ragnarok <= Mysql username
    map_server_pw: ragnarok <= your mysql password
    map_server_db: ragnarok <= this one should be your main table where you extract your main.sql

    // MySQL Log SQL Database
    log_db_ip: 127.0.0.1
    log_db_port: 3306
    log_db_id: ragnarok <= Mysql username
    log_db_pw: ragnarok <= your mysql password
    log_db_db: ragnarok <= now for this one, change it to your log table " where you extract your log.sql "
    log_codepage:
    log_login_db: loginlog

     

     

    I hope i explained it correctly =)

  7. emm,just simply create the data folder by right clicking on the white space > New > New Folder and rename it to 'data'

    now no more error but when i click my client nothing happen i already did run as admin then not continue loading :'(

     

    Can i add you on your facebook so you can help me please? this is my 1st time please help me please? im begging you please. /sob

    you can get data files here

    Click This then extact it in your ROFOLDER

  8.  

     

    i think your missing that file in your data folder...

    what file? please help me please please i always get that error when i redo my client set-up

    what are you using? grf or data?

     

    i already encounter this problem but i forgot, let me search it on goggle....

     

    here's the link

    http://rathena.org/board/topic/75462-string-buf10-attempt-to-call-global-iter-gettable-a-nil-value/

    what do you mean what im using? where can i see what im using? please tell me my server side is ok but client is not working

    by running your server the data files are important did you make it an grf file? or just the normal data?

  9. i think your missing that file in your data folder...

    what file? please help me please please i always get that error when i redo my client set-up

    what are you using? grf or data?

     

    i already encounter this problem but i forgot, let me search it on goggle....

     

    here's the link

    http://rathena.org/board/topic/75462-string-buf10-attempt-to-call-global-iter-gettable-a-nil-value/

  10. Hello Yoona,

     

    I believe you are using either Neoncube or JikariCube.

     

    Yes, that is the way you are sending the patchfiles.

    That will mean:

    this patch will patch your grf file (since you wrote it 1   GRF  2010-09-10.grf)

     

    Sorry, my bad. it's correct - the way you write it. but, you forgot the thing about "patch number"

    it should be like this:

     

    PatchNumber<space>GRF.Number<space>PatchDestination<space>filename.ext

     

    so, could be like this:

     

    200 1   GRF  2010-09-10.grf

     

    *the number in blue is set up-to-you. otherwise, if you set the last number is 20.000, then, the next patch must be larger than 20.000 (i.e: 20.001, etc)

     

    Have a nice day!

    Thank you for the response Winz =) i will try it

     

     

    and by doing the files that im going to update Directory should be like this? data/texture/... ?

     

    and it should be in grf or gpf file?

  11. getitem .freebie_item[.@x], ..quantity[.@x];

    Should be : 

    getitem .freebie_item[.@x], .quantity[.@x];
    

    now there's a problem in line 23, i check the problem it says parse_line need ";"

     

    but i check the script its not missing ";"

     

    line 23

    set .NPC$, "[ " strnpcinfo(1)+ " ]";

     

    what should i do?

  12. 
    amatsu,116,146,3 script Seyra 90,{
    
    set .@n$, "[Seyra]";
    setarray .@rwd[0],2115,1,2357,1,2421,1,2524,1; // Rewards: <item id>,<item amount>
    
    query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$);
    
    if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)
    {
    mes .@n$;
    mes "I'm sorry, the rewards are exclusively for new players.";
    close;
    }
    
    mes .@n$;
    mes "Welcome! Here are some free gifts"; 
    mes "for newcomers:";
    
    for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
    mes .@rwd[.@i+1] + " x " + getitemname(.@rwd[.@i]);
    
    close2;
    set #NewbieGift, 1;
    setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1;
    
    for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 )
    getitem .@rwd[.@i], .@rwd[.@i+1];
    
    end;
    
    OnInit:
    
    waitingroom "Newbie Gift!",0;
    end;
    
    }
    

    this one check the IP/MAC of the newbie or player right Anakid?

×
×
  • Create New...