Jump to content
  • 0

Free COins to every players (1 ip get 1 time) URGENT


Question

Posted (edited)

 

// alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`);
izlude,128,213,3    script    Anniversary Coins    112,{


    setarray .reward, 671,100; // 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;
}

 

 

 

 

can tell me what happen? it says  I'm sorry, the rewards are exclusively for new players. and i didnt even take the coins yet..

also i had load the sql 
alter table `login` add column `newbie` tinyint(3) unsigned not null default '0', add index (`newbie`);

Edited by donkeyg

10 answers to this question

Recommended Posts

Posted

Change :

 

#NewbieGift, 1;

to : 

#Gift, 1;

And : 

if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)

To : 

if ( getd("$" + .@lip$ + "_NG") > 0 || #Gift > 0)

 

Maybe you already tried the script and get the freebies. All variables with "#" will be cached. So i guess that results on what you have said on this post.

Posted

Change :

 

#NewbieGift, 1;

to : 

#Gift, 1;

And : 

if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0)

To : 

if ( getd("$" + .@lip$ + "_NG") > 0 || #Gift > 0)

 

Maybe you already tried the script and get the freebies. All variables with "#" will be cached. So i guess that results on what you have said on this post.

 

 

i tried the 1st time and it says :"0 hello, here are free gifts..." but it still didnt give me #Itemid 671 .. and i tried 2nd time, and it says its for exclusive player only...

EDited: or maybe can u just help me change it to every account can get instead of 1 ip 1 time only? that would be easier is it?

Posted

 

-    script    Freebies    1,{
OnPCLoginEvent:
if(!#givenStartItems) {
set #givenStartItems, 1;
//=== Freebies
    getitem 657,5;
}
end;
}

 

 

Here use mine.

Edit: getitem 657,5;

into the item number of coin.

this freebie is limited to 1 character per account.

Posted

 

-    script    Freebies    1,{
OnPCLoginEvent:
if(!#givenStartItems) {
set #givenStartItems, 1;
//=== Freebies
    getitem 657,5;
}
end;
}

 

 

Here use mine.

Edit: getitem 657,5;

into the item number of coin.

this freebie is limited to 1 character per account.

1 account can get 1 time only.. not every character...

Posted

 

1 account can get 1 time only.. not every character...

1 character per account also means 1 freebies per account. not every character can claim freebies

so, the script that stydianx posts is for 1 freebies per account? 

i tried load the script.. and i use a new account with new character, when i created and go in, it doesnt give me the Item id 657 ... Hmm very confuse now.

and why don u guys just help me fix the #1 script?=.=

Posted

Got this from somewhere

prontera,140,179,4    script    Freebies    511,{
    // Freebies ID
    setarray .@freebie_item[0],14545,20007,20008,20009,20010,20011,20012,4142;
    // Quantity
    setarray .@quantity[0],10,1,1,1,1,1,1,1;


    set .npcname$,"[^990000Freebies^000000]";
    
    mes .npcname$;
    mes "Welcome to Your Ragnarok Online "+strcharinfo(0)+"! ";
    mes "Here is your freebies!";
    next;
    
    if(#freebiez == 1)
    {
        mes .npcname$;
        mes "You've already claim your Freebies.";
        close;
    }
    
     for ( set .@x,0; .@x < getarraysize(.@freebie_item); set .@x,.@x + 1 )
    {
        getitem .@freebie_item[.@x], .@quantity[.@x];
    }
    set #freebiez,1;
    mes .npcname$;
    mes "Wow! Freebies is already given! Goodluck to your career. Dear  "+strcharinfo(0)+".";
    close;
OnInit:
waitingroom "Freebies Here!",0;
end;
}
Posted

Got this from somewhere

prontera,140,179,4    script    Freebies    511,{
    // Freebies ID
    setarray .@freebie_item[0],14545,20007,20008,20009,20010,20011,20012,4142;
    // Quantity
    setarray .@quantity[0],10,1,1,1,1,1,1,1;


    set .npcname$,"[^990000Freebies^000000]";
    
    mes .npcname$;
    mes "Welcome to Your Ragnarok Online "+strcharinfo(0)+"! ";
    mes "Here is your freebies!";
    next;
    
    if(#freebiez == 1)
    {
        mes .npcname$;
        mes "You've already claim your Freebies.";
        close;
    }
    
     for ( set .@x,0; .@x < getarraysize(.@freebie_item); set .@x,.@x + 1 )
    {
        getitem .@freebie_item[.@x], .@quantity[.@x];
    }
    set #freebiez,1;
    mes .npcname$;
    mes "Wow! Freebies is already given! Goodluck to your career. Dear  "+strcharinfo(0)+".";
    close;
OnInit:
waitingroom "Freebies Here!",0;
end;
}

the best script so far!!! thanks!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...