Jump to content
  • 0

Question

Posted

good day masters can you help me to make this script to a random items??

 

if the player pick the lucky player of the day he will get a random item base on my script

 

thank you so much

 

this is the script

 

-	script	LuckyPlayer	-1,{

OnInit:
OnClock0000:
set .LuckyTime,rand(24);
OnMinute00:
if( gettime(3) == .LuckyTime ){
set .DelayMin,rand(60);
sleep ( rand(60) * 1000 );
while(1){
 query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
 attachrid .@aid;
 if( CheckVending() ){
  DetachRID();
  continue;
  }
 announce strcharinfo(0) +" Get 1 Old Gift Box for Lucky Player of the day!", 0,0x00FF00;
 getitem 12244,1;
 dispbottom "you got 1 Old Gift Box";
 break;
}
}
end;
}

 

5 answers to this question

Recommended Posts

  • 1
Posted (edited)
1 hour ago, Questune09 said:

good day masters can you help me to make this script to a random items??

 

if the player pick the lucky player of the day he will get a random item base on my script

 

thank you so much

 

this is the script

 


-	script	LuckyPlayer	-1,{

OnInit:
OnClock0000:
set .LuckyTime,rand(24);
OnMinute00:
if( gettime(3) == .LuckyTime ){
set .DelayMin,rand(60);
sleep ( rand(60) * 1000 );
while(1){
 query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
 attachrid .@aid;
 if( CheckVending() ){
  DetachRID();
  continue;
  }
 announce strcharinfo(0) +" Get 1 Old Gift Box for Lucky Player of the day!", 0,0x00FF00;
 getitem 12244,1;
 dispbottom "you got 1 Old Gift Box";
 break;
}
}
end;
}

 

 
 

 

 

	-    script    LuckyPlayer    -1,{
	OnInit:
OnClock0000:
set .LuckyTime,rand(24);
OnMinute00:
    if( gettime(3) == .LuckyTime ){
    set .DelayMin,rand(60);
    sleep ( rand(60) * 1000 );
    while(1) {
        query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
        attachrid .@aid;
        if( CheckVending() ) {
            DetachRID();
            continue;
        }
        announce strcharinfo(0) +" Get 1 Old Gift Box for Lucky Player of the day!", 0,0x00FF00;
        getitem F_Rand ( 1,2,3,4,5,6,7),1; // <item_id>
            dispbottom "you got 1 Old Gift Box";
            break;
        }
    }
    end;
}
	

 

Didn't know Emistry got the respond first.

Edited by Kaze
  • Upvote 1

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