Can anybody help me add a delay of 60 seconds before using the command again. Thanks!
Code:
/*========================================== * @storeall by [MouseJstr] * Put everything into storage *------------------------------------------*/ACMD_FUNC(storeall){ int i; nullpo_retr(-1, sd); if (sd->state.storage_flag != 1) { //Open storage. if( storage_storageopen(sd) == 1 ) { clif_displaymessage(fd, "You can't open the storage currently."); return -1; } } for (i = 0; i < MAX_INVENTORY; i++) { if (sd->status.inventory[i].amount && sd->status.inventory[i].equip == 0) { if(sd->status.inventory[i].equip != 0) pc_unequipitem(sd, i, 3); storage_storageadd(sd, i, sd->status.inventory[i].amount); } } storage_storageclose(sd); clif_displaymessage(fd, "It is done"); return 0;}