Jump to content
  • 0

maybe a veteran scripter could help me


Question

Posted

hi im looking for a way to grant each player who is playing on my server on each new day 10 obbs. but i dont know how to handle online characters different than offline players T_T i guess a mysql solution would be best?

one thing on the sidenote would be that a current obb amount of the player never exceeds 10. so that 10 should be always the maximum whether they use it or not.

hope anyone can help me! ^_^

thanks in advance

Breaker!

3 answers to this question

Recommended Posts

Posted (edited)

This gives .item_amount of .item_id each new day they log in. If you want to manage offline players too, you need to use some sql queries, but I don't really like that way to get free items if not playing :P

OnPCLoginEvent:
if( (obbDay == gettime(5)) && (obbMonth == gettime(6)) )
end;

set obbMonth, gettime(6);
set obbDay, gettime(5);
getitem .item_id, .item_amount;
dispbottom "You have been rewarded with " + .item_amount + " " + getitemname(.item_id);
end;

OnInit:
set .item_id, <obb id>;
set .item_amount, <amount>;
}

Edited by Ryokem
Posted
- script Sample#daily_item -1,{
OnPCLoginEvent:
if( #Date != atoi( gettimestr( "%Y%m%d", 9 ) ) ){
getitem 512,( 10 - countitem( 512 ) );
#Date = atoi( gettimestr( "%Y%m%d", 9 ) );

}
end;
}

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