Jump to content
  • 0

Freebies NPC that adds 7 days of premium users in sql


Kudo

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   0
  • Joined:  08/18/12
  • Last Seen:  

Spoiler

prontera,168,228,4    script    Solopack    832,{


    if(#sorry == 1) goto L_1;
    mes "You will receive Some Present as a reward for joining the server";
    mes "We're gladly thankful for your support in the future too.";
    next;
    if(checkweight(2504,1) == 0 ) goto L_OverWeight;
     getitem 3100,5;
    getitem 7227,5;
    getitem 6767,5;
    getitem 12103,10;
    getitem 13517,50;
    getitem 50000,1;
    getitem 12534,100;
    getitem 4142,1;
    getitem 4147,1;
    getitem 4302,1;    
    getitem2 1822,1,2,10,0,0,0,0,0;
    getitem2 1108,1,2,10,0,0,0,0,0;
    getitem2 1408,1,2,10,0,0,0,0,0;
    getitem2 1264,1,2,10,0,0,0,0,0;
    getitem2 1208,1,2,10,0,0,0,0,0;
    getitem2 1705,1,2,10,0,0,0,0,0;
    getitem2 1302,1,2,10,0,0,0,0,0;
    getitem2 1309,1,2,10,0,0,0,0,0;
    getitem2 1902,1,2,10,0,0,0,0,0;
    getitem2 1953,1,2,10,0,0,0,0,0;
    getitem2 13302,1,2,10,0,0,0,0,0;
    getitem2 13104,1,2,10,0,0,0,0,0;

    emotion ET_THANKS;
    set #sorry,1;
    close;

L_OverWeight:
    mes "Sorry, you are over weight";
    emotion ET_THANKS;
    close;

L_1:
    mes "You had already received before the gift.";
    emotion ET_HUK;
    close;
}

Capture.JPG.628c09f233d1053cbdddb61809dbfbb7.jpg.f79ec1060fcdfc284969907de491b5d4.jpg

that is my freebies npc script and i want to know if it is possible to make a query inside my script.. when i click the npc and receive my freebies i want to add new record in my sql table and is it possible to have 7 days expiration in my expiration date column(starting the day that they claim the freebies) and for the pass code will generate randomly?
please help me for this script thanks in advance 

Edited by aksehc
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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

query_sql("INSERT INTO table VALUES (20000046, 23456, 100, 0, DATE_ADD(NOW(), INTERVAL 7 DAY))");

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   0
  • Joined:  08/18/12
  • Last Seen:  

1 hour ago, Patskie said:

query_sql("INSERT INTO table VALUES (20000046, 23456, 100, 0, DATE_ADD(NOW(), INTERVAL 7 DAY))");

 

Spoiler

prontera,168,228,4    script    Solopack    832,{


    if(#sorry == 1) goto L_1;
    mes "You will receive Some Present as a reward for joining the server";
    mes "We're gladly thankful for your support in the future too.";
    next;
    if(checkweight(2504,1) == 0 ) goto L_OverWeight;
     getitem 3100,5;
    getitem 7227,5;
    getitem 6767,5;
    getitem 12103,10;
    getitem 13517,50;
    getitem 50000,1;
    getitem 12534,100;
    getitem 4142,1;
    getitem 4147,1;
    getitem 4302,1;    
    getitem2 1822,1,2,10,0,0,0,0,0;
    getitem2 1108,1,2,10,0,0,0,0,0;
    getitem2 1408,1,2,10,0,0,0,0,0;
    getitem2 1264,1,2,10,0,0,0,0,0;
    getitem2 1208,1,2,10,0,0,0,0,0;
    getitem2 1705,1,2,10,0,0,0,0,0;
    getitem2 1302,1,2,10,0,0,0,0,0;
    getitem2 1309,1,2,10,0,0,0,0,0;
    getitem2 1902,1,2,10,0,0,0,0,0;
    getitem2 1953,1,2,10,0,0,0,0,0;
    getitem2 13302,1,2,10,0,0,0,0,0;
    getitem2 13104,1,2,10,0,0,0,0,0;

    emotion ET_THANKS;
    set #sorry,1;
    close;

L_OverWeight:
    mes "Sorry, you are over weight";
    emotion ET_THANKS;
    close;

L_1:
    mes "You had already received before the gift.";
    emotion ET_HUK;
    close;
}

where should i put in this script sir?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1529
  • Reputation:   234
  • Joined:  08/03/12
  • Last Seen:  

that is example. u need to add it in your script/ edit sql query in your script.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  126
  • Reputation:   0
  • Joined:  08/18/12
  • Last Seen:  

40 minutes ago, Chaos92 said:

that is example. u need to add it in your script/ edit sql query in your script.

yea i know dude but i just want to know where and how can i put that in my gpack script btw heres my npc script

Spoiler

prontera,168,228,4    script    Solopack    832,{


    if(#sorry == 1) goto L_1;
    mes "You will receive Some Present as a reward for joining the server";
    mes "We're gladly thankful for your support in the future too.";
    next;
    if(checkweight(2504,1) == 0 ) goto L_OverWeight;
     getitem 3100,5;
    getitem 7227,5;
    getitem 6767,5;
    getitem 12103,10;
    getitem 13517,50;
    getitem 50000,1;
    getitem 12534,100;
    getitem 4142,1;
    getitem 4147,1;
    getitem 4302,1;    
    getitem2 1822,1,2,10,0,0,0,0,0;
    getitem2 1108,1,2,10,0,0,0,0,0;
    getitem2 1408,1,2,10,0,0,0,0,0;
    getitem2 1264,1,2,10,0,0,0,0,0;
    getitem2 1208,1,2,10,0,0,0,0,0;
    getitem2 1705,1,2,10,0,0,0,0,0;
    getitem2 1302,1,2,10,0,0,0,0,0;
    getitem2 1309,1,2,10,0,0,0,0,0;
    getitem2 1902,1,2,10,0,0,0,0,0;
    getitem2 1953,1,2,10,0,0,0,0,0;
    getitem2 13302,1,2,10,0,0,0,0,0;
    getitem2 13104,1,2,10,0,0,0,0,0;

    emotion ET_THANKS;
    set #sorry,1;
    close;

L_OverWeight:
    mes "Sorry, you are over weight";
    emotion ET_THANKS;
    close;

L_1:
    mes "You had already received before the gift.";
    emotion ET_HUK;
    close;
}

 

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...