Jump to content
  • 0

help with this freebies npc


Brynner

Question


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

how to make this freebies script will only gave freebies for those account credited after account id 2000735? below that account will not be given any freebies.

 

brasilis,203,185,4	script	Freebies	112,{
	delwaitingroom;
	waitingroom "Free Item Here!",0;   // Look on the configuration!
if( !Freebies ){
set Freebies,1;
mes "Welcome...this is your gift...";
getitem2 2320,1,1,7,0,0,0,0,0; // +7 formal suit[1]
getitem2 2504,1,1,7,0,0,0,0,0; // +7 muffler[1]
getitem2 2104,1,1,7,0,0,0,0,0; // +7 buckler[1]
getitem2 2102,1,1,7,0,0,0,0,0; // +7 Guard[1]
getitem2 2404,1,1,7,0,0,0,0,0; // +7 Shoes[1]
getitem 12210, 5;
getitem 14533, 5;
getitem 12622, 1;
getitem 4142, 1;
getitem 4147, 1;
}else{
mes "You have claim the Reward already.";
}
close;
}

 

Edited by Brynner
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try this one. Note that `ragnarok` is the name of the database. Change that to your database name : 

brasilis,203,185,4    script    Freebies    112,{
    delwaitingroom;
    waitingroom "Free Item Here!",0;   // Look on the configuration!
    query_sql "SELECT `account_id` FROM `ragnarok`.`char` WHERE `char_id` = '" + getcharid(0) + "'", .@id;
    if( !Freebies && ( .@id > 2000735 ) ){
        set Freebies,1;
        mes "Welcome...this is your gift...";
        getitem2 2320,1,1,7,0,0,0,0,0; // +7 formal suit[1]
        getitem2 2504,1,1,7,0,0,0,0,0; // +7 muffler[1]
        getitem2 2104,1,1,7,0,0,0,0,0; // +7 buckler[1]
        getitem2 2102,1,1,7,0,0,0,0,0; // +7 Guard[1]
        getitem2 2404,1,1,7,0,0,0,0,0; // +7 Shoes[1]
        getitem 12210, 5;
        getitem 14533, 5;
        getitem 12622, 1;
        getitem 4142, 1;
        getitem 4147, 1;
    } else {
        mes "You have claim the Reward already.";
    }
    close;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

thanks for the reply. but already got a solution.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

you dont really have to go through the SQL database and retrieve there information there...

 

we got getcharid ...

 

  if( !Freebies && getcharid(3) > 2000735 ){
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  76
  • Reputation:   2
  • Joined:  06/07/12
  • Last Seen:  

hi

 

you dont really have to go through the SQL database and retrieve there information there...

 

we got getcharid ...

 

  if( !Freebies && getcharid(3) > 2000735 ){

 

what is the use of 2000735?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

@dhaishuke

how to make this freebies script will only gave freebies for those account credited after account id 2000735? below that account will not be given any freebies.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

2000735?

The number refer to id number sql on Brynner player id....

  • Upvote 1
Link to comment
Share on other sites

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.

×
×
  • Create New...